742
SAM4CP [DATASHEET]
43051E–ATPL–08/14
36.6.1.1 Baud Rate in Asynchronous Mode
If the USART is programmed to operate in asynchronous mode, the selected clock is first divided by CD, which is field
programmed in the US_BRGR. The resulting clock is provided to the receiver as a sampling clock and then divided by 16
or 8, depending on how the OVER bit in the US_MR is programmed.
If OVER is set, the receiver sampling is 8 times higher than the baud rate clock. If OVER is cleared, the sampling is
performed at 16 times the baud rate clock.
The baud rate is calculated as per the following formula:
This gives a maximum baud rate of Peripheral Clock divided by 8, assuming that Peripheral Clock is the highest possible
clock and that the OVER bit is set.
Baud Rate Calculation Example
Table 36-4
shows calculations of CD to obtain a baud rate at 38400 bit/s for different source clock frequencies. This table
also shows the actual resulting baud rate and the error.
The baud rate is calculated with the following formula:
The baud rate error is calculated with the following formula. It is not recommended to work with an error higher than 5%.
Baudrate
8 2
Over
–
CD
SelectedClock
=
Table 36-4.
Baud Rate Example (OVER = 0)
Source Clock
(Hz)
Expected Baud Rate
(Bit/s)
Calculation Result
CD
Actual Baud Rate
(Bit/s)
Error
3 686 400
38 400
6.00
6
38 400.00
0.00%
4 915 200
38 400
8.00
8
38 400.00
0.00%
5 000 000
38 400
8.14
8
39 062.50
1.70%
7 372 800
38 400
12.00
12
38 400.00
0.00%
8 000 000
38 400
13.02
13
38 461.54
0.16%
12 000 000
38 400
19.53
20
37 500.00
2.40%
12 288 000
38 400
20.00
20
38 400.00
0.00%
14 318 180
38 400
23.30
23
38 908.10
1.31%
14 745 600
38 400
24.00
24
38 400.00
0.00%
18 432 000
38 400
30.00
30
38 400.00
0.00%
24 000 000
38 400
39.06
39
38 461.54
0.16%
24 576 000
38 400
40.00
40
38 400.00
0.00%
25 000 000
38 400
40.69
40
38 109.76
0.76%
32 000 000
38 400
52.08
52
38 461.54
0.16%
32 768 000
38 400
53.33
53
38 641.51
0.63%
33 000 000
38 400
53.71
54
38 194.44
0.54%
40 000 000
38 400
65.10
65
38 461.54
0.16%
50 000 000
38 400
81.38
81
38 580.25
0.47%
BaudRate
fperiperalclock
CD
16
=
Error
1
ActualBaudRate
ExpectedBaudRate
–
=