
UM10375
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2011. All rights reserved.
User manual
Rev. 3 — 14 June 2011
60 of 368
NXP Semiconductors
UM10375
Chapter 5: LPC13xx 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
For a simplified clock configuration scheme see
. For more details see
5.6.1.1 Param0: main clock
The main clock is the clock rate the microcontroller uses to source the system’s and the
peripherals’ clock. It is configured by either a successful execution of the clocking routine
call or a similar code provided by the user. This operand must be an integer between 1 to
72 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.6.1.2 Param1: 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.6.1.3 Param2: system clock
The system clock is the clock rate at which the microcontroller core is running when
set_power
is called. This parameter is an integer between from 1 and 72 MHz inclusive.
Table 65.
set_power routine
Routine
set_power
Input
Param0:
main clock (in MHz)
Param1:
mode (PWR_DEFAULT, PWR_CPU_PERFORMANCE, PWR_
EFFICIENCY, PWR_LOW_CURRENT)
Param2:
system clock (in MHz)
Result
Result0:
PWR_CMD_SUCCESS | PWR_INVALID_FREQ |
PWR_INVALID_MODE