AN11043
Power profiles on the LPC1100L
Rev. 1.1 — 1 March 2011 Application note
Document information
Info Content
Keywords Power profiles API, ROM, LPC1100L, Low Current, Efficiency,
Performance, set_pll, set_power, LPCXpresso
Abstract This application note aims to describe how to use the LPC1100L’s power
profiles and to point out what advantages they provide.
NXP Semiconductors
AN11043
Power profiles on the LPC1100L
AN11043 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2011. All rights reserved.
Application note Rev. 1.1 — 1 March 2011 2 of 24
Contact information
For more information, please visit: http://www.nxp.com
For sales office addresses, please send an email to: [email protected]
Revision history
Rev Date Description
1.1 20110301
Updated Fig 2
Added Fig 5
Corrected: Default mode is not required for IAP calls.
1 20110214
Initial version.
NXP Semiconductors
AN11043
Power profiles on the LPC1100L
1. Introduction
The API-driven power profiles featured in the LPC1100L provide users with ready-to-use
power management templates. The power profiles can be customized for any low-power
application allowing designers to reach ideal power levels with minimal application
intervention. The power profiles serve as an excellent alternative to non-configurable low
power modes, as they can conduct dynamic power management and optimize CPU
operation for various application states. This feature minimizes overall energy
consumption while maintaining the lowest operating current at low supply voltages.
Optimized for CPU performance, CPU efficiency and lowest active current, the power
profiles enable maximum operating frequency through the entire voltage range from
1.8 V to 3.6 V without compromising speed or functionality.
019aab688
Fig 1. Typical flow of power profiles
The Low Current mode is intended for applications that focus on lowering active current,
keeping the CPU's high processing capabilities available as required. CoreMark
benchmarks have shown a 20 % to 30 % improvement in power consumption when this
mode is enabled.
In CPU Performance mode, the microcontroller is configured to increase CPU throughput
by providing more processing capability to the application. CoreMark benchmark results
have proven that scores increase by 35 % when compared to regular operation.
The Efficiency mode is designed to deliver a fine balance between the CPU's ability to
execute code, process data, and at the same time lower active current consumption.
Regardless of which power mode is used (Low Current, CPU Performance or CPU
Efficiency), all three power profile modes will consume less current than Default mode.
AN11043 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2011. All rights reserved.
Application note Rev. 1.1 — 1 March 2011 3 of 24
NXP Semiconductors
AN11043
Power profiles on the LPC1100L
The goal of this application note is to inform the user when and how to use the power
profiles API on the LPC1100L. Moreover, this application note should only be used as a
reference. The user needs to determine which power profile would be best suited for their
application’s particular requirements.
2. Power profiles API
2.1 Requirements
The power profiles API routines are available only on the LPC1100L (LPC111x/x02)
devices. LPC1100 or LPC11C00 devices do not support the power profiles API.
2.2 Power profiles API
The power profiles API routines are a simple and easy way to configure the LPC1100L’s
clock frequency and power modes. The power profiles API consists of two function calls:
set_pll()
set_power()
The
set_pll
API function determines and switches the LPC1100L to the optimal system
PLL and system clock divider settings needed to achieve a desired system clock
frequency. The
set_pll
API function relieves the user from having to calculate the
required multiplier and divider settings needed to properly configure the system PLL;
effectively simplifying the overall process in configuring the system clock.
The
set_power
API function configures the LPC1100L’s power settings for four different
execution profiles: Low Current mode, CPU Performance mode, Efficiency mode, or the
Default mode. Changing the device’s power profile allows the user to target the
microcontroller for his or her application of interest.
This application note is accompanied by a sample code bundle available on NXP’s
microcontrollers’ website. This bundle features an implementation of a simple wrapper
function that calls both
set_pll
and
set_power
API routines. The wrapper is located in
power_profiles.c
and
power_profiles.h
files and can be used as a reference.
The wrapper implementation code utilizes power profiles header definitions found in the
power_api.h
header file. The
power_api.h
header file is found in
“..\Common\inc”
directory.
2.2.1 Executing power profiles API
The LPC1100L’s power profiles API functions are stored on the device’s ROM. API calls
to the ROM are called through a series of pointers as illustrated in Fig 2
.
A pointer to the ROM Driver Table is located at
0x1FFF1FF8
. Table entry number 4 within
that ROM Driver Table contains a pointer to the power profiles API function table. The
power profiles function table contains the
set_pll
and
set_power
functions.
AN11043 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2011. All rights reserved.
Application note Rev. 1.1 — 1 March 2011 4 of 24
NXP Semiconductors
AN11043
Power profiles on the LPC1100L
019aab689
Fig 2. ROM pointer structure for API calls
The header definitions needed to execute the power profiles API are included in the
power_api.h
header file. These definitions include the ROM Driver table and the power
profiles API Function table as shown below.
1
typedef struct _PWRD {
2
void (*set_pll)(unsigned int cmd[], unsigned int resp[]);
3
void (*set_power)(unsigned int cmd[], unsigned int resp[]);
4
} PWRD;
5
6
typedef struct _ROM {
7
const unsigned p_dev1;
8
const unsigned p_dev2;
9
const unsigned p_dev3;
10
const PWRD * pPWRD; //Pointer to Power Profiles API function table
11
const unsigned p_dev5;
12
const unsigned p_dev6;
13
const unsigned p_dev7;
14
const unsigned p_dev8;
15
} ROM;
16
17
ROM ** rom = (ROM **) 0x1FFF1FF8;
18
unsigned int command[4], result[2];
To operate the power profile API functions simply call the desired function with a set of
command[]
and
result[]
argument arrays. These 32-bit unsigned integer arrays are used
to supply commands and return error codes.
AN11043 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2011. All rights reserved.
Application note Rev. 1.1 — 1 March 2011 5 of 24