Understanding MCU sleep modes and energy savings
Off mode – a ’near-death’ experienceThe off or shutoff mode does completely power down the MCU but provides a 'near-death' state that preserves the minimum functionality needed to trigger wake-up from an external stimulus. The energy savings come at the cost of a significantly longer wake-up time.
In this mode all functions and clocks are powered down except for interrupt monitoring circuitry on the reset pin and a GPIO wake-up pin (Figure 2). Restart requires a device reset or interrupt signal. The high frequency clock generator must power up and stabilize before the CPU can load memory contents from backup storage and execute its first instruction.

Figure 2. In near-death MCU power mode, all functions and clocks are powered down, except for interrupt logic.
Power consumption can be as low as 20nA in this mode. However, some 32-bit MCUs will draw around 1.5µA. Wakeup time increases to around 200µs.
Some MCUs include a small memory block that is retained even in this ‘near death’ state. This Backup Mode offers an attractive alternative to off mode because it preserves a few critical functions and enables much faster wakeup. Although it is typically used only if the main power supply fails and the system is on backup power, it can also provide a faster-wakeup alternative to off mode, allowing basic processing to resume quickly after restart, so that vital interrupts are serviced. The MCU can then return to sleep or allow normal state to be restored and execution to continue.
In this mode, with the RTC remaining active, some power-optimized MCUs are able to draw only 400nA. In this mode it would take roughly seven years to consume 11% of a 220mAh CR2032 battery cell.
Balancing the lifetime energy consumption equation
As with any equation, how sleep mode is used for a particular application is dependent on a range of variables. A number of strategies are used in projects to determine how these variables can be set to take best advantage of an MCU’s sleep modes.
The first step is to identify the routine low-level functions required by the application and identify MCU architectures that can handle as many of them as possible using on-chip hardware that does not require CPU intervention. Besides the counter, timer, and RTC functions found on most MCUs, as noted above some advanced architectures have hardware to perform A/D conversions and data collection autonomously as well as monitoring alarm thresholds or a touchscreen input. They can even refresh and update an LCD.
If the selected MCU can conduct memory transfers and other transactions between internal and external peripherals autonomously, it is important to make full use of such facilities. For example, an I2C bus transceiver or serial port that can autonomously receive and buffer packets to memory allows the MCU to remain in sleep mode until the arrival of an incoming message that requires action. Some MCU peripherals require external hardware or CPU intervention to manage a serial port effectively, which constrains the designer to use relatively high-power sleep modes to avoid losing incoming data.
It often takes detailed analysis to evaluate the interactions between response time and the savings achievable from different sleep modes. However, tools are available to help work out how these interactions will play out (Figure 3) by providing an effective and inexpensive way of determining how different sleep strategies will affect the power consumption of an application and its performance. The key is first to know how the sleep modes function.

Click on image to enlarge.
Figure 3. Power management tools can be effective in picking the right MCU sleep mode strategy
Run faster to save energy
Selecting a processor clock speed that is appropriate for your application is another technique that can be used to fine-tune both the design’s operating power and the time it spends in Sleep Mode. In many cases, the processor speed that results in the lowest overall energy use may not be the slowest clock speed (Figure 4).


Figure 4. Overall energy use versus clock speed.
The idea of running a device faster to conserve energy may seem counter-intuitive, but a semiconductor’s energy consumption is the sum of its static consumption, which is present regardless of clock frequency, and its active consumption, which increases with operating speed. If we assume that doubling the clock frequency means cutting the time it takes the CPU to complete a task by half or more, the increase in dynamic power can be offset by the reduced processing time. This is because the static power consumption applies for a shorter period.
Additional power savings can often be achieved by maximizing the transmission speeds of wired and wireless links. This is because physical layer communication interfaces often consume as much or more power than the MCU itself. Unless there are other considerations – such as longer link negotiation times at higher transmission rates – the transceiver’s power consumption can be minimized by insuring the processor’s clock speed is sufficient to allow it to handle data at the transceiver’s maximum available transmit/receive rate. As a result, running faster to sleep longer is often an effective energy-saving strategy.
Anders Guldahl is an Application Engineer at Energy Micro, supporting customers, developing energy friendly code examples, and writing application notes. Anders also worked in Energy Micro's Simplicity team, designing development kits for the EFM32 Gecko microcontrollers, LESENSE peripherals and capacitive touch. He holds a Masters degree in control systems engineering from The Norwegian University of Science and Technology (NTNU) in Trondheim, Norway.


Loading comments... Write a comment