Skip to main content
JulienD
Associate III
May 23, 2024
Solved

Uart : what is the difference between IDLE and RTO interrupts

  • May 23, 2024
  • 2 replies
  • 4600 views

Hello,

 

Can I say that "IDLE" is equivalent to "RTO with 8-10 bits (depending on framing)"?

Or are there some other subtle differences?

 

My goal is to transfer received data with DMA and start interpretation of the data when nothing is received on the line which, in my application's world, is equivalent to an end of frame.

 

Thanks

Julien

 

Best answer by Muhammed Güler

 There is a good explanation here

https://github.com/MaJerle/stm32-usart-uart-dma-rx-tx

2 replies

Muhammed Güler
Muhammed GülerBest answer
Senior III
May 23, 2024
JulienD
JulienDAuthor
Associate III
May 27, 2024

Thanks for your answer, it's exactly what my experiments lead me to understand.

Delay is the only difference between RTO and IDLE.

Pavel A.
Super User
May 27, 2024

No, delay is not the only difference between RTO and IDLE.

The IDLE condition occurs when the UART receives the "idle frame". So when the RX line is silent and IDLEIE set, the UART will continuously generate IDLE interrupts. RTO timeout starts counting after at least one data byte is received (after its stop bit TL;DR); it won't occur just when RX line is silent. Easier to manage. This is the behavior you actually want (and the reason why this feature exists at all).

The IDLE detection serves also another purpose, to wait for opportunity to transmit when multiple devices share the comm line or wait until noise disappears.

Pavel A.
Super User
May 24, 2024

Short answer: RTO is what you want to use. IDLE is what you don't want, if RTO is available.