Low power modes
Power management is a hot topic – or maybe that should read “a cool topic” – among embedded developers of late. In the course of a recent conversation on the subject, I realized that there are, in effect, three kinds of power saving procedure that embedded software might effect:
- Use dynamic voltage and frequency scaling [DVFS] to tune the CPU performance to the needs of the moment.
- Disable [power down] currently unused peripheral circuitry.
- Make use of the CPUs low power modes.
In the conversation, my interlocutor seemed to latch on to (3), which caused me to start thinking about how these modes should be used …
Superficially, it would seem obvious that, if the silicon vendor has provided a processor with low power modes and your design needs to be power efficient, you should make extensive use of them. Right? Well, maybe, but it all depends on the kind of application that you are developing.
Although many CPUs have multiple low-power modes, which have subtle nuances, there are broadly two possibilities [where the terminology is not standardized]:
- Suspend – The entire system is powered down, except the memory, which is kept alive to retain the data/code. This mode reduces power consumption very substantially.
- Hibernate – Everything is powered down, including the memory, the contents of which have been saved to flash memory. This mode cuts power consumption to almost zero.
Both of these modes can be very useful, but that usefulness comes at a cost. The nature and impact of that cost depends on the specific application, but it is manifest in two ways:
- Responsiveness – It takes time to enter/exit these modes. Hibernate is the slower, but Suspend requires a finite time. This lag might affect the responsiveness of a device from a user’s perspective; this might motivate the user to take steps to avoid the device going into a power saving state and, thus, render much of the power management design redundant. For a hard real time application, a device being in Suspend may result in it being unable to respond to an external event in a timely fashion.
- Power – Surprisingly, the use of these modes can result in more power being consumed! This can occur if the frequency with which the modes are used is too great. Some code is used to effect the entry/exit and that code execution uses energy. Utilizing these modes for short periods of time is a problem because the power saved while in the mode may not offset that used to enter/exit.
Embedded device power management is a big subject, which I have only scratched the surface of here. Broadly, the best way to approach low power design is to use an operating system, like Nucleus RTOS, that has a power management framework. This video explains how to manage a project requiring low power design. For more details on using an RTOS for power management, this Web seminar recording is interesting.
Posted January 20th, 2014, by Colin Walls
- Video blog – The Embedded Way: is assembly best for embedded?
- Change is good
- Article: floating point in embedded systems
- Moving to Mac – an update
- Embedded systems – an identity crisis?
- The work/life balance (or lack thereof) and why am I so busy?
- Articles about power management and RTOS memory utilization
- Six of the best: beers
- Video blog – using software IP
- What if? How history could have been different