cancel
Showing results for 
Search instead for 
Did you mean: 

USART/UART question - how long does a comm line have to idle before the idle line condition/interrupt occurs?

GJohn
Associate II
 
3 REPLIES 3

From RM0377 (for example..):

An Idle character is interpreted as an entire frame of “1�?s (the number of “1�?s includes the number of stop bits).

AvaTar
Lead

I vaguely remember some parts (a F05x) have an idle timer associated with a UART, thus having a more configurable timeout.

That would be useful e.g. for Modbus RTU with timing-based protocol specifications.

You are right. It's a bit different from the default idle line detection with its IDLE interrupt though, as it's a different feature with a separate interrupt (RTOF - Receiver Timeout). From the same RM0377:

Modbus/RTU [click "Show More"]

In this mode, the end of one block is recognized by a “silence�? (idle line) for more than 2 character times. This function is implemented through the programmable timeout function.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.