Universal asynchronous receiver transmitter (UART) RM0016
314/449 Doc ID 14587 Rev 8
22.3.2 Transmitter
The transmitter can send data words of either 8 or 9 bits depending on the M bit status.
When the M bit is set, word length is 9 bits and the 9th bit (the MSB) has to be stored in the
T8 bit in the UART_CR1 register.
When the transmit enable bit (TEN) is set, the data in the transmit shift register is output on
the UART_TX pin and the corresponding clock pulses are output on the UART_CK pin.
Character transmission
During an UART transmission, data shifts out least significant bit first on the UART_TX pin.
In this mode, the UART_DR register consists of a buffer (TDR) between the internal bus and
the transmit shift register (see Figure 110).
Every character is preceded by a start bit which is a logic level low for one bit period. The
character is terminated by a configurable number of stop bits.
The following stop bits are supported by UART.
Note: 1 The TEN bit should not be reset during transmission of data.Resetting the TEN bit during
the transmission will corrupt the data on the UART_TX pin as the baud rate counters will get
frozen.The current data being transmitted will be lost.
2 An idle frame will be sent after the TEN bit is enabled.
Configurable stop bits
The number of stop bits to be transmitted with every character can be programmed in
Control register 3, bits 5,4.
● 1 stop bit: This is the default value of number of stop bits.
● 2 Stop bits: This is supported by normal mode UART.
● 1.5 Stop bits: To be used in Smartcard mode only.
An idle frame transmission will include the stop bits.
A break transmission consists of 10 low bits followed by the configured number of stop bits
(when m = 0) and 11 low bits followed by the configured number of stop bits (when m = 1). It
is not possible to transmit long breaks (break of length greater than 10/11 low bits).
Note: In LIN mode (see Section 22.3.8 on page 325), a standard 13-bit break is always generated.