Skip to main content
Mujtaba
Associate III
December 12, 2018
Question

HAL_UART_Receive not working after a while!

  • December 12, 2018
  • 1 reply
  • 546 views

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

This topic has been closed for replies.

1 reply

Tesla DeLorean
Guru
December 12, 2018

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

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