UM10503
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2012. All rights reserved.
User manual
Rev. 1.3 — 6 July 2012
104 of 1269
NXP Semiconductors
UM10503
Chapter 11: LPC43xx Clock Generation Unit (CGU)
11.6.1 Frequency monitor register
The CGU can report the relative frequency of any operating clock. The clock to be
measured must be selected by software, while the fixed-frequency IRC clock fref is used
as the reference frequency. A 14-bit counter then counts the number of cycles of the
measured clock that occur during a user-defined number of reference-clock cycles. When
the MEAS bit is set, the measured-clock counter is reset to 0 and counts up, while the
9-bit reference-clock counter is loaded with the value in RCNT and then counts down
towards 0. When either counter reaches its terminal value both counters are disabled and
the MEAS bit is reset to 0. The current values of the counters can then be read out and
the selected frequency obtained by the following equation:
Note that the accuracy of this measurement can be affected by several factors:
1. Quantization error is noticeable if the ratio between the two clocks is large (e.g.
100 kHz vs. 1 kHz), because one counter saturates while the other still has only a
small count value.
2. Due to synchronization, the counters are not started and stopped at exactly the same
time.
3. The measured frequency can only be to the same level of precision as the reference
frequency.
OUTCLK_21_CTRL
to
OUTCLK_24_CTRL
R/W
0x0B0 to
0x0BC
Reserved output stages
-
-
-
-
BASE_APLL_CLK
R/W
0x0C0
Output stage 25 control
register for base clock
BASE_APLL_CLK
0x0100
0000
0x0100
0000
0x0100
0000
BASE_CGU_OUT0_
CLK
R/W
0x0C4
Output stage 26 control
register for base clock
BASE_CGU_OUT0_CLK
0x0100
0000
0x0100
0000
0x0100
0000
BASE_CGU_OUT1_
CLK
R/W
0x0C8
Output stage 27 control
register for base clock
BASE_CGU_OUT1_CLK
0x0100
0000
0x0100
0000
0x0100
0000
Table 67.
Register overview: CGU (base address 0x4005 0000)
Name
Access Address
offset
Description
Reset
value
Reset
value
after
EMC,
UART0/
3 boot
Reset
value
after
USB0/1
boot
Reference
fselected
FCNT
RCNT
----------------
fref
=