WITTENSTEIN high integrity systems Encourages Embedded Software Developers To Help Reduce Energy Consumption by Using A Simple RTOS Power Saving Solution07 Mar, 2022
WITTENSTEIN high integrity systems (WHIS) have created a proof of concept to demonstrate how one line of code in the idle task of an RTOS application can save over a third of the total energy consumed by the processor. If all designs were optimised for power usage, the electricity saved globally would be considerable. WHIS hope that by sharing this information, engineers will have another tool to save energy wherever possible.
If all designs were optimised for power usage, the power saved globally would be considerable. WITTENSTEIN high integrity systems (WHIS) have created a proof of concept to demonstrate how one line of code in the idle task of an RTOS application can save over a third of the total energy consumed by the processor. Most modern embedded processor architectures have the facility to enter a low-power mode and subsequent exit from the low-power mode is usually via one or more interrupts. The details are architecture dependent. WHIS have created their solution based around ARM Cortex-M processors due to the simplicity of the solution and the popularity of ARM Cortex-M.
WHIS’s power saving solution is simple and effective. When using a pre-emptive, priority based RTOS, whenever the RTOS has no other task to schedule, by default it runs the lowest priority task, which is normally the idle task. The idle task executes an infinite loop, calling the “idle hook function” each time around the loop. To save power in the idle task, the idle hook needs to configure the processor in a way that reduces power consumption. The WHIS solution is to add a Wait For Interrupt (WFI) instruction to the idle hook function that sets the processor into a low power mode, from which it can be woken by an interrupt. This is possible because if the idle task is scheduled, the only possible way a non-idle task will be scheduled is in response to an interrupt, usually the system “tick”. When an interrupt arrives, the processor is restored to full power mode and execution continues, either in the idle task loop (in which case it will immediately sleep again) or in an active task. For all of the details on this solution including implementation, proof of concept and results, please visit the WHIS website at: https://www.highintegritysystems.com/rtos/create-low-power-energy-efficient-rtos-designs/.
WHIS measured a substantial saving of over 37% of energy consumed- 145.0mW down to 90.4mW. Subsequently, if this RTOS solution was deployed across a million processors, the power saving would be around 480MWh a year- the amount of electricity required to power 165 UK homes for the same period.
“Saving energy has never been more important. We hope that where possible, application designers will be able to implement this solution” says Andrew Longhurst, Managing Director for WITTENSTEIN high integrity systems. “Although on an individual level the absolute power saved might be small, if this were to be scaled across the globe the energy saved would be significant.”
This solution is simple to implement and can have significant results. However, when designing an embedded system with power saving in mind, the entire system must be considered. This includes but is not limited to choice of processor, peripherals, operating frequency, as well as application and whole system design.
For all of the details on this solution including proof of concept and results, please visit the WHIS website at: https://www.highintegritysystems.com/rtos/create-low-power-energy-efficient-rtos-designs/.
About WITTENSTEIN high integrity systems
WITTENSTEIN high integrity systems is a safety systems company that produces and supplies real time operating systems and platform solutions to the Automotive, Medical and Industrial sectors worldwide. For more information, please visit:
 This use case and resulting recommendations are based on the Arm architectural feature Wait for Interrupt. More information about the Wait for Interrupt Instruction can be found in Arm’s architecture manuals: https://www.arm.com/ [Accessed on 17/02/22]
 Assuming an average Typical Domestic Consumption Value of 2,900kWh of electricity per year. This figure has been obtained from: https://www.ofgem.gov.uk/publications/record-gas-prices-drive-price-cap-ps139-customers-encouraged-contact-supplier-support-and-switch-better-deal-if-possible [Accessed on 17/02/22]
Back to News