HAL_UART_Receive Not Working in STM32 netxduo.c Thread
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-04-03 9: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.
- Labels:
-
AzureRTOS
-
STM32CubeMX
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-04-03 9: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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-04-03 9: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.
