GD32F20x User Manual
490
Figure 19-1. USART module block diagram
USART Data Register
CPU/DMA
R
W
IrDA
Block
TX
SW_RX
RX
CK Controller
Transmit
Shift
Register
Receive
Shift
Register
USART Control
Registers
CK
Transimit
Controller
Hardware
Flow
Controller
nRTS
nCTS
Receiver
Controller
USART
Address
Wakeup Unit
USART Guard Time
and Prescaler Register
USART Status Register
USART Interrupt
Controller
/USARTDIV
/16
USART Baud
Rate Register
PCLK
Transmitter
clock
Receiver
clock
19.3.1.
USART frame format
The USART frame starts with a start bit and ends up with a number of stop bits. The length
of the data frame is configured by the WL bit in the USART_CTL0 register. The last data bit
can be used as parity check bit by setting the PCEN bit of in USART_CTL0 register. When
the WL bit is reset, the parity bit is the 7th bit. When the WL bit is set, the parity bit is the 8th
bit. The method of calculating the parity bit is selected by the PM bit in USART_CTL0 register.
Figure 19-2. USART character frame (8 bits data and 1 stop bit)
Idle frame
Break frame
Stop
CLOCK
Data frame
Start
bit4
bit5
bit6
bit7
bit0
bit1
bit2
bit3
Start
Start
Stop
Start
or parity bit
In transmission and reception, the number of stop bits can be configured by the STB[1:0]
bits in the USART_CTL1 register.
Table 19-2. Stop bits configuration
STB[1:0]
stop bit length (bit)
usage description
00
1
default value
01
0.5
Smartcard mode for receiving
10
2
normal USART and single-wire modes
Summary of Contents for GD32F20 Series
Page 191: ...GD32F20x User Manual 191 Bits Fields Descriptions 31 0 TRNDATA 31 0 32 Bit Random data ...
Page 290: ...GD32F20x User Manual 290 conversion is ongoing ...
Page 325: ...GD32F20x User Manual 325 15 0 ALRM 15 0 RTC alarm value low ...
Page 385: ...GD32F20x User Manual 385 ...
Page 523: ...GD32F20x User Manual 523 clears AERR bit by writing 0 to it ...