
CHAPTER 14 SERIAL INTERFACE UART6
User’s Manual U19780EJ2V0UD
397
(2) Error of baud rate
The baud rate error can be calculated by the following expression.
•
Error (%) =
−
1
×
100 [%]
Cautions 1. Keep the baud rate error during transmission to within the permissible error range at the
reception destination.
2. Make sure that the baud rate error during reception satisfies the range shown in (4)
Permissible baud rate range during reception.
Example:
Frequency of base clock = 10 MHz = 10,000,000 Hz
Set value of MDL67 to MDL60 bits of BRGC6 register = 00100001B (k = 33)
Target baud rate = 153600 bps
Baud rate = 10 M / (2
×
33)
= 10000000 / (2
×
33) = 151,515 [bps]
Error
=
(151515/153600
−
1)
×
100
=
−
1.357 [%]
(3) Example of setting baud rate
Table 14-5. Set Data of Baud Rate Generator
f
PRS
= 2.0 MHz
f
PRS
= 5.0 MHz
f
PRS
= 10.0 MHz
f
PRS
= 20.0 MHz
Baud
Rate
[bps]
TPS63-
TPS60
k
Calculated
Value
ERR
[%]
TPS63-
TPS60
k
Calculated
Value
ERR
[%]
TPS63-
TPS60
k
Calculated
Value
ERR
[%]
TPS63-
TPS60
k
Calculated
Value
ERR
[%]
300 8H 13 301 0.16 7H 65 301 0.16 8H 65 301 0.16 9H 65 301 0.16
600 7H 13 601 0.16 6H 65 601 0.16 7H 65 601 0.16 8H 65 601 0.16
1200 6H 13 1202 0.16 5H 65 1202 0.16 6H 65 1202 0.16 7H 65 1202 0.16
2400 5H 13 2404 0.16 4H 65 2404 0.16 5H 65 2404 0.16 6H 65 2404 0.16
4800 4H 13 4808 0.16 3H 65 4808 0.16 4H 65 4808 0.16 5H 65 4808 0.16
9600 3H 13 9615 0.16 2H 65 9615 0.16 3H 65 9615 0.16 4H 65 9615 0.16
19200 2H 13 19231 0.16 1H 65 19231 0.16 2H 65 19231 0.16 3H 65 19231 0.16
24000 1H 21 23810
−
0.79 3H 13 24038 0.16 4H 13 24038 0.16 5H 13 24038 0.16
31250 1H 16 31250 0 4H 5 31250 0 5H 5 31250 0 6H 5 31250 0
38400 1H 13 38462 0.16 0H 65 38462 0.16 1H 65 38462 0.16 2H 65 38462 0.16
48000 0H 21 47619
−
0.79 2H 13 48077 0.16 3H 13 48077 0.16 4H 13 48077 0.16
76800 0H 13 76923 0.16 0H 33 75758
−
1.36
0H 65 76923 0.16 1H 65 76923 0.16
115200 0H 9 111111
−
3.55 1H 11 113636
−
1.36
0H 43 116279
0.94 0H 87
114943
−
0.22
153600
−
−
−
−
1H 8
156250
1.73 0H 33
151515
−
1.36 1H 33 151515
−
1.36
312500
−
−
−
−
0H 8
312500 0 1H 8 312500 0 2H 8
312500
0
625000
−
−
−
−
0H 4
625000 0 1H 4 625000 0 2H 4
625000
0
Remark
TPS63 to TPS60: Bits 3 to 0 of clock selection register 6 (CKSR6) (setting of base clock (f
XCLK6
))
k:
Value set by MDL67 to MDL60 bits of baud rate generator control register 6
(BRGC6) (k = 4, 5, 6, ..., 255)
f
PRS
:
Peripheral hardware clock frequency
ERR:
Baud rate error
Actual baud rate (baud rate with error)
Desired baud rate (correct baud rate)