USART: ORE=1, but RXNE=0?
Posted on September 13, 2011 at 09:10
Sometimes my code gets lost in usart1 interrupt flood.
Registers:
CR1: 0x202c (UE, RXNEIE, TE, RE)
CR2 = 0, CR3 = 0
SR: 0x1d8 (LBD, TXE, TC, IDLE, ORE)
I'm not quite getting it how ORE can be set and RXNE not. The only thing that comes to mind is that ORE gets set between reading SR (RXNE=1, ORE=0), and reading DR.
But how is ORE supposed to be cleared if DR is empty then? Read SR then read (the empty!) DR?
# worst-forum-software-ever
