
M0A21/M0A23 Series
May 06, 2022
Page
424
of 746
Rev 1.02
M0
A21
/M
0
A
2
3
SE
RIES
TEC
H
NICAL
RE
FEREN
C
E
M
ANUAL
Baud rate is 4800, UART peripheral clock is 32.768 kHz
6.827 peripheral clock/bit
if the baud divider is set as 5 (7 peripheral clock/bit), the inaccuracy of each bit is 0.173 peripheral clock
and BRCOMPDEC (UART_BRCOMP[31]) = 1, so that the BRCOMP (UART_BRCOMP[8:0]) can be set
as 9’b010000010 = 0x82.
Bit
Name
Total INACCURACY
BRCOMP
Compensated
Final Inaccuracy
0
Start
0.173
x
0.173
1
UART_DAT[0]
0.346(0.173+0.173)
0
0.346
2
UART_DAT[1]
0.519(0.346+0.173)
1
-0.481
3
UART_DAT[2]
-0.308(-0.481+0.173)
0
-0.308
4
UART_DAT[3]
-0.135(-0.308+0.173)
0
-0.135
5
UART_DAT[4]
-0.038(-0.135+0.173)
0
0.038
6
UART_DAT[5]
0.211(0.038+0.173)
0
0.211
7
UART_DAT[6]
0.384(0.211+0.173)
0
0.384
8
UART_DAT[7]
0.557(0.384+0.173)
1
-0.443
9
Parity
-0.270(-0.443+0.173)
0
-0.270
Table 6.11-8 Baud Rate Compensation Example Table 2
UART Controller Auto-Baud Rate Function Mode
Auto-Baud Rate function can measure baud rate of receiving data from UART RX pin automatically.
When the Auto-Baud Rate measurement is finished, the measuring baud rate is loaded to BRD
(UART_BAUD[15:0]). Both of the BAUDM1 (UART_BAUD[29]) and BAUDM0 (UART_BAUD[28]) are
set to 1 automatically. UART RX data from Start bit to 1st rising edge time is set by 2
ABRDBITS
bit time in
Auto-Baud Rate function detection frame.
The 2
ABRDBITS
bit time from Start bit to the 1st rising edge is calculated by setting ABRDBITS
(UART_ALTCTL[20:19]). Setting ABRDEN (UART_ALTCTL[18]) is to enable auto-baud rate function.
In beginning stage, the UART RX is kept at 1. Once falling edge is detected, START bit is received. The
auto-baud rate counter is reset and starts counting. The auto-baud rate counter will be stop when the
1
st
rising edge is detected. Then, auto-baud rate counter value divided by ABRDBITS
(UART_ALTCTL[20:19]) is loaded to BRD (UART_BAUD[15:0]) automatically. ABRDEN
(UART_ALTCTL[18]) is cleared. The Auto-Baud is shown in Figure 6.11-3. Once the auto-baud rate
measurement is finished, the ABRDIF (UART_FIFOSTS[1]) is set. When auto-baud rate counter is
overflow, ABRDTOIF (UART_FIFOSTS[2]) is set. If ABRDIF (UART_FIFOSTS[1]) or ABRDTOIF
(UART_FIFOSTS[2]) is set, the auto-baud rate flag ABRIF (UART_ALTCTL[17]) is generated. If
ABRIEN (UART_INTEN[18]) is enabled, the auto-baud rate interrupt ABRINT (UART_INTSTS[31]) is
generated when ABRIF (UART_ALTCTL[17]) is set.