
Universal synchronous asynchronous receiver transmitter (USART)
RM0008
780/1096
Doc ID 13902 Rev 12
Note:
1
The CK pin works in conjunction with the TX pin. Thus, the clock is provided only if the
transmitter is enabled (TE=1) and a data is being transmitted (the data register USART_DR
has been written). This means that it is not possible to receive a synchronous data without
transmitting data.
2
The LBCL, CPOL and CPHA bits have to be selected when both the transmitter and the
receiver are disabled (TE=RE=0) to ensure that the clock pulses function correctly. These
bits should not be changed while the transmitter or the receiver is enabled.
3
It is advised that TE and RE are set in the same instruction in order to minimize the setup
and the hold time of the receiver.
4
The USART supports master mode only: it cannot receive or send data related to an input
clock (CK is always an output).
Figure 287. USART example of synchronous transmission
Figure 288. USART data clock timing diagram (M=0)
RX
TX
CK
USART
Data out
Data in
Synchronous device
Clock
(e.g. slave SPI)
M=0 (8 data bits)
Clock (CPOL=0, CPHA=1)
Clock (CPOL=1, CPHA=0)
Clock (CPOL=1, CPHA=1)
Start LSB
MSB Stop
* LBCL bit controls last data clock pulse
Start
Idle or preceding
transmission
Data on TX
Stop
Clock (CPOL=0, CPHA=0)
0
1
2
3
4
5
6
7
*
*
*
*
Idle or next
transmission
*
Capture Strobe
LSB
MSB
Data on RX
0
1
2
3
4
5
6
7
(from master)
(from slave)