WITTENSTEIN high integrity systems Encourages Embedded Software Developers To Help Reduce Energy Consumption by Using A Simple RTOS Power Saving Solution

Share Article

WITTENSTEIN high integrity systems (WHIS) has 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 hopes that by sharing this information, engineers will have another tool to save energy wherever possible.

News Image
Saving energy has never been more important. We hope that where possible, application designers will be able to implement this solution

If all designs were optimised for power usage, the power saved globally would be considerable. WITTENSTEIN high integrity systems (WHIS) has 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 has 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)[1] 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[2] 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:
https://www.highintegritysystems.com

References
[1] 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: Accessed on 17/02/22
[2] Assuming an average Typical Domestic Consumption Value of 2,900kWh of electricity per year. This figure has been obtained from: Accessed on 17/02/22

Share article on social media or email:

View article via:

Pdf Print

Contact Author

Andrew Longhurst
Visit website