cancel
Showing results for 
Search instead for 
Did you mean: 

Working of RTO (receiver timeout) in UART?

Sdddd
Associate II

Hello,

I have been looking into this RTO flag provided in STM32F303 UART.

According to the manual

"The timeout function and interrupt must be activated, through the RTOEN bit in the USART_CR2 register and the RTOIE in the USART_CR1 register. The value corresponding to a timeout of 2 character times (for example 22 x bit duration) must be programmed in the RTO register. when the receive line is idle for this duration, after the last stop bit is received, an interrupt is generated, informing the software that the current block reception is completed. "

I am running a UART at 115200 baud rate. According to my calculations, one bit duration at this BR is 86 micro seconds (1/115200). To generate an interrupt after 3 sec of no data, I put the value of "34833" in the Receiver timeout register (USART_RTOR).

I sent one char to my uart but the RTO interrupt triggered almost immediately instead of a delay of approx 3 seconds.

Am I doing the calculation wrong? I want to basically generate an interrupt after 3.5 char time of silence but my test so far hasn't helped me understand this feature.

Any help would be appreciated.

10 REPLIES 10

0693W00000FDMbFQAX.pngJW