
M0A21/M0A23 Series
May 06, 2022
Page
423
of 746
Rev 1.02
M0
A21
/M
0
A
2
3
SE
RIES
TEC
H
NICAL
RE
FEREN
C
E
M
ANUAL
460800
Not recommended
0x2D00_0000
0x3000_0018
230400
Not recommended
0x2D00_0002
0x3000_0032
115200
Not recommended
0x2D00_0006
0x3000_0066
57600
0x0000_000B
0x2D00_000E
0x3000_00CE
38400
0x0000_0012
0x2D00_0016
0x3000_0137
19200
0x0000_0025
0x2500_007B
0x3000_026F
9600
0x0000_004C
0x2A00_007B
0x3000_04E0
4800
0x0000_009A
0x2A00_00F8
0x3000_09C2
Table 6.11-6 UART Controller Baud Rate Register Setting Example Table
6.11.5.2 UART Controller Baud Rate Compensation
The UART controller supports baud rate compensation function. It is used to optimize the precision in
each bit. The precision of the compensation is half of UART module clock because there is
BRCOMPDEC (UART_BRCOMP[31]) to define the positive or negative compensation in each bit. If the
BRCOMPDEC (UART_BRCOMP[31]) = 0, it is positive compensation for each bit, one more module
clock will be appended in the compensated bit. If the BRCOMPDEC (UART_BRCOMP[31]) = 1, it is
negative compensation for each bit, decrease one module clock in the compensated bit.
There is 9-bit location, BRCOMP[8:0] (UART_BRCOMP[8:0]), can be configured by user to define the
relative bit is compensated or not. BRCOMP[7:0] is used to define the compensation of DAT
(UART_DAT[7:0]) and BRCOMP[8] is used to define PARITY (UART_DAT[8]).
Example:
1.
UART’s peripheral clock = 32.768 kHz and baud rate is 9600
Baud rate is 9600, UART peripheral clock is 32.768 kHz
3.413 peripheral clock/bit
if the baud divider is set as 1 (3 peripheral clock/bit), the inaccuracy of each bit is -0.413 peripheral clock
and BRCOMPDEC (UART_BRCOMP[31]) = 0, so that the BRCOMP (UART_BRCOMP[8:0]) can be set
as 9’b010100101 = 0xa5.
Bit
Name
Total INACCURACY
BRCOMP
Compensated
Final Inaccuracy
0
Start
-0.413
x
-0.413
1
UART_DAT[0]
-0.826(-0.413-0.413)
1
0.174
2
UART_DAT[1]
-0.239(0.174-0.413)
0
-0.239
3
UART_DAT[2]
-0.652(-0.239-0.413)
1
0.348
4
UART_DAT[3]
-0.065(0.348-0.413)
0
-0.065
5
UART_DAT[4]
-0.478(-0.065-0.413)
0
-0.478
6
UART_DAT[5]
-0.891(-0.478-0.413)
1
0.109
7
UART_DAT[6]
-0.304(0.109-0.413)
0
-0.304
8
UART_DAT[7]
-0.717(-0.304-0.413)
1
0.283
9
Parity
-0.130(0.283-0.413)
0
-0.13
Table 6.11-7 Baud Rate Compensation Example Table 1
2.
UART’s peripheral clock = 32.768 kHz and baud rate is 4800