Skip to main content
Markobar
Associate
February 3, 2021
Question

HAL_UART_Receive needs excessive timeout

  • February 3, 2021
  • 1 reply
  • 625 views

I'm using HAL_UART_Receive to receive 8 bytes from a Nextion screen. The baurate is 9600, so the response takes ~10ms.

If I set the timeout around 50ms, the response is not read properly. If I increase the timeout to 300ms, then all works fine.

I don't like having a timeout so large, since this could eventually interfere with the main application, which should be executed each 100ms.

Is there a reason this function needs such a large timeout? Thanks in advance!

This topic has been closed for replies.

1 reply

Piranha
Principal III
February 4, 2021