
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
UM10360_0
© NXP B.V. 2009. All rights reserved.
User manual
Rev. 00.06 — 5 June 2009
39 of 808
NXP Semiconductors
UM10360
Chapter 4: LPC17xx Clocking and power control
Start by assuming N = 1, since this produces the smallest multiplier needed for PLL0. So,
M = 288
×
10
6
/ (2
×
4
×
10
6
) = 36. Since the result is an integer, there is no need to look
further for a good set of PLL0 configuration values. The value written to PLL0CFG would
be 0x23 (N - 1 = 0; M - 1 = 35 = 0x23).
The potential CPU clock rate can be determined by dividing F
CCO
by the desired CPU
frequency: 288
×
10
6
/ 60
×
10
6
= 4.8. The nearest integer value for the CPU Clock
Divider is then 5, giving us 57.6 MHz as the nearest value to the desired CPU clock rate.
If it is important to obtain exactly 60 MHz, an F
CCO
rate must be found that can be divided
down to both 48 MHz and 60 MHz. The only possibility is 480 MHz. Divided by 10, this
gives the 48 MHz with a 50% duty cycle needed by the USB subsystem. Divided by 8, it
gives 60 MHz for the CPU clock. PLL0 settings for 480 MHz are N = 1 and M = 60.
Example 2)
Assumptions:
•
The USB interface will not be used in the application.
•
The desired CPU rate = 72 MHz
•
The 32.768 kHz RTC clock source will be used as the system clock source
Calculations:
M = (F
CCO
×
N) / (2
×
F
IN
)
The smallest frequency for F
CCO
that can produce our desired CPU clock rate and is
within the PLL0 operating range is 288 MHz (4
×
72 MHz). Start by assuming N = 1, since
this produces the smallest multiplier needed for the PLL.
So, M = 288
×
10
6
/ (2
×
32,768) = 4,394.53125. This is not an integer, so the CPU
frequency will not be exactly 288 MHz with this setting. Since this case is less obvious, it
may be useful to make a table of possibilities for different values of N (see
Beyond N = 7, the value of M is out of range or not supported, so the table stops there. In
the table, the calculated M value is rounded to the nearest integer. If this results in CCLK
being above the maximum operating frequency (72 MHz), it is allowed if it is not more than
1/2
%
above the maximum frequency.
In general, larger values of F
REF
result in a more stable PLL when the input clock is a low
frequency. Even the first table entry shows a very small error of just over 1 hundredth of a
percent, or 107 parts per million (ppm). If that is not accurate enough in the application,
the second case gives a much smaller error of 7 ppm.
Table 27.
Potential values for PLL example
N
M
M Rounded F
REF
(Hz)
F
CCO
(Hz)
Actual
CCLK (Hz)
%
Error
1
4394.53125
4395
32768
288.0307
72.0077
0.0107
2
8789.0625
8789
16384
287.9980
71.9995
-0.0007
3
13183.59375 13184
10922.67
288.0089
72.0022
0.0031
4
17578.125
17578
8192
287.9980
71.9995
-0.0007
5
21972.65625 21973
6553.6
288.0045
72.0011
0.0016