UM11029
All information provided in this document is subject to legal disclaimers.
© NXP Semiconductors N.V. 2017. All rights reserved.
User manual
Rev. 1.0 — 16 June 2017
303 of 515
NXP Semiconductors
UM11029
Chapter 17: LPC84x USART0/1/2/3/4
17.7.1.1 Fractional Rate Generator (FRG)
The Fractional Rate Generator can be used to obtain more precise baud rates when the
peripheral clock is not a good multiple of standard (or otherwise desirable) baud rates.
The FRG is typically set up to produce an integer multiple of the highest required baud
rate, or a very close approximation. The BRG is then used to obtain the actual baud rate
needed.
The FRG register controls the USART Fractional Rate Generator, which provides the
base clock for the USART. The Fractional Rate Generator creates a lower rate output
clock by suppressing selected input clocks. When not needed, the value of 0 can be set
for the FRG, which will then not divide the input clock.
The FRG output clock is defined as the inputs clock divided by 1 + (MULT / 256), where
MULT is in the range of 1 to 255. This allows producing an output clock that ranges from
the input clock divided by 1+1/256 to 1+255/256 (just more than 1 to just less than 2). Any
further division can be done specific to each USART block by the integer BRG divider
contained in each USART.
The base clock produced by the FRG cannot be perfectly symmetrical, so the FRG
distributes the output clocks as evenly as is practical. Since the USART normally uses 16x
overclocking, the jitter in the fractional rate clock in these cases tends to disappear in the
ultimate USART output.
Any of the USARTs on the LPC84x device can use either FRG0 or FRG1. See
“Fractional generator 0 divider value register (FRG0DIV, address 0x4004 80D0) bit
description”
and
Table 152 “Fractional generator 0 multiplier value register (FRG0MULT,
address 0x4004 80D4) bit description”
.
For details see
Section 17.3.1 “Configure the USART clock and baud rate”
17.7.1.2 Baud Rate Generator (BRG)
The Baud Rate Generator (see
) is used to divide the base clock to produce
a rate 16 times the desired baud rate. Typically, standard baud rates can be generated by
integer divides of higher baud rates.
17.7.1.3 Baud rate calculations
Base clock rates are 16x for asynchronous mode and 1x for synchronous mode.
17.7.2 DMA
A DMA request is provided for each USART direction, and can be used in lieu of interrupts
for transferring data by configuring the DMA controller appropriately. The DMA controller
provides an acknowledgement signal that clears the related request when it completes
handling a that request. The transmitter DMA request is asserted when the transmitter
can accept more data. The receiver DMA request is asserted when received data is
available to be read.
When DMA is used to perform USART data transfers, other mechanisms can be used to
generate interrupts when needed. For instance, completion of the configured DMA
transfer can generate an interrupt from the DMA controller. Also, interrupts for special
conditions, such as a received break, can still generate useful interrupts.