cancel
Showing results for 
Search instead for 
Did you mean: 

HAL_UART_Receive not working after a while!

Mujtaba
Senior

Dear friends,

there are two threads in my application , one is used for TCP/IP using lwIP and the other one is for RS485 protocol. Everything works fine correctly and I can send and receive data on RS485.

After two or three hours or sometimes sooner, the MCU doesn't receive anything while there are data to be received.

When I do not use freeRTOS and lwIP, the mcu works correctly.

Could there be a problem with running RTOS and using HAL_UART_Receive?

I am using STM32F107RCt6 MCU and the latest version of CubeMX and HAL drivers.

The total heap size of freeRTOS is 10240 bytes and each thread has 256 words stack.

Any helps would be appreciated,

Mujtaba

1 REPLY 1

And what does the USART->SR report in this condition?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..