Turn-key PCB assembly services in prototype quantities or low-volume to mid-volume production runs

Power modes of LPC2000 ARM MCU

Power modes especially become more important where power saving is needed. All common microcontrollers have several power control modes.LPC21xx series microcontrollers have to reduced power modes: idle and power-down mode. In idle mode

execution of instructions is suspended until reset or other interrupt signal occurs. In idle mode peripheral devices (for instance timer) are running and may generate interrupts what causes processor to resume execution. So idle mode eliminates power used by processor itself, memory system, and internal buses.

When power-down mode is selected, then oscillator is topped so chip doesn't receive internal clocks. After this mode is selected, all current register and memory values are preserved, all logic levels of chip remains static. Processor may be resumed by reset signal or by other external interrupt which doesn't require internal clocking (in our case it would be External interrupt). Power down mode reduces chip power consumption to nearly zero.

Entering to power down mode or to idle mode is done via software, while resuming is done automatically by interrupt. Resuming is performed such way that no instructions or any data is lost.

There is also possible to turn Off peripherals individually if they are not needed what allows to save additional power.

Power control registers

Pover control of ARM LPC2000 series MCU is done via two control registers: PCON and PCONP.

  • PCON – Power Control Register. This register contains control bits that enable the two reduced power operating modes (idle and power-down) of the microcontroller;

  • PCONP – Power Control for Peripherals Register. Register contains control bits that enable and disable individual peripheral functions.

Bit 0 of PCON register turns on idle mode (bit IDL=“1”). Setting this bit processor block stops but peripherals remain active. Any enabled interrupt resume processor block action.

Bit 1 of PCON register turns on power-down mode (bit PD=“1”). All on-chip blocks are stopped. Only external interrupt or reset may wake processor and resume operations.

Other bits of PCON register are used to control Brown Out Detection (BOD) – refer to datasheet.

As we mentioned there is possible to control distinct peripheral devices. This is done by setting PCONP register values. This register is simply gating off peripheral blocks. Some peripherals like WD timer, GPIO System control block cannot be turned off. Some peripherals may be turned off particularly like those who include analog functions and may consume that si not clock dependant. Each of bit of PCONP control one of peripherals. If bit is “1”, then peripheral is enabled, if “0” than it is disabled to conserve the power.

For instance for LPC2148 microcontroller:

Power Control for Peripherals register (PCONP – address 0xE01F C0C4)

  • 0 – Reserved, user software should not write ones to reserved bits;

  • 1 PCTIM0 Timer/Counter 0;

  • 2 PCTIM1 Timer/Counter 1;

  • 3 PCUART0 UART0;

  • 4 PCUART1 UART1;

  • 5 PCPWM0 PWM0;

  • 6 – Reserved;

  • 7 PCI2C0 The I C0 interface;

  • 8 PCSPI0 The SPI0 interface;

  • 9 PCRTC The RTC;

  • 10 PCSPI1 The SSP interface;

  • 11 – Reserved;

  • 12 PCAD0 A/D converter 0 (ADC0);Note: Clear the PDN bit in the AD0CR before clearing this bit, and set this bit before setting PDN;

  • 18:13 – Reserved;

  • 19 PCI2C1 The I2C1 interface;

  • 20 PCAD1 A/D converter 1 (ADC1). Note: Clear the PDN bit in the AD1CR before clearing this bit, and set this bit before setting PDN;

  • 30:21 – Reserved;

  • 31 PUSB USB.

After RESET all peripherals are enabled. This is good practice during initialisation of MCU to disable all unused peripherals.

Some unofficial tests shows that LPC2000 running at 60MHz consumes about 30 – 40mA of current while in power-down mode it only 10- 15μA. Also remember that debugging isn't possible during idle or power-down mode.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.