© Koninklijke Philips Electronics N.V. 2006. All rights reserved.
User manual
Rev. 01 — 12 January 2006
86
Philips Semiconductors
UM10161
Volume 1
Chapter 9: UART0
If the U0FDR register value does not comply to these two requests then the fractional
divider output is undefined. If DIVADDVAL is zero then the fractional divider is disabled
and the clock will not be divided.
The value of the U0FDR should not be modified while transmitting/receiving data or data
may be lost or corrupted.
Usage Note:
For practical purposes, UART0 baudrate formula can be written in a way
that identifies the part of a UART baudrate generated without the fractional baudrate
generator, and the correction factor that this module adds:
(2)
Based on this representation, fractional baudrate generator contribution can also be
described as a prescaling with a factor of MULVAL / ( DIVADDVAL).
9.3.5 UART0
baudrate
calculation
Example 1:
Using UART0baudrate formula from above, it can be determined that system
with PCLK = 20 MHz, U0DL = 130 (U0DLM = 0x00 and U0DLL = 0x82), DIVADDVAL = 0
and MULVAL = 1 will enable UART0 with UART0baudrate = 9615 bauds.
Example 2:
Using UART0baudrate formula from above, it can be determined that system
with PCLK = 20 MHz, U0DL = 93 (U0DLM = 0x00 and U0DLL = 0x5D), DIVADDVAL = 2
and MULVAL = 5 will enable UART0 with UART0baudrate = 9600 bauds.
UART0
baudrate
PCLK
16
16
U0DLM
×
U0DLL
+
(
)
×
-----------------------------------------------------------------------------
MulVal
MulVal
DivAddVal
+
(
)
------------------------------------------------------------
×
=
Table 87:
Baudrates available when using 20 MHz peripheral clock (PCLK = 20 MHz)
Desired
baudrate
MULVAL = 0 DIVADDVAL = 0
Optimal MULVAL & DIVADDVAL
U0DLM:U0DLL
% error
U0DLM:U0DLL
dec
Fractional
pre-scaler value
MULDIV
DIVADDVAL
% error
hex
50
61A8
25000
0.0000
25000
1/(1+0)
0.0000
75
411B
16667
0.0020
12500
3/(3+1)
0.0000
110
2C64
11364
0.0032
6250
11/(11+9)
0.0000
134.5
244E
9294
0.0034
3983
3/(3+4)
0.0001
150
208D
8333
0.0040
6250
3/(3+1)
0.0000
300
1047
4167
0.0080
3125
3/(3+1)
0.0000
600
0823
2083
0.0160
1250
3/(3+2)
0.0000
1200
0412
1042
0.0320
625
3/(3+2)
0.0000
1800
02B6
694
0.0640
625
9/(9+1)
0.0000
2000
0271
625
0.0000
625
1/(1+0)
0.0000
2400
0209
521
0.0320
250
12/(12+13)
0.0000
3600
015B
347
0.0640
248
5/(5+2)
0.0064
4800
0104
260
0.1600
125
12/(12+13)
0.0000