16.3.2.3 Clock Generation
The USART clock defines the transmission and reception data rate. When operating in asynchronous mode, the baud rate (bit-rate) is
given by
Figure 16.3 USART Baud Rate on page 453
br = f
HFPERCLK
/(oversample x (1 + USARTn_CLKDIV/256))
Figure 16.3. USART Baud Rate
where f
HFPERCLK
is the peripheral clock (HFPERCLK
USARTn
) frequency and oversample is the oversampling rate as defined by OVS in
USARTn_CTRL, see
Table 16.6 USART Oversampling on page 453
.
Table 16.6. USART Oversampling
OVS [1:0]
oversample
00
16
01
8
10
6
11
4
The USART has a fractional clock divider to allow the USART clock to be controlled more accurately than what is possible with a stand-
ard integral divider.
The clock divider used in the USART is a 20-bit value, with a 15-bit integral part and an 5-bit fractional part. The fractional part is config-
ured in the lower 5 bits of DIV in USART_CLKDIV. The lowest achievable baud rate at 32 MHz is about 61 bauds/sec.
Fractional clock division is implemented by distributing the selected fraction over thirty two baud periods. The fractional part of the divid-
er tells how many of these periods should be extended by one peripheral clock cycle.
Given a desired baud rate brdesired, the clock divider USARTn_CLKDIV can be calculated by using
Figure 16.4 USART Desired Baud
:
USARTn_CLKDIV = 256 x (f
HFPERCLK
/(oversample x brdesired) - 1)
Figure 16.4. USART Desired Baud Rate
Table 16.7 USART Baud Rates @ 4MHz Peripheral Clock with 20 bit CLKDIV on page 453
shows a set of desired baud rates and how
accurately the USART is able to generate these baud rates when running at a 4 MHz peripheral clock, using 16x or 8x oversampling.
Table 16.7. USART Baud Rates @ 4MHz Peripheral Clock with 20 bit CLKDIV
Desired baud
rate [baud/s]
USARTn_OVS =00
USARTn_OVS =01
USARTn_CLKDIV/256
(to 32nd position)
Actual baud rate
[baud/s]
Error %
USARTn_CLKDIV/256
(to 32nd position)
Actual baud rate
[baud/s]
Error %
600
415,6563
600,015
0,003
832,3438
599,9925
-0,001
1200
207,3438
1199,94
-0,005
415,6563
1200,03
0,003
2400
103,1563
2400,24
0,010
207,3438
2399,88
-0,005
4800
51,09375
4799,04
-0,020
103,1563
4800,48
0,010
9600
25,03125
9603,842
0,040
51,09375
9598,08
-0,020
14400
16,375
14388,49
-0,080
33,71875
14401,44
0,010
19200
12,03125
19184,65
-0,080
25,03125
19207,68
0,040
28800
7,6875
28776,98
-0,080
16,375
28776,98
-0,080
38400
5,5
38461,54
0,160
12,03125
38369,3
-0,080
EFM32JG1 Reference Manual
USART - Universal Synchronous Asynchronous Receiver/Transmitter
silabs.com
| Smart. Connected. Energy-friendly.
Preliminary Rev. 0.6 | 453