Low power operation of the LPC81x (LPC800-MAX)

A very short explanation of the sleep modes of the LPC81x devices using mbed. This was developed using the LPC800-MAX, however if you want to make a low power application take into account the LPC800-MAX has alot of other ICs consuming power, you will want to have a custom PCB with the LPC81x on it for good battery life.

Power consumption

The power consumptions in different sleep modes can be retrieved from the datasheet, or you can measure them for your specific setup. On the LPC800-MAX you can remove R23 and place header pins on JP2, these can be found left of the rightmost crystal. Now with a multimeter you can measure the current between the two pins. Using a jumper you can short them when you do not need to measure the current.

A short rough overview, using the default mbed setup for the LPC800-MAX, running at its internal 12MHz oscillator: 2.4mA running, 1.4mA sleep, 170uA in deep-sleep and 2uA in power-down.

Sleep modes

The mbed library API supports two sleep-modes: sleep and deep-sleep, called by sleep() and deepsleep(). For the LPC81x devices calling sleep puts it in sleep mode (makes sense). What this means is that the ARM core is not receiving its clock anymore, however all the peripherals are still running. It will automatically wake-up if any interrupt is called. You can set interrupts up using the normal mbed way. So this is very easy, sadly it gives a fairly limitted power reduction.

Power-down

The deepsleep() function doesn't actually put it in deep-sleep, but in power-down, this is one state below deep-sleep. The downside is that it takes a bit longer to wake up, but the upside is almost a factor 100 reduction in power consumption compared to deep-sleep. If you want deep-sleep instead, you can check the mbed-src code: http://mbed.org/users/mbed_official/code/mbed-src/file/a1af374b4197/targets/hal/TARGET_NXP/TARGET_LPC81X/sleep.c. To give an indication, in power-down mode it can operate for over 10 years from a standard coin cell battery.

In both deep-sleep and power-down modes the ARM core is disabled, and peripherals don't receive a clock signal. It is setup to wake from any interrupt that is called. However do take into account that since there is no clock signal to the peripherals, not all of them are able to generate an interrupt anymore. For example standard Timer interrupts won't work. Asynchronous interrupts, such as InterruptIn, will however still function.

While in power-down the watchdog timer and brownout detection use relatively alot of power. If you disable them they will stay disabled during power-down. After wake-up the modules which were active are restored.

Warning

For power-down and deep-sleep the device should be running directly from its internal oscillator, this is the case by default for the LPC800-MAX.

Example program: http://mbed.org/users/Sissors/code/LPC812_Sleep_HelloWorld/


Please log in to post comments.