Universal synchronous asynchronous receiver
transmitter
USART
0x0
0x400
registers
SR
SR
Status register
0x0
0x20
0x00C00000
#ifndef __USART_ASYNCHRONOUS_ONLY
CTS
CTS flag
9
1
read-write
#endif
LBD
LIN break detection flag
8
1
read-write
TXE
Transmit data register
empty
7
1
read-only
TC
Transmission complete
6
1
read-write
RXNE
Read data register not
empty
5
1
read-write
IDLE
IDLE line detected
4
1
read-only
ORE
Overrun error
3
1
read-only
NF
Noise detected flag
2
1
read-only
FE
Framing error
1
1
read-only
PE
Parity error
0
1
read-only
DR
DR
Data register
0x4
0x20
read-write
0x00000000
DR
Data value
0
9
0
511
BRR
BRR
Baud rate register
0x8
0x20
read-write
0x0000
DIV_Mantissa
mantissa of USARTDIV
4
12
DIV_Fraction
fraction of USARTDIV
0
4
CR1
CR1
Control register 1
0xC
0x20
read-write
0x0000
OVER8
Oversampling mode
15
1
UE
USART enable
13
1
M
Word length
12
1
WAKE
Wakeup method
11
1
PCE
Parity control enable
10
1
PS
Parity selection
9
1
PEIE
PE interrupt enable
8
1
TXEIE
TXE interrupt enable
7
1
TCIE
Transmission complete interrupt
enable
6
1
RXNEIE
RXNE interrupt enable
5
1
IDLEIE
IDLE interrupt enable
4
1
TE
Transmitter enable
3
1
RE
Receiver enable
2
1
RWU
Receiver wakeup
1
1
SBK
Send break
0
1
CR2
CR2
Control register 2
0x10
0x20
read-write
0x0000
LINEN
LIN mode enable
14
1
STOP
STOP bits
12
2
#ifndef __USART_ASYNCHRONOUS_ONLY
CLKEN
Clock enable
11
1
CPOL
Clock polarity
10
1
CPHA
Clock phase
9
1
LBCL
Last bit clock pulse
8
1
#endif
LBDIE
LIN break detection interrupt
enable
6
1
LBDL
lin break detection length
5
1
ADD
Address of the USART node
0
4
CR3
CR3
Control register 3
0x14
0x20
read-write
0x0000
ONEBIT
One sample bit method
enable
11
1
#ifndef __USART_ASYNCHRONOUS_ONLY
CTSIE
CTS interrupt enable
10
1
CTSE
CTS enable
9
1
RTSE
RTS enable
8
1
#endif
DMAT
DMA enable transmitter
7
1
DMAR
DMA enable receiver
6
1
#ifndef __USART_ASYNCHRONOUS_ONLY
SCEN
Smartcard mode enable
5
1
NACK
Smartcard NACK enable
4
1
#endif
HDSEL
Half-duplex selection
3
1
IRLP
IrDA low-power
2
1
IREN
IrDA mode enable
1
1
EIE
Error interrupt enable
0
1
#ifndef __USART_ASYNCHRONOUS_ONLY
GTPR
GTPR
Guard time and prescaler
register
0x18
0x20
read-write
0x0000
GT
Guard time value
8
8
PSC
Prescaler value
0
8
#endif
# undef __USART_ASYNCHRONOUS_ONLY