UM10429
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2010. All rights reserved.
User manual
Rev. 1 — 20 October 2010
40 of 258
5.1 Features
•
Includes ROM-based application services
•
Power Management services
•
Clocking services
5.2 Description
This chapter describes calls that applications can make to code that is included in on-chip
ROM to facilitate power management and clocking setup.
5.3 Definitions
The following elements have to be defined in an application that uses the power profiles:
typedef struct _PWRD {
void (*set_pll)(unsigned int cmd[], unsigned int resp[]);
void (*set_power)(unsigned int cmd[], unsigned int resp[]);
} PWRD;
typedef struct _ROM {
const PWRD * pWRD;
} ROM;
ROM ** rom = (ROM **) 0x1FFF1FF8;
unsigned int command[4], result[2];
5.4 Clocking routine
5.4.1 set_pll
This routine sets up the system PLL according to the calling arguments. If the expected
clock can be obtained by simply dividing the system PLL input,
set_pll
bypasses the PLL
to lower system power consumption.
IMPORTANT:
Before this routine is invoked, the PLL clock source (IRC/system oscillator)
must be selected (
), the main clock source must be set to the input clock to the
system PLL (
) and the system/AHB clock divider must be set to 1 (
).
set_pll
attempts to find a PLL setup that matches the calling parameters. Once a
combination of a feedback divider value (SYSPLLCTRL, M), a post divider ratio
(SYSPLLCTRL, P) and the system/AHB clock divider (SYSAHBCLKDIV) is found,
set_pll
applies the selected values and switches the main clock source selection to the system
PLL clock out (if necessary).
UM10429
Chapter 5: LPC1102 Power profiles
Rev. 1 — 20 October 2010
User manual