
Mini57
Apr. 06, 2017
Page 318 of 475
Rev.1.00
MINI5
7
S
E
RI
E
S
TECH
NIC
A
L R
E
F
E
RE
N
CE
MA
N
UA
L
0
1
2
3
4
5
6
7
8
9
1
0
1
1
1
2
1
3
1
4
1
5
sample taken
Sample Time
Figure 6.12-4 UART Bit Timing (Data Sample Time)
6.12.5.6 Baud Rate Generation
The baud rate f
UART
in UART mode depends on the number of data sample time per bit time and
their timing. The baud rate setting should only be changed while the transmitter and the receiver
are idle. The bits RCLKSEL, SPCLKSEL, PDSCNT, and DSCNT define the baud rate setting:
RCLKSEL (UUART_BRGEN [0])
to define the input frequency f
REF_CLK
SPCLKSEL (UUART_BRGEN[3:2])
to define the multiple source of the sample clock f
SAMP_CLK
PDSCNT (UUART_BRGEN [9:8])
to define the length of a data sample time (division of f
REF_CLK
by 1, 2, 3, or 4)
DSCNT (UUART_BRGEN [14:10])
to define the number of data sample time per bit time
The standard setting is given by RCLKSEL = 0 (f
REF_CLK
= f
PCLK
), PTCLKSEL = 0 (f
PROT_CLK
=
f
REF_CLK
) and SPCLKSEL = 0x0 (f
SAMP_CLK
= f
DIV_CLK
). Under these conditions, the baud rate is
given by:
To generate slower frequencies, additional divide-by-2 stages can be selected by PTCLKSEL = 1
(f
PROT_CLK
= f
REF_CLK2
), leading to:
If SPCLKSEL = 0x2 (fSAMP_CLK = f
SCLK
), and RCLKSEL = 0 (fREF_CLK = f
PCLK
), PTCLKSEL =
0 (f
PROT_CLK
= f
REF_CLK
). The baud rate is given by:
There is error tolerance for the UART baud rate after setting the baud rate parameter. Table
6.12-3 lists the relative error percentage examples for user to calculate his relative baud rate
setting.