Universal asynchronous receiver transmitter (UART) RM0016
320/449 Doc ID 14587 Rev 8
When noise is detected in a frame:
● The NF is set at the rising edge of the RXNE bit.
● The invalid data is transferred from the Shift register to the UART_DR register.
This bit rises at the same time as the RXNE bit which generates an interrupt. The NF bit is
reset by a UART_SR register read operation followed by a UART_DR register read
operation.
Framing error
A framing error is detected when:
The stop bit is not recognized on reception at the expected time, following either a de-
synchronization or excessive noise.
When the framing error is detected:
● The FE bit is set by hardware
● The invalid data is transferred from the Shift register to the UART_DR register.
● No interrupt is generated in case of single byte communication. However, this bit rises
at the same time as the RXNE bit which itself generates an interrupt.
The FE bit is reset by a UART_SR register read operation followed by a UART_DR register
read operation.
Configurable stop bits during reception:
The number of stop bits to be received can be configured through the control bits of Control
Register 3 - it can be either 1 or 2 in normal mode, 1 in IrDA mode and 1.5 in Smartcard
mode.
1. 1 Stop Bit
: Sampling for 1 stop Bit is done on the 8th, 9th and 10th samples.
2. 1.5
Stop Bits (Smartcard mode only): Sampling for 1.5 stop bits is done on the
16th,17th and 18th samples. An NACK signal received from the Smartcard forces the
data signal low during the sampling, flagged as a framing error. Then, the FE flag is set
with the RXNE at the end of the 1.5 stop bit.
3. 2 Stop Bits
: Sampling for 2 stop bits is done on the 8th, 9th and 10th samples of the
first stop bit.If a framing error is detected during the first stop bit the framing error flag
will be set. The second stop bit is not checked for framing error. The RXNE flag will be
set at the end of the first stop bit.
Table 53. Noise detection from sampled data
Sampled value NF status Received bit value Data validity
000 0 0 Valid
001 1 0 Not Valid
010 1 0 Not Valid
011 1 1 Not Valid
100 1 0 Not Valid
101 1 1 Not Valid
110 1 1 Not Valid
111 0 1 Valid