UM10208_2
© NXP B.V. 2007. All rights reserved.
User manual
Rev. 02 — 1 June 2007
66 of 362
NXP Semiconductors
UM10208
Chapter 7: LPC2800 CGU
[1]
The fraction n/m must be always smaller than one and greater than zero.
a) When using clock stretching, the fraction must be smaller or equal to 1/2.
b) To obtain the best possible 50% duty cycle when clock stretching is used, n/m should equal a division by a 2 power value (i.e. 1/2,
1/4, 1/8...). Using other fractions will result in a best approximation.
3.11 Fractional divider programming
To set up a fractional divider for operation, software should:
1. If the fractional divider was already operating:
a. Read its FDCR,
b. Clear the RUN bit,
c. Write the result value back to the FDCR.
2. Write the desired values of MADD, MSUB, and the STRETCH bit, with the RESET bit
set, to the FDCR,
3. Write the value from step 2, without the RESET bit, to the FDCR,
4. Write the value from step 3, with the RUN bit, to the FDCR.
Note:
the higher resolution of fractional divider DAIOFDCR4 is intended for use in
generating Word Select (WS) clocks.
3.12 Spreading stage registers
Each of the 66 spreading stages in the CGU includes the first two registers listed in
. Spreading stages that have at least one fractional divider available to them
also have an Enable Select Register (ESR).
Table 60.
Fractional divider configuration registers
Names
Bit
Symbol
Description
Reset
value
Addresses
SYSFDCR0,
SYSFDCR1,
SYSFDCR2,
SYSFDCR3,
SYSFDCR4,
SYSFDCR5,
APB0FDCR0,
APB0FDCR1,
APB1FDCR,
APB3FDCR,
UARTFDCR,
DAIOFDCR0,
DAIOFDCR1,
DAIOFDCR2,
DAIOFDCR3,
DAIOFDCR4,
DAIOFDCR5
0
FDRUN
A 1 in this bit enables the fractional divider
0
0X8000 43FC,
0X8000 4400,
0X8000 4404,
0X8000 4408,
0X8000 440C,
0X8000 4410,
0X8000 4414,
0X8000 4418,
0X8000 441C,
0X8000 4420,
0X8000 4424,
0X8000 4428,
0X8000 442C,
0X8000 4430,
0X8000 4434,
0X8000 4438,
0X8000 443C
1
FDRES
Writing 1 to this bit resets the fractional divider.
0
2
FDSTRCH When this bit is 0, as it is after a reset, one high-going
pulse of the base clock will be enabled on the output per
cycle of the fractional divider. If this bit is 1 the pulse will
be stretched to approximate a 50-50% duty cycle.
0
12:3 in
DAIOFDCR4,
10:3 in
all others
MADD
To configure the fractional divider to multiply the base
clock by “n” and divide it by “m” (n must be less than m),
write m-n to this field.
0
22:13 in
DAIOFDCR4,
18:11 in
all others
MSUB
To configure the fractional divider to multiply the base
clock by “n” and divide it by “m” (n must be less than m),
write -n (two’s complement) to this field. This value
need not have its MS bit set: that is, it doesn’t have to
look like a negative number.
0
31:23 in
DAIOFDCR4
31:19 in all
others
Reserved
Reserved, user software should not write ones to
reserved bits. The value read from a reserved bit is not
defined.
-