UM10429
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2010. All rights reserved.
User manual
Rev. 1 — 20 October 2010
83 of 258
NXP Semiconductors
UM10429
Chapter 10: LPC1102 Universal Asynchronous Transmitter (UART)
This register controls the clock pre-scaler for the baud rate generation. The reset value of
the register keeps the fractional capabilities of UART disabled making sure that UART is
fully software and hardware compatible with UARTs not equipped with this feature.
The UART baud rate can be calculated as:
(3)
Where UART_PCLK is the peripheral clock, U0DLM and U0DLL are the standard UART
baud rate divider registers, and DIVADDVAL and MULVAL are UART fractional baud rate
generator specific parameters.
The value of MULVAL and DIVADDVAL should comply to the following conditions:
1. 1
≤
MULVAL
≤
15
2. 0
≤
DIVADDVAL
≤
14
3. DIVADDVAL< MULVAL
The value of the U0FDR should not be modified while transmitting/receiving data or data
may be lost or corrupted.
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.
10.5.13.1 Baud rate calculation
UART can operate with or without using the Fractional Divider. In real-life applications it is
likely that the desired baud rate can be achieved using several different Fractional Divider
settings. The following algorithm illustrates one way of finding a set of DLM, DLL,
MULVAL, and DIVADDVAL values. Such set of parameters yields a baud rate with a
relative error of less than 1.1% from the desired one.
Table 84.
UART Fractional Divider Register (U0FDR - address 0x4000 8028) bit description
Bit
Function
Description
Reset
value
3:0
DIVADDVAL
Baud rate generation pre-scaler divisor value. If this field is 0,
fractional baud rate generator will not impact the UART baud rate.
0
7:4
MULVAL
Baud rate pre-scaler multiplier value. This field must be greater or
equal 1 for UART to operate properly, regardless of whether the
fractional baud rate generator is used or not.
1
31:8
-
Reserved, user software should not write ones to reserved bits.
The value read from a reserved bit is not defined.
0
UART
baudrate
PCLK
16
256
U0DLM
×
U0DLL
+
(
)
×
1
DivAddVal
MulVal
-----------------------------
+
⎝
⎠
⎛
⎞
×
----------------------------------------------------------------------------------------------------------------------------------
=