How to Design Low Power Consumption in Microcontroller RTOS?

How to Design Low Power Consumption in Microcontroller RTOS?

Have you ever worked on low power consumption products?

Low power products may seem simple, but to create a low power product, especially achieving ultra-low power consumption, is relatively more challenging.

Today, we will discuss the approach to low power design in an RTOS environment.

Preface: Programming Mindset

The design of embedded products is diverse and customizable, often requiring a combination of software and hardware design based on specific needs.

Your software architecture may be reusable in “similar” products, but if the differences are significant, your software architecture may not apply.

However, there are many commonalities in embedded software design; perhaps the software architecture may not be applicable, but the design thinking is still valid.

How to Design Low Power Consumption in Microcontroller RTOS?

It’s like: if you learn a skill and one company doesn’t want you, another company will still need you, even if the products they design are different.

So, having a good programming mindset is essential, including software architecture, programming modules, low coupling, and high cohesion.

Returning to the low power design approach in RTOS, common methods include:

  • Normal Low Power: Enter low power mode while running idle tasks.

  • Ultra Low Power: Enter low power mode in idle state, waking up via interrupts or external events.

Normal Low Power

Normal low power means the processor intermittently enters a low power state but wakes up periodically; this level of power consumption cannot be very low.

In RTOS, this normal low power is typically achieved when the task is in Idle (idle task) to implement its low power functionality.

Rough schematic:

How to Design Low Power Consumption in Microcontroller RTOS?

The basic idea is: the idle task periodically enters low power mode but will periodically wake up to check for higher priority task responses. Even in low power mode, it can still be awakened by external events or interrupts.

Tip: Some RTOS can perform low power operations through “HOOK functions”. Additionally, some RTOS idle tasks may require specific configurations.

Ultra Low Power

The above method of periodically waking the CPU, even when there’s nothing to do, will certainly not achieve ultra-low power consumption.

To achieve ultra-low power, don’t disturb the CPU when there’s nothing to do; wake it up only when there’s something to process.

Rough schematic:

How to Design Low Power Consumption in Microcontroller RTOS?

This method of the CPU entering “deep low power” mode is different from the previous one, as it relates to the CPU’s low power modes.

For example: sleep, shutdown, standby, etc. Different processors may have various low power modes, and the specific implementation and wake-up methods must be aligned with the specific CPU’s implementation.

How to Design Low Power Consumption in Microcontroller RTOS?

Conclusion

The design of low power products is relatively more challenging and requires a combination of software and hardware to address various “power consumption anomalies,” but the overall application is not too complex.

Of course, there are more methods to achieve low power consumption, such as frequency reduction, zero power standby, etc. Feel free to leave a comment, sharing how you achieve low power consumption in your products.

Source: strongerHuangCopyright belongs to the original author. If there is any infringement, please contact for deletion.

Leave a Comment