
Universal synchronous asynchronous receiver transmitter (USART)
RM0008
770/1096
Doc ID 13902 Rev 12
The RXNE flag is set after every byte received. An overrun error occurs if RXNE flag is set
when the next data is received or the previous DMA request has not been serviced. When
an overrun error occurs:
●
The ORE bit is set.
●
The RDR content will not be lost. The previous data is available when a read to
USART_DR is performed.
●
The shift register will be overwritten. After that point, any data received during overrun
is lost.
●
An interrupt is generated if either the RXNEIE bit is set or both the EIE and DMAR bits
are set.
●
The ORE bit is reset by a read to the USART_SR register followed by a USART_DR
register read operation.
Note:
The ORE bit, when set, indicates that at least 1 data has been lost. There are two
possibilities:
●
if RXNE=1, then the last valid data is stored in the receive register RDR and can be
read,
●
if RXNE=0, then it means that the last valid data has already been read and thus there
is nothing to be read in the RDR. This case can occur when the last valid data is read in
the RDR at the same time as the new (and lost) data is received. It may also occur
when the new data is received during the reading sequence (between the USART_SR
register read access and the USART_DR read access).
Noise error
Over-sampling techniques are used (except in synchronous mode) for data recovery by
discriminating between valid incoming data and noise.
Figure 282. Data sampling for noise detection
RX LINE
Sample
clock
1
2
3
4
5
6
7
8
9
10
11 12
13
14
15
16
sampled values
One bit time
6/16
7/16
7/16