cancel
Showing results for 
Search instead for 
Did you mean: 

HAL_UART_Receive needs excessive timeout

Markobar
Associate II

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!

1 REPLY 1
Piranha
Chief II