
Low-power universal asynchronous receiver transmitter (LPUART)
RM0453
1216/1454
RM0453 Rev 2
Alternatively, interrupts can be generated and data can be read from RXFIFO
when the RXFIFO threshold is reached. In this case, the CPU can read a block of
data defined by the programmed threshold.
Break character
When a break character is received, the LPUART handles it as a framing error.
Idle character
When an idle frame is detected, it is handled in the same way as a data character reception
except that an interrupt is generated if the IDLEIE bit is set.
Overrun error
•
FIFO mode disabled
An overrun error occurs when a character is received when RXNE has not been reset.
Data can not be transferred from the shift register to the RDR register until the RXNE
bit is cleared. 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 is not lost. The previous data is available when a read to
LPUART_RDR is performed.;
–
the shift register is overwritten. After that, any data received during overrun is lost.
–
an interrupt is generated if either the RXNEIE bit or EIE bit is set.
•
FIFO mode enabled
An overrun error occurs when the shift register is ready to be transferred when the
receive FIFO is full.
Data can not be transferred from the shift register to the LPUART_RDR register until
there is one free location in the RXFIFO. The RXFNE flag is set when the RXFIFO is
not empty.
An overrun error occurs if the RXFIFO is full and the shift register is ready to be
transferred. When an overrun error occurs:
–
the ORE bit is set;
–
the first entry in the RXFIFO is not lost. It is available when a read to
LPUART_RDR is performed.
–
the shift register is overwritten. After that, any data received during overrun is lost.
–
an interrupt is generated if either the RXFNEIE bit or EIE bit is set.
The ORE bit is reset by setting the ORECF bit in the ICR register.
Note:
The ORE bit, when set, indicates that at least 1 data has been lost. T
When the FIFO mode is disabled, 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 the last valid data has already been read and there is nothing left 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.