Table 16–392, Nxp semiconductors – NXP Semiconductors LPC24XX UM10237 User Manual

Page 438

Advertising
background image

UM10237_4

© NXP B.V. 2009. All rights reserved.

User manual

Rev. 04 — 26 August 2009

438 of 792

NXP Semiconductors

UM10237

Chapter 16: LPC24XX UART0/2/3

This register controls the clock pre-scaler for the baud rate generation. The reset value of
the register keeps the fractional capabilities of UART0/2/3 disabled making sure that
UART0/2/3 is fully software and hardware compatible with UARTs not equipped with this
feature.

UART0/2/3 baudrate can be calculated as (n = 0/2/3):

(2)

Where PCLK is the peripheral clock, U0/2/3DLM and U0/2/3DLL are the standard
UART0/2/3 baud rate divider registers, and DIVADDVAL and MULVAL are UART0/2/3
fractional baudrate 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 U0/2/3FDR should not be modified while transmitting/receiving data or
data may be lost or corrupted.

If the U0/2/3FDR 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.

4.12.1 Baudrate calculation

UART can operate with or without using the Fractional Divider. In real-life applications it is
likely that the desired baudrate 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 baudrate with a
relative error of less than 1.1% from the desired one.

Table 392. UARTn Fractional Divider Register (U0FDR - address 0xE000 C028,

U2FDR - 0xE007 8028, U3FDR - 0xE007 C028) bit description

Bit

Function

Value Description

Reset
value

3:0

DIVADDVAL

0

Baud-rate generation pre-scaler divisor value. If this field is
0, fractional baud-rate generator will not impact the UARTn
baudrate.

0

7:4

MULVAL

1

Baud-rate pre-scaler multiplier value. This field must be
greater or equal 1 for UARTn to operate properly,
regardless of whether the fractional baud-rate generator is
used or not.

1

31:8

-

NA

Reserved, user software should not write ones to reserved
bits. The value read from a reserved bit is not defined.

0

UARTn

baudrate

PCLK

16

256

UnDLM

×

UnDLL

+

(

)

×

1

DivAddVal

MulVal

-----------------------------

+

Ч

----------------------------------------------------------------------------------------------------------------------------------

=

Advertising