John Donovan
Electronic Products
When MCU power consumption first started becoming a top priority, designers could simply look at datasheets to compare active power, hopefully all at the same frequency, and make a judgment call based on that. Comparing power consumption in sleep mode was not all that difficult, though you had to make sure they were all specifying RTC on, other clocks stopped, data retention, other peripherals tri-stated or turned off, and more. Even then, as MCU vendors followed Moore’s law down the geometry curve, the savings in active power were offset by increased leakage that made sleep mode increasingly less attractive than shutting off portions of the chip altogether.
Today, comparing power specifications between different MCUs has gotten a lot more complicated as vendors have implemented a variety of low-power modes that may not be directly comparable. Since MCUs in most applications typically spend most of their time in one or more of these sleep modes, the question then becomes whether the MCU can return to run mode quickly enough from each of these modes to accomplish the task at hand. This article will explore wakeup time as an important variable in assessing whether a given power-down mode is appropriate for a given application. Wakeup time has therefore become an important low-power specification.
Wake up!
The latest generation of MCUs has multiple sleep modes, each of which involves powering down an increasing number of functions. The Renesas RX111 has three power-down modes: Sleep, Deep Sleep, and Software Standby as shown in Figure 1.
Figure 1. | Renesas RX111 power consumption and wakeup times (Courtesy of Renesas). |
The RX111 has a variety of run speeds, and the power consumption in both sleep and deep-sleep modes depends on the speed of the peripheral clocks since the I/O pins and the high-speed on-chip oscillator (HS OCO) remain active even though the CPU clock is turned off.
- In sleep mode, the CPU is stopped and data is retained. Power consumption in sleep mode at 32 MHz is typically 6.4 mA with 0.21 μs required to return to run mode.
- In deep-sleep mode, the CPU, RAM, and Flash memory are stopped and data is retained, though multiple peripherals remain active. At 32 MHz, the RX111 draws 4.6 mA and requires 2.24 μs to wake up and enter run mode.
- In software-standby mode, the PLL and all oscillators except the subclock and IWDT are stopped; almost all modules are shut off but data is retained. Current consumption in this mode varies from 350 to 790 nA, depending on whether or not the LVD and RTC functions are used. At 32 MHz, it takes the CPU 40 μs to return to run mode.
The more functions that are turned off, the less power the chip will consume, but the longer it will take it to wake up and perform meaningful work. The wakeup time can be shortened considerably if waking up to a slower-speed run mode. For example, the 40 μs that the RX111 needs to jump to run mode from software-standby shrinks to 4.8 μs if the CPU is instead running at 4 MHz, which might be fast enough to periodically check for sensor data.
Wakeup time will usually be the limiting factor that determines which power-down mode a designer can use at any given point in an application. An RX111 application that monitors battery voltage (such as Brownout Detector) might run at 1 MHz, spend most of its time in software-standby mode (drawing 0.9 mA) and wake up in 15.8 μs. On the other hand, a high-speed data-processing application that is constantly polling may only be able to power down to sleep mode (6.4 mA at 32 MHz) in order to wake up quickly enough (in 0.21 μs) to parse a header and acknowledge receipt.
Fast low-power 32-bit MCUs
Choosing which low-power MCU is most suitable for a given application always involves the “Four Ps”: power, performance, price, and peripherals. Assuming the peripheral set is adequate and the price is acceptable, judiciously juggling wakeup time can ease the trade-off between power and performance. The results will be application specific, but well worth pursuing. It also involves a great deal of researching datasheets and user manuals, or, worst case, profiling your code on an evaluation board, since wakeup times are not often easy to find. The following brief survey omits most details in order to present, as far as possible, an apples-to-apples comparison among some leading low-power 32-bit MCUs. The lowest-power modes indicated are with data retention and RTC on.
NXP’s LPC1102/04 is a low-cost, 50 MHz, 32-bit ARM Cortex-M0-based MCU with 32 Kbytes of Flash memory, 8 Kbytes of data memory, and 11 GPIO pins. The LPC1102 has active, sleep, and deep-sleep modes. It can wake up from deep-sleep mode (220 nA) in 56 μs. Active-mode power consumption is approximately 140 μA/MHz.
Freescale’s Kinetis KL05 is a 48 MHz ARM Cortex-M0+-based MCU with up to 32 Kbytes of program Flash memory and 4 Kbytes of RAM. KL05 MCUs provide considerable flexibility, with nine low-power modes and an asynchronous low-leakage wakeup controller to enable power optimization based on application requirements. Active power consumption is approximately 89 μA/MHz, dropping to 0.96 μA in the lowest-power mode. Wakeup time from the previous mode is 96 μs.
STMicroelectronics’ STM32L151C6U6 is a 32 MHz ARM Cortex-M3-based MCU with up to 128 Kbytes of Flash memory, 16 Kbytes of RAM, and 93 fast I/Os. Power consumption in run mode is 214 μA/MHz. In its lowest-power mode, it draws 0.9 μA and can wake up in less than 8 μs.
Silicon Labs’ EFM32G210 MCU, previously the Energy Micro Gecko, has a 32 MHz ARM Cortex-M3 core that consumes 180 μA/MHz in run mode. The EFM32 has four low-energy modes (Figure 2); software initiates transitions from active mode (EM0) to lower-power modes, and interrupts trigger transitions back to EM0. In its lowest-power mode, the EFM32G210 draws 0.9 μA and can wake up in 2 μs.
Figure 2. | Silicon Labs EFM32G210 energy-mode transitions (Courtesy of Silicon Labs). |
Figure 3 summarizes the information given above. It should be seen as instructive though not definitive, since each chip has a variety of power-down modes with varying wakeup times, each of which may be appropriate at different points in an application. Currently, it takes a lot of digging through datasheets and hardware manuals to find wakeup times for all but the lowest-power sleep mode, which if fast enough may even appear in product brochures. Design engineers should encourage semiconductor vendors to break out this information and make it more readily accessible; as it is an important criterion in low-power design.
Figure 3. | Comparison of 32-bit MCU sleep modes and wakeup times. |
From paper to practice
Clearly you need to look at the power profile of your intended application in order to accurately assess whether a given MCU will enable you to meet your power target, which usually comes down to acceptable battery life in portable applications. In order to do that accurately you need to compile, download, and run your code on an evaluation board built around your target processor. If your vendor’s IDE includes a power profiler, see how much time your application spends in each power-down mode; if not, set breakpoints in your debugger and find out for yourself. Look to see if there are not sections of code that you could run at a lower clock rate; also check to see whether the CPU could wake up quickly enough if you were to use a lower-power sleep mode. With more choices comes more complexity, but also a greater likelihood of an outstanding design.
Summary
When multiple MCU power-down modes are available, the wakeup latency from each mode will determine its suitability for a given function; only having determined this can you begin to compare the power profiles of different MCUs. Which MCU is most appropriate for a particular design will ultimately be driven by the application. For more information on the MCUs discussed here, use the links provided to access product pages on the Digi-Key website.