Automating Power Management in MCU Operating Systems

With connected sensors becoming more ubiquitous, low power operation has become much more important in MCU-based applications to enable long battery life. Whereas high-level OS solutions, such as Android, Linux, or Windows, offer built-in power management features that operate independently of the applications, MCU operating systems have typically lacked power management functions. This paper will present an RTOS-based power management framework that automates power management in wireless MCU applications without developers having to implement specific power management code or have their applications decide when to enter specific low power states. We will begin with a brief overview of various silicon features that are important to implementing very lower power performance. We will also discuss some generic attributes of the RTOS programming paradigm that lend themselves to lower power consumption, such as blocking and idling rather than polling. We will then study the different components of the OS power management framework and the associated core technology enhancements, including: * Peripheral clocks and domain management * Power state transition management * Device driver enhancements and an associated database that enables the OS to determine which clocks and power domains should be active and when it can safely shut down active peripherals * RTOS clock management enhancements that minimize timer interrupts (tick suppression) and efficiently track the next scheduled event * How the framework decides when to go to a low-power state and a program that determines which low power state can be used and how long the device can remain in it We will conclude by looking at benchmark numbers based on an actual ARM Cortex-M wireless MCU. These will show the memory footprint overhead of the power management framework and highlight the power consumption differences between the various low-power states and why it is important to be aggressive about going into the lowest power state.