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
46 of 258
NXP Semiconductors
UM10429
Chapter 5: LPC1102 Power profiles
The following definitions are needed for set_power routine calls:
/* set_power mode options */
#define
PWR_DEFAULT
0
#define
PWR_CPU_PERFORMANCE
1
#define
PWR_EFFICIENCY
2
#define
PWR_LOW_CURRENT
3
/* set_power result0 options */
#define
PWR_CMD_SUCCESS
0
#define
PWR_INVALID_FREQ
1
#define
PWR_INVALID_MODE
2
5.5.1.1 New system clock
The new system clock is the clock rate at which the microcontroller will be running after
either a successful execution of a clocking routine call or a similar code provided by the
user. This operand must be an integer between 1 to 50 MHz inclusive. If a value out of this
range is supplied,
set_power
returns PWR_INVALID_FREQ and does not change the
power control system.
5.5.1.2 Mode
The input parameter mode (
Param1
) specifies one of four available power settings. If an
illegal selection is provided,
set_power
returns PWR_INVALID_MODE and does not
change the power control system.
PWR_DEFAULT keeps the device in a baseline power setting similar to its reset state.
PWR_CPU_PERFORMANCE configures the microcontroller so that it can provide more
processing capability to the application. CPU performance is 30% better than the default
option.
PWR_EFFICIENCY setting was designed to find a balance between active current and
the CPU’s ability to execute code and process data. In this mode the device outperforms
the default mode both in terms of providing higher CPU performance and lowering active
current.
PWR_LOW_CURRENT is intended for those solutions that focus on lowering power
consumption rather than CPU performance.
5.5.1.3 Current system clock
The current system clock is the clock rate at which the microcontroller is running when
set_power
is called. This parameter is an integer between from 1 and 50 MHz inclusive.
Table 43.
set_power routine
Routine
set_power
Input
Param0:
new system clock (in MHz)
Param1:
mode (PWR_DEFAULT, PWR_CPU_PERFORMANCE, PWR_
EFFICIENCY, PWR_LOW_CURRENT)
Param2:
current system clock (in MHz)
Result
Result0:
PWR_CMD_SUCCESS | PWR_INVALID_FREQ |
PWR_INVALID_MODE