2024-04-03 09:08 AM
Description: I'm facing an issue with the HAL_UART_Receive function in an STM32 microcontroller application when used within the netxduo.c thread. Below are the details of the problem:
Overview: I'm using an STM32 microcontroller along with a SIM modem for communication purposes.
Issue: The HAL_UART_Receive function works correctly in the main thread, allowing me to receive responses from the SIM modem. However, when calling the same function from the netxduo.c thread, I'm not receiving any responses.
Application Hanging at HAL_UART_Receive
Solved! Go to Solution.
2024-04-03 09:44 AM
This is because HAL_UART_Transmit and HAL_UART_Receive are blocking functions, not friendly to RTOS environment. Use non-blocking functions (interrupts, DMA). This is a very frequently asked question, please search in the forum and examples.
2024-04-03 09:44 AM
This is because HAL_UART_Transmit and HAL_UART_Receive are blocking functions, not friendly to RTOS environment. Use non-blocking functions (interrupts, DMA). This is a very frequently asked question, please search in the forum and examples.