Universal synchronous asynchronous receiver transmitter (USART)
25.7.2
Control register 2 (USART_CR2)
Address offset: 0x04
Reset value: 0x0000
31
30
29
ADD[7:4]
rw
rw
rw
15
14
13
SWAP
LINEN
STOP[1:0]
rw
rw
rw
Bits 31:28 ADD[7:4]: Address of the USART node
This bit-field gives the address of the USART node or a character code to be recognized.
This is used in multiprocessor communication during Mute mode or Stop mode, for wakeup with 7-
bit address mark detection. The MSB of the character sent by the transmitter should be equal to 1.
It may also be used for character detection during normal reception, Mute mode inactive (for
example, end of block detection in ModBus protocol). In this case, the whole received character (8-
bit) is compared to the ADD[7:0] value and CMF flag is set on match.
This bit field can only be written when reception is disabled (RE = 0) or the USART is disabled
(UE=0)
Bits 27:24 ADD[3:0]: Address of the USART node
This bit-field gives the address of the USART node or a character code to be recognized.
This is used in multiprocessor communication during Mute mode or Stop mode, for wakeup with
address mark detection.
This bit field can only be written when reception is disabled (RE = 0) or the USART is disabled
(UE=0)
Bit 23 RTOEN: Receiver timeout enable
This bit is set and cleared by software.
0: Receiver timeout feature disabled.
1: Receiver timeout feature enabled.
When this feature is enabled, the RTOF flag in the USART_ISR register is set if the RX line is idle
(no reception) for the duration programmed in the RTOR (receiver timeout register).
Note: If the USART does not support the Receiver timeout feature, this bit is reserved and forced by
hardware to '0'. Please refer to
Bits 22:21 ABRMOD[1:0]: Auto baud rate mode
These bits are set and cleared by software.
00: Measurement of the start bit is used to detect the baud rate.
01: Falling edge to falling edge measurement. (the received frame must start with a single bit = 1 ->
Frame = Start10xxxxxx)
10: Reserved.
11: Reserved
Note: If DATAINV=1 and/or MSBFIRST=1 the patterns must be the same on the line, for example
0xAA for MSBFIRST)
Note: If the USART does not support the auto baud rate feature, this bit is reserved and forced by
hardware to '0'. Please refer to
This bit field can only be written when ABREN = 0 or the USART is disabled (UE=0).
614/742
28
27
26
25
ADD[3:0]
rw
rw
rw
rw
12
11
10
9
CLKE
CPOL
CPHA
N
rw
rw
rw
rw
Doc ID 018940 Rev 1
24
23
22
21
RTOE
ABRMOD[1:0]
N
rw
rw
rw
rw
8
7
6
5
LBCL
SSM
LBDIE
LBDL
rw
rw
rw
rw
Section 25.4: USART implementation on page
Section 25.4: USART implementation on page
20
19
18
17
ABRE
MSBFI
DATAI
TXINV
N
RST
NV
rw
rw
rw
rw
4
3
2
ADDM
Res
Res
Res
7
rw
573.
573.
RM0091
16
RXINV
rw
1
0
Res
Need help?
Do you have a question about the STM32F05 series and is the answer not in the manual?
Questions and answers