UM10850
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2016. All rights reserved.
User manual
Rev. 2.4 — 13 September 2016
75 of 464
NXP Semiconductors
UM10850
Chapter 4: LPC5410x System configuration (SYSCON)
1. Make sure that the PLL output is disconnected from any downstream functions. If the
PLL was previously being used to clock the CPU, and the CPU Clock Divider is being
used, it may be set to speed up operation while the PLL is disconnected.
2. Select a PLL input clock source. See
Section 4.5.21 “System PLL clock source select
3. Set up the PLL dividers and mode settings. See
Section 4.5.37 “PLL registers”
4. Wait for the PLL output to stabilize. The value of the PLl lock may not be stable when
the PLL reference frequency (FREF, the frequency of REFCLK, which is equal to the
PLL input frequency divided by the pre-divider value) is less than 100 kHz or greater
than 20 MHz. In these cases, the PLL may be assumed to be stable after a start-up
time has passed. This time is 500
μ
s when Fref is 500 kHz or greater and 200 / Fref
seconds when FREF is less than 500 kHz.
5. If the PLL will be used to clock the CPU, change the CPU Clock Divider setting for
operation with the PLL, if needed. This must be done before connecting the PLL.
6. Connect the PLL to whichever downstream function is will be used with. The structure
of the clock dividers may be seen on the right of
.
4.6.5 Frequency measure function
The Frequency Measure circuit is based on two 14-bit counters, one clocked by the
reference clock and one by the target clock. Synchronization between the clocks is
performed at the start and end of each count sequence.
A measurement cycle is initiated by software setting a control/status bit in the
FREQMECTRL register (
). The software can then poll this same
measurement-in-progress bit which will be cleared by hardware when the measurement
operation is completed.
The measurement cycle terminates when the reference counter rolls-over. At that point
the state of the target counter is loaded into a capture field in the FREQMEAS register,
and the measure-in-progress bit is cleared. Software can read this capture value and
apply to it a specific calculation which will return the precise frequency of the target clock
in MHz.
See
Section 4.2.3 “Measure the frequency of a clock signal”
,
measure function control register”
Section 8.6.4 “Frequency measure function reference
, and
Section 8.6.5 “Frequency measure function target clock select
4.6.5.1 Accuracy
The frequency measurement function can measure the frequency of any on-chip (or
off-chip) clock (referred to as the target clock) to a high degree of accuracy using another
on-chip clock of known frequency as a reference.
The following constraints apply:
•
The frequency of the reference clock must be (somewhat) greater that the frequency
of the target clock.
•
The system clock used to access the frequency measure function register must also
be greater than the frequency of the target clock.