69
Low Power Modes (LPM)
From the smart watches in our wrists to the vehicles we use for transportation, many modern
electronic gadgets and gizmos are battery-powered. Some are even dependent on renewable energy
sources like solar energy. In such devices, there is always an inherent energy crisis and so saving energy
is a must in such designs for prolonged usage. At present there is hardly any microcontroller in the
market that does not come equipped with energy-saving schemes or low power modes of operation.
MSP430s were mainly designed for battery-backed instruments and it is no surprise that they come
loaded with the some of the best possible energy-saving mechanisms.
There six modes of operation of which five are low power modes. These are as follows:
Of these six modes, three modes are mostly used – Active Mode (AM), LPM0 and LPM3. In Active
Mode, the typical self-consumption of a MSP430 device is roughly about 300µA with nothing
connected to it. In LPM0 the self-consumption is about a third of active mode while in LPM3, this
consumption is just about 1µA. These figures tell us how much energy efficient MSP430s are.
Entering and exiting LPM is easy in terms of coding. However, the most common question that coders
face with LPMs is how to get back to active mode or some other low power mode from a given low
power mode. Well, it is pretty simple and it is accomplished with interrupts. It is up to coders to decide
how to manage interrupts, clock sources and what do to after waking up from a LPM condition. Note
that in LPMs, the CPU is disabled and so any task that requires CPU’s intervention is stalled. Since the
CPU and some clocks are halted in LPMs, don’t even think that the tasks depending on them will be
magically done. For instance, if a code has entered LPM3 and a timer is being driven with SMCLK, we
should not expect it to tick because in LPM3, SMCLK is turned off. Organizing the code in a decent and
well-planned manner is the secret behind successfully implementing LPMs.
Code Example
#include <msp430.h>
#include "delay.h"
void GPIO_graceInit(void);
void BCSplus_graceInit(void);
void System_graceInit(void);
void WDTplus_graceInit(void);