Datasheet

UM10398 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2014. All rights reserved.
User manual Rev. 12.3 — 10 June 2014 66 of 547
NXP Semiconductors
UM10398
Chapter 5: LPC111x/LPC11Cxx 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
Fig 13. Power profiles usage
using power profiles and
changing system clock
current_clock,
new_clock , new_mode
use power routine call
to change mode to
DEFAULT
use either clocking routine call or
custom code to change system clock
from current_clock to new _clock
use power routine call
to change mode to
new_mode
end
Table 54. 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