![Geehy SEMICONDUCTOR APM32F405 Series Скачать руководство пользователя страница 318](http://html1.mh-extra.com/html/geehy-semiconductor/apm32f405-series/apm32f405-series_user-manual_573630318.webp)
www.geehy.com Page 317
Table 89 Frame Format
DBLCFG bit
PCEN bit
USART data frame
0
0
Start bit+8-bit data+stop bit
0
1
Start bit+7-bit data+odd-even parity check bit+stop bit
1
0
Start bit+9-bit data+stop bit
1
1
Start bit+8-bit data+odd-even parity check bit+stop bit
Configurable stop bit
Four different stop bits can be configured through STOPCFG bit of
USART_CTRL2 register.
1 stop bits: Default stop bit.
0.5 stop bits: Used when receiving data in smart card mode.
2 stop bits: Used in normal mode, single-line mode and hardware flow
control mode.
1.5 stop bits: Used when transmitting and receiving data in smart card
mode.
Check bit
PCFG bit of USART_CTRL1 determines the parity check bit; when PCFG=0, it
is even parity check, on the contrary, it is odd parity check.
Even check: When the number of frame data and check bit 1 is even,
the even check bit is 0; otherwise it is 1.
Odd check: When the number of frame data and check bit 1 is even,
the odd check bit is 1; otherwise it is 0.
Transmitter
When TXEN bit of the register USART_CTRL1 is set, the transmit shift register
will output data through TX pin and the corresponding clock pulses will be
output through CK pin.
Character transmitting
During transmitting period of USART, the least significant bit of the data will be
moved out by TX pin first. In this mode, USART_ DATA register has a buffer
between the internal bus and the transmitter shift register.
A data frame is composed of the start bit, character and stop bit, so there is a
low-level start bit in front of each character; then there is a high-level stop bits
the number of which is configurable.
Transmission configuration steps
Set UEN bit of USART_CTRL1 register to enable USART.