Nations Technologies Inc.
Tel
:
+86-755-86309900
:
Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North.
Nanshan District, Shenzhen, 518057, P.R.China
464
/
631
10
3375
impossible
impossible
impossible
3375
1
0%
Notes: The lower the clock frequency of the CPU, the lower the error for a particular baud rate.
Receiver’s tolerance clock deviation
Variations due to transmitter errors (including transmitter side oscillator variations), receiver side baud rate rounding
errors, receiver side oscillator variations, variations due to transmission lines (usually due to The inconsistency
between the low-to-high transition timing of the transceiver and the high-to-low transition timing of the transceiver),
these factors will affect the overall clock system variation. Only when the sum of the above four changes is less than
the tolerance of the USART receiver, the USART asynchronous receiver can work normally.
When receiving data normally, the tolerance of the USART receiver depends on the selection of the data bit length
and whether it is generated using a fractional baud rate. The tolerance of the USART receiver is equal to the maximum
tolerable variation.
Table 22-4 When DIV_Decimal = 0. Tolerance of USART receiver
WL bit
NF is an error
NF is don’t care
0
3.75%
4.375%
1
3.41%
3.97%
Table 22-5 When DIV_Decimal != 0. Tolerance of USART receiver
WL bit
NF is an error
NF is don’t care
0
3.33%
3.88%
1
3.03%
3.53%
Parity control
Parity can be enabled by configuring the USART_CTRL1.PCEN bit.
When the parity bit is enabled for transmission, A parity bit is generated, parity check is performed on reception.
Table 22-6 Frame format
WL bit
PCEN bit
USART frame
0
0
| Start bit | 8-bit data | Stop bit |
0
1
| Start bit | 7 bits of data | Parity bit | Stop bit |
1
0
| Start bit | 9-bit data | Stop bit |
1
1
| start bit | 8-bit data | parity bit | stop bit |
Even parity
Configure USART_CTRL1.PSEL to 0, and even parity can be selected.
Make the number of '1' in the transmitted data (including
parity bit
) be an even number. That is: if Data=11000101,
there are 4 '1's, then the
parity bit
will be '0' (4 '1' in total). After the data and check digit are sent to the receiver, the
receiver calculates the number of 1s in the data again. If it is an even number, the check is passed, indicating that no