
Mini57
Apr. 06, 2017
Page 319 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
HCLK
Source
PCLK
Source
Expect
Baud Rate
CLKDIV
(UUART_BRGEN[25:16])
DSCNT
(UUART_BRGEN[14:10])
PDSCNT Active
Baud
Rate
Error
Percentage
HXT12M
12M
(HCLK)
115200
0xC
0x7
0x0
115384 1.6%
HIRC/2,
24M
24M
(HCLK)
9600
0xF9
0x9
0x0
9600
0%
HIRC48M 48M
(HCLK)
115200
0xC
0xF
0x1
115384 1.6%
Table 6.12-3 Baud rate Relationship
Note:
SPCLKSEL = 0x0, PTCLKSEL = 0, RCLKSEL = 0
6.12.5.7 Auto Baud Rate Detection
The UART controller supports auto baud rate detection function. It is used to identify the input
baud rate from the receiver signal (USCIx_DAT0) and then revised the baud rate clock divider
CLKDIV (UUART_BRGEN[25:16]) after the baud rate function done to meet the detected baud
rate information. According to the section of Timing Measurement Counter, the timing
measurement counter is used for time interval measurement of the input signal (USCIx_DAT0)
and the actual timer value is captured into bit field BRDETITV (UUART_PROTCTL [24:16]) in
each falling edge of the detected signal.
When the ABREN (PROTOCOL[6]) bit is enabled, the 0x55 data patterns is necessary for auto
baud rate detection. The falling edge of input signal starts the baud rate counter and it loads the
timing measurement counter value into the BRDETITV (UUART_PROTCTL [24:16]) in the next
falling edge. It is suggested to use the
f
DIV_CLK
(TMCNTSRC (UUART_BRGENC[5]) =1) as the
counter source.
The CLKDIV (UUART_BRGEN[25:16]) will be revised by BRDETITV (UUART_PROTCTL [25:16])
after the auto baud rate function done (the time of 4
th
falling edge of input signal). If the user want
to receive the next successive frame correctly, it is better to set the value of CLKDIV
(UUART_BRGEN[25:16]) and DSCNT (UUART_BRGEN[14:10]) as the same value (the value
shall be among the rang of 0xF and 0x5 because the DSCNT is used to define the sample
counter of each bit and the PDSCNT (UUART_BRGEN[9:8]) is 0x0.
During the auto baud rate detection, the ABRDETIF (UUART_PROTSTS[9]) and the BRDETITV
(UUART_PROTCTL [24:16]) will be updated after each falling edge of input signal and the auto
baud rate pattern, 0x55, won’t be received into the receiver buffer after the frame done. The bit of
ABREN will be cleared by hardware after the 4
th
falling edge of input signal is detected thus the
user can read the status of ABREN to know the auto baud rate function is done or not.
If the CLKDIV and DSCNT are not set as the same value in calculation the auto baud rate
function, the user shall calculate the proper average baud rate by the value of BRDETITV and
CLKDIV after the auto baud rate function done.
If the baud rate of input signal is very slow and the bit time of timing measurement counter
can’t
calculate the correct period of the input bit time, there is a ABERRSTS bit
(UUART_PROTSTS[11]) to indicate the error information of the auto baud rate detection. At this
time, the user shall revise the value of CLKDIV and require the Host device to send the 0x55
pattern again.
According to the limitation of timing measurement counter, the maximum auto baud rate detection