DevHeads IoT Integration Server

DII

DevHeads IoT Integration Server

The DevHeads IoT Integration Server accelerates technology engineering by helping pro devs learn, share and collaborate.

Join

seeking-collabs

firmware-and-baremetal

middleware-and-os

edge-networking

pcb-and-analog

jobs

iot-cloud

code-review

devheads-feed

general-dev-chat

do you know why doesn't Intellisense work in the STM32 VS Code extension?

do you know why doesn't Intellisense work in the STM32 VS Code extension?

How to Receive Variable-Length Data Over RS485 Using HAL_UART_Receive_IT on STM32F4?

Hello everyone, So I have this custom STM32F4 MCU board and need to receive various data sequences from a Master board over an RS485 network. The lengths of the data sequences are variable, such as 10 bytes, 25 bytes, etc. I need to handle each sequence and respond accordingly. How can I effectively use the HAL functions HAL_UART_Receive_IT and HAL_UART_RxCpltCallback to properly receive variable-length data? I noticed that the third argument of HAL_UART_Receive_IT requires a fixed number of bytes, like this:...
Solution:
define the states for your state machine ```c typedef enum { RX_STATE_WAIT_FOR_HEADER, RX_STATE_WAIT_FOR_PAYLOAD...

How to Fetch and Display Data from DHT22 Sensor on AVR32UC with Zephyr OS?

hey guys, still trying to advance on my work, I've been working on fetching and displaying data from the DHT22 sensor using the AVR32UC microcontroller, but I'm encountering a persistent data fetch failure. Here’s the code I’ve implemented: ```cpp...
Solution:
finally gushh😂 , I choked it, I enabled detailed logging, which revealed an I/O error. I then double-checked the GPIO configuration, verified d pin setup, and added a pull-up resistor. After increasing delays and adding debug prints in d driver code, I finally moved the sensor to a different GPIO pin. I think I'm making progress in this, the sensor is now successfully fetching and displaying data. see this ```[00:00:00.000,000] <inf> dht: DHT driver initialized [00:00:00.000,001] <dbg> dht: Starting data fetch [00:00:00.000,002] <dbg> dht: Starting measurement [00:00:00.000,003] <dbg> dht: Reading data Temperature: 25.4 C...

How to Ensure Atomic Access to Queue in ESP32 FreeRTOS Project?

Hey guys so while i was developing an ESP32 IoT project using FreeRTOS, I'm encountering intermittent data corruption when two tasks share a queue for sensor data (readSensorTask: Reads temperature, humidity, and pressure data from sensors (BME280) every 1 second and the processDataTask: Processes the sensor data and sends it to a cloud server (MQTT) every 10 seconds.) Despite using mutexes, I'm seeing the following error: Guru Meditation Error: Core 0 panic'ed (LoadProhibited) ...
Solution:
try this approach 1. Check Mutex Usage: Ensure you're correctly locking and unlocking the mutex when accessing the queue. ```c xSemaphoreTake(mutex, portMAX_DELAY);...

Compilation Issues with STM32 HAL Libraries in Strict ANSI-C Mode

Good day everyone, I'm in a bit of a hit and miss on something guys. I have an embedded project that starts as a blank project with an empty main() function, including only the STM32 HAL and CMSIS. This project uses the STM32 HAL libraries, which in turn use the stm32f072rb CMSIS header files. The HAL documentation states that it is written in Strict ANSI-C:...

How to Resolve DHT22 Sensor Driver Binding Issue with Zephyr OS on AVR32UC?

Hello guys, I've been working on integrating the DHT22 sensor driver with Zephyr OS on the AVR32UC microcontroller, but currently, I'm struggling with the sensor driver binding. Despite my efforts, I keep encountering the error: Failed to bind DHT22 sensor. Here's a snippet of my code: ```cpp #include <zephyr.h> #include <device.h>...

Setting Up HC-SR04 Ultrasonic Sensor and 16x2 LCD on BeagleBone Black

hello guys, I'm developing an obstacle detection system using a BeagleBone Black running Embedded Linux. The system uses an HC-SR04 ultrasonic sensor to measure distances and displays the measurements on a 16x2 LCD screen. How do I set up the BeagleBone Black with an HC-SR04 ultrasonic sensor and a 16x2 LCD screen? any materials or guides would be helpful...

GPIO Pin Configuration Error for DHT22 on AVR32UC with Zephyr OS

@Dark AI Earlier, I added the pinmux settings and ensured they were included in the board's DTS file. The updated configuration looked like this: ``` &pio { pinmux_dht22: pinmux_dht22 { pins = <AVR32_PIN_PB02 GPIO_FUNC>;...

Fix Access Violation Error in x64 Assembly MASM Procedure for Complex Number Square Root Calculation

Here is a numerical simulation application for a job I'm engaged in that involves complex number calculations on Intel Core i7-12700K processor. As part of this simulation, I wrote a procedure in x64 assembly MASM to calculate the square root of a complex number. As I execute the procedure, I encounter an access violation error at the ret statement:
Exception thrown at 0x00007FF69997AA5C in HW04_Q01.exe: 0xC0000005: Access violation reading location 0xFFFFFFFFFFFFFFFF
Exception thrown at 0x00007FF69997AA5C in HW04_Q01.exe: 0xC0000005: Access violation reading location 0xFFFFFFFFFFFFFFFF
Right now I suspect the issue might be related to stack corruption, or improper use of the ret instruction, Please I need help in identifying the root cause of the access violation and correcting the code....
attachment 0

Can ESP32 Support WFE Signal Mechanism Similar to ARM-vX Architectures for Power Saving?

Do you have an idea whether ESP32s support the WFE signal mechanism or something similar which is found in ARM-vX architectures?(To be more precise if the SOC can be woken up by an event loop)
Solution:
Yes, the ESP32 supports mechanisms similar to ARM’s WFE. It uses deep sleep and light sleep modes and can wake up on events like timers or GPIO interrupts. Use the ESP-IDF API to configure sleep and wake-up behavior.

How to Resolve GPIO Pin Configuration Failures for DHT22 Sensor on AVR32UC with Zephyr OS?

Hey guys, still on my DHT22 Sensor Integration. who knows how I can configure GPIO pins on the AVR32UC for a DHT22 sensor using Zephyr OS, and how can I resolve GPIO pin configuration failures, which prompts this error message: Failed to configure GPIO pin. I have been able to define the GPIO pin for the DHT22 sensor and attempt to configure the GPIO pin as input yet the error. This is my code snippet: ```cpp #include <zephyr.h>...

Resolving Intermittent Failures in ESP32-Based IoT Project with MQTT and I2C Sensors

Hey guys i am experiencing intermittent failures in my ESP32-based IoT project, which collects light sensor data from an ESP01 via MQTT. Despite implementing robust error handling and verifying I2C connections, I'm encountering: - Sporadic disconnections from the MQTT broker, resulting in missed sensor readings - Inconsistent timing in sensor data transmission, causing data gaps ...

Configuring PIC24FJ128GC010 for Sensor Module and UART with MPLAB X IDE

Hello! I am using MPLAB X IDE v6.20, XC 16 compiler, MCC(MPLAB Code Configurator), I already configured my master(PIC24FJ128GC010) in MPLAB X IDE with the use of MCC but I don't know is there any need to configure the Sensor module separately or not. I also want to send the sensor readings through UART Communication with the use of USB to TTL convertor to my windows PC and want to observe them in putty terminal. For that I configured UART communication in the same project in MPLAB X IDE and gave the Baud rate of 9600, Start bit 1, Stop bit 1, Parity bit = none, flow control= none and also gave the same to the putty terminal as well....

Has anyone integrated LWIP with an external PHY on an stm board?

Has anyone integrated LWIP with an external PHY on an stm board?

How can I resolve the "CAN: Failed to send frame" error in my ATmega2560 ?

Hey friends, I have been trying to implement a real-time control system for automotive applications using an ATmega2560 microcontroller, an MCP2515 CAN controller, and Zephyr OS, while integrating a Bosch BMP280 sensor for pressure data. Still, however, I have been faced with an error of failing to send CAN frames? Despite setting up the SPI peripheral and initializing the CAN controller and BMP280 sensor, I encountered the error "CAN: Failed to send frame." If the implementation is successful, the output should log a message indicating that the CAN frame has been successfully sent. Attached is my code snippet...
attachment 0

Is anyone here is familiar with steval spin 3202 Evaluation board to run and debug on BLDC motor?

Hello Guys, Is anyone here is familiar with steval spin 3202 Evaluation board to run and debug on BLDC motor? There is no support from ST for this board...

Why is my ATmega32 timer interrupt not executing?

hello I am beginning interfacing on the atmega32 and I am getting started with the peripherals and now I am stuck with the timers, this code isnt executing the interrupt code for some reason #include<avr/io.h> #include<util/delay.h> #include<avr/interrupt.h> int main(void){...

How to debug intermittent crashes when running MobileNet SSD on ESP32?

Hello! I'm deploying a MobileNet SSD object detection model on an ESP32 microcontroller using the ESP-WHO framework. During inference, the device occasionally crashes with the error Guru Meditation Error: Core 1 panic'ed (LoadProhibited). The crashes occur intermittently, roughly once every 10-15 inferences, and I haven't noticed a specific pattern related to the input data. My model is approximately 20 MB, and the input images are 320x240 pixels. I've confirmed that my input data and model are correctly formatted. What advanced debugging techniques or optimizations can I apply to handle such intermittent crashes? Are there any best practices for managing memory and processor load on the ESP32 when running complex models? Additionally, are there any specific tools or logs I should focus on to identify the root cause of these crashes?...

How to optimize handling of multiple inputs efficiently on STM32F4 using GCC?

Good day everyone, I am using an STM32F4 series (F429ZI) microcontroller clocked at 180 MHz, and I'm compiling my code using GCC for ARM. I have a series of 40 if statements that each check an input for an embedded board. Running through these statements is very slow. ```c uint32_t INPUT_ARRAY[40]; #define INPUT_X INPUT_ARRAY[0] // input 1 corresponds to the first array slot and so on, easy to call up a specific input....

How to Implement Real-Time Logging for Pressure Data and Resolve SD Card Write Errors?

Hey guys, how can I implement a real-time logging system for pressure data using an ATmega2560, MCP2515 CAN controller, BMP280 sensor, and an SD card with Zephyr OS, and resolve the SD card file write error? I have successfully mounted the SD card and opened the file, but yet I encountered the error "Failed to write data." If the implementation is successful, the output should log a message indicating that the data has been successfully logged to the SD card. Here is my code in the attached file:...
attachment 0