STMicroelectronics STM32WLEx Reference Manual page 1033

Advanced arm-based 32-bit mcus with sub-ghz radio solution
Table of Contents

Advertisement

RM0461
Configurable stop bits during reception
The number of stop bits to be received can be configured through the control bits of
USART_CR: it can be either 1 or 2 in normal mode and 0.5 or 1.5 in Smartcard mode.
0.5 stop bit (reception in Smartcard mode): no sampling is done for 0.5 stop bit. As a
consequence, no framing error and no break frame can be detected when 0.5 stop bit
is selected.
1 stop bit: sampling for 1 stop bit is done on the 8th, 9th and 10th samples.
1.5 stop bits (Smartcard mode)
When transmitting in Smartcard mode, the device must check that the data are
correctly sent. The receiver block must consequently be enabled (RE = 1 in
USART_CR1) and the stop bit is checked to test if the Smartcard has detected a parity
error.
In the event of a parity error, the Smartcard forces the data signal low during the
sampling (NACK signal), which is flagged as a framing error. The FE flag is then set
through RXNE flag (RXFNE if the FIFO mode is enabled) at the end of the 1.5 stop bit.
Sampling for 1.5 stop bits is done on the 16th, 17th and 18th samples (1 baud clock
period after the beginning of the stop bit). The 1.5 stop bit can be broken into 2 parts:
one 0.5 baud clock period during which nothing happens, followed by 1 normal stop bit
period during which sampling occurs halfway through (refer to
receiver timeout on page 1048
2 stop bits
Sampling for 2 stop bits is done on the 8th, 9th and 10th samples of the first stop bit.
The framing error flag is set if a framing error is detected during the first stop bit.
The second stop bit is not checked for framing error. The RXNE flag (RXFNE if the
FIFO mode is enabled) is set at the end of the first stop bit.
33.5.7
USART baud rate generation
The baud rate for the receiver and transmitter (Rx and Tx) are both set to the value
programmed in the USART_BRR register.
Equation 1: baud rate for standard USART (SPI mode included) (OVER8 = '0' or '1')
In case of oversampling by 16, the baud rate is given by the following formula:
In case of oversampling by 8, the baud rate is given by the following formula:
Equation 2: baud rate in Smartcard, LIN and IrDA modes (OVER8 = 0)
The baud rate is given by the following formula:
Universal synchronous/asynchronous receiver transmitter (USART/UART)
Tx/Rx baud
Tx/Rx baud
Tx/Rx baud
RM0461 Rev 5
for more details).
usart_ker_ckpres
=
-----------------------------------------------
USARTDIV
2
×
usart_ker_ckpres
=
--------------------------------------------------------- -
USARTDIV
usart_ker_ckpres
=
-----------------------------------------------
USARTDIV
Section 33.5.16: USART
1033/1306
1154

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the STM32WLEx and is the answer not in the manual?

Questions and answers

Table of Contents