UM10208_2
© NXP B.V. 2007. All rights reserved.
User manual
Rev. 02 — 1 June 2007
63 of 362
NXP Semiconductors
UM10208
Chapter 7: LPC2800 CGU
c. write a 1 to the appropriate bit of the HPREQ register,
d. read the HPACK register repeatedly until the corresponding bit is 1,
e. write a 0 to the appropriate bit of the HPREQ register,
f. read HPACK repeatedly until the corresponding bit 0 is 0.
3. Read HPSTAT periodically until the LOCK bit is 1. (This will happen more quickly than
in the power-down procedure.) Subject this waiting to a time-out as described in
4. Program the selection stages to use the PLL output.
3.7.3 Lock Time-outs
When software waits for the LOCK bit to be set in either of the preceding procedures, it
should limit the waiting time to prevent system hang-ups. If the input clock is less than 100
kHz the Lock indication is not reliable. In this case use a time-out of 500 uS, and proceed
onward to use the clock if LOCK is not set by this time. For any clock frequency, it’s
possible that an error in a control register value will prevent locking. So for faster
frequencies, make the time-out 2 seconds, and post an error result to the calling routine if
this time-out occurs.
3.8 Selection stage registers
Each of the 11 selection stages in the CGU includes the first four registers listed in
. Selection stages that drive more than one fractional divider include Base
Control Registers.
Table 54.
Selection stage registers
Names
Description
Access Reset
value
Addresses
SYSSCR, APB0SCR,
APB1SCR, APB3SCR,
DCDCSCR, RTCSCR,
MCISCR, UARTSCR,
DAIOSCR, DAISCR
Switch Configuration Registers.
These 4-bit
registers enable or disable the output of the
selection stage, select between the two “sides”
of the stage, and allow resetting the stage.
Some SCRs reset to 0001 (running), others to
1001 (stopped).
R/W
x001
0x8000 4000,0x8000 4004,
0x8000 4008,0x8000 400C,
0x8000 4010,0x8000 4014,
0x8000 4018,0x8000 401C,
0x8000 4020,0x8000 4024
SYSFSR1, APB0FSR1,
APB1FSR1, APB3FSR1,
DCDCFSR1, RTCFSR1,
MCIFSR1, UARTFSR1,
DAIOFSR1, DAIFSR1
Frequency Select 1 Registers.
These 4-bit
registers select among the main clocks for “side
1” of the selection stage. All FSR1 registers
reset to selecting the fast oscillator.
R/W
0001
0x8000 402C,0x8000 4030,
0x8000 4034,0x8000 4038,
0x8000 403C,0x8000 4040,
0x8000 4044,0x8000 4048,
0x8000 404C,0x8000 4050
SYSFSR2, APB0FSR2,
APB1FSR2, APB3FSR2,
DCDCFSR2, RTCFSR2,
MCIFSR2, UARTFSR2,
DAIOFSR2, DAIFSR2
Frequency Select 2 Registers.
These 4-bit
registers select among the main clocks for “side
2” of the selection stage. All FSR2 registers
reset to selecting the 32 kHz oscillator.
R/W
0
0x8000 4058,0x8000 405C,
0x8000 4060,0x8000 4064,
0x8000 4068,0x8000 406C,
0x8000 4070,0x8000 4074,
0x8000 4078,0x8000 407C
SYSSSR, APB0SSR,
APB1SSR, APB3SSR,
DCDCSSR, RTCSSR,
MCISSR, UARTSSR,
DAIOSSR, DAISSR
Switch Status Registers.
These 6-bit
read-only registers indicate which side of the
stage is selected, and its frequency selection.
RO
0x03
0x8000 4084,0x8000 4088,
0x8000 408C,0x8000 4090,
0x8000 4094,0x8000 4098,
0x8000 409C,0x8000 40A0,
0x8000 40A4,0x8000 40A8
SYSBCR, APB0BCR,
DAIOBCR
Base Control Registers.
These 1-bit registers
allow software to start multiple fractional dividers
synchronously (simultaneously).
R/W
1
0x8000 43F0, 0x8000 43F4,
0x8000 43F8