
UM10800
All information provided in this document is subject to legal disclaimers.
© NXP Semiconductors N.V. 2016. All rights reserved.
User manual
Rev. 1.2 — 5 October 2016
392 of 487
NXP Semiconductors
UM10800
Chapter 26: LPC82x ROM API Power profiles
#define
CPU_FREQ_EQU
0
#define
CPU_FREQ_LTE
1
#define
CPU_FREQ_GTE
2
#define
CPU_FREQ_APPROX
3
/* set_pll result0 options */
#define
PLL_CMD_SUCCESS
0
#define
PLL_INVALID_FREQ
1
#define
PLL_INVALID_MODE
2
#define
PLL_FREQ_NOT_FOUND
3
#define
PLL_NOT_LOCKED
4
For a simplified clock configuration scheme see
. For more details see
.
26.5.1.1 Param0: system PLL input frequency and Param1: expected system clock
set_pll configures a setup in which the system clock does not exceed 30 MHz (see
). It easily finds a solution when the ratio between the expected system clock
and the system PLL input frequency is an integer value, but it can also find solutions in
other cases.
The system PLL input frequency (Param0) must be between 10000 to 25000 kHz
(10 MHz to 25 MHz) inclusive. The expected system clock (Param1) must be between 1
and 30000 kHz inclusive. If either of these requirements is not met, set_pll returns
PLL_INVALID_FREQ and returns Param0 as Result1 since the PLL setting is unchanged.
26.5.1.2 Param2: mode
The first priority of set_pll is to find a setup that generates the system clock at exactly the
rate specified in Param1. If it is unlikely that an exact match can be found, input parameter
mode (Param2) should be used to specify if the actual system clock can be less than or
equal, greater than or equal or approximately the value specified as the expected system
clock (Param1).
A call specifying CPU_FREQ_EQU will only succeed if the PLL can output exactly the
frequency requested in Param1.
CPU_FREQ_LTE can be used if the requested frequency should not be exceeded (such
as overall current consumption and/or power budget reasons).
CPU_FREQ_GTE helps applications that need a minimum level of CPU processing
capabilities.
CPU_FREQ_APPROX results in a system clock that is as close as possible to the
requested value (it may be greater than or less than the requested value).
If an illegal mode is specified, set_pll returns PLL_INVALID_MODE. If the expected
system clock is out of the range supported by this routine, set_pll returns
PLL_FREQ_NOT_FOUND. In these cases the current PLL setting is not changed and
Param0 is returned as Result1.