![NXP Semiconductors LPC29 Series Скачать руководство пользователя страница 41](http://html1.mh-extra.com/html/nxp-semiconductors/lpc29-series/lpc29-series_user-manual_1721826041.webp)
DR
AFT
DR
AFT
DRAFT
DR
D
RAFT
DRAFT
DRA
FT DRAF
D
RAFT DRAFT DRAFT DRAFT DRAFT D
DRAFT
D
RAFT DRA
FT DRAFT DRAFT DRAFT DRA
UM10316_0
© NXP B.V. 2008. All rights reserved.
User manual
Rev. 00.06 — 17 December 2008
41 of 571
NXP Semiconductors
UM10316
Chapter 3: LPC29xx Clock Generation Unit (CGU)
[1]
Changing the divider ratio while the PLL is running is not recommended. Since there is no way of
synchronizing the change of the MSEL and PSEL values with the divider the risk exists that the counter will
read in an undefined value, which could lead to unwanted spikes or drops in the frequency of the output
clock. The recommended way of changing between divider settings is to power down the PLL, adjust the
divider settings and then let the PLL start up again.
[2]
To power down the PLL, P23EN bit should also be set to 0.
5.7 Frequency divider status register
There is one status register FDIV_STATUS_n for each frequency divider (n = 0..6 for
CGU0). Note that there is only one frequency divider in the CGU1. The status bits reflect
the inputs to the FDIV as driven from the control register
5.8 Frequency divider configuration register
There is one control register FDIV_CONF_n for each frequency divider (n = 0..6).
The frequency divider divides the incoming clock by (LOAD/DENOMINATOR), where
LOAD and DENOMINATOR are both 12-bit values programmed in the control register
FDIV_CONTROL_n.
Essentially the output clock generates ‘LOAD’ positive edges during every
‘DENOMINATOR’ cycle of the input clock. An attempt is made to produce a 50%
duty-cycle. Each high or low phase is stretched to last approximately
DENOMINATOR/(LOAD*2) input clock cycles. When DENOMINATOR/(LOAD*2) is an
integer the duty cycle is exactly 50%: otherwise the waveform will only be an
approximation. It will be close to 50% for relatively large non-integer values of
DENOMINATOR/(LOAD*2), but not for small values.
The minimum division ratio is divide-by-2, so LOAD should always be less than or equal to
(DENOMINATOR/2). If this is not true, or if LOAD is equal to 0, the input clock is passed
directly to the output with no division.
Table 21.
FDIV_STATUS_n register bit description (FDIV_STATUS_0 to 6, address 0xFFFF
802C/34/3C/44/4C/54/5C (CGU0) and FDIV_STATUS_0, address 0xFFFF B024
(CGU1))
* = reset value
Bit
Symbol
Access
Value
Description
31 to 24 CLK_SEL
R
Selected source clock for FDIV n
00h*
LP_OSC (CGU0) or (BASE_ICLK0_CLK)
(CGU1)
01h
Crystal oscillator (CGU0) or
(BASE_ICLK1_CLK) (CGU1)
02h
PLL
03h
PLL +120
0
04h
PLL +240
0
05h to
FFh
Not used
23 to 12 LOAD
R
Load value
001h*
11 to 0
DENOMINATOR
R
Denominator or modulo value.
001h*