# Idle task hook for low power application

**URL:** <https://forums.freertos.org/t/idle-task-hook-for-low-power-application/5117>\
**Category:** Kernel\
**Created:** [October 20, 2011, 1:12am UTC](https://forums.freertos.org/t/idle-task-hook-for-low-power-application/5117 "2011-10-20T01:12:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [October 20, 2011, 1:12am UTC](https://forums.freertos.org/t/idle-task-hook-for-low-power-application/5117/1 "2011-10-20T01:12:57Z")

</div>

**[gridsense](https://sourceforge.net/u/gridsense/)** wrote on [Thursday, October 20, 2011](https://sourceforge.net/p/freertos/discussion/382005/thread/dfb34790/#eab4):

I have a power consumption critical application, as long as in the idle task the MCU will enter into low power mode which the oscillator will stop to save current, the real time clock will wakeup at a certain period of time to continue other task.

My question is: the MCU freeze in idle task, will this cause problem for RTOS running?

Samuel

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [October 20, 2011, 4:54am UTC](https://forums.freertos.org/t/idle-task-hook-for-low-power-application/5117/2 "2011-10-20T04:54:05Z")

</div>

**[cynthiya](https://sourceforge.net/u/cynthiya/)** wrote on [Thursday, October 20, 2011](https://sourceforge.net/p/freertos/discussion/382005/thread/dfb34790/#9887):

I think the powerdown operation sequence that you might be doing could create problems during wakeup if the powerup sequence is not performed correctly. A task switch immediately after wake moves the execution to another priority task, and this is can  
interrupt the idle hook that does the powerup sequence…just my 2 cents 🙂

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [October 20, 2011, 8:52am UTC](https://forums.freertos.org/t/idle-task-hook-for-low-power-application/5117/3 "2011-10-20T08:52:33Z")

</div>

**[davedoors](https://sourceforge.net/u/davedoors/)** wrote on [Thursday, October 20, 2011](https://sourceforge.net/p/freertos/discussion/382005/thread/dfb34790/#a702):

It is very common, maybe even normal, to put the micro into low power in the idle hook. The issue is that the RTOS needs to keep track of time, so needs to wake up on tick interrupts. You can do all sorts of fancy things to slow the tick frequency before sleeping, to reduce the frequency low power mode is exited. A more complex low power operation is to go tickless, there is a thesis on tickless FreeRTOS in the FreeRTOS interactive site

[http://interactive.freertos.org/entries/20291196-energy-optimized-port-of-freertos-6-for-efm32](http://interactive.freertos.org/entries/20291196-energy-optimized-port-of-freertos-6-for-efm32)

Take care about how long your oscillator takes to start up and settle.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [October 21, 2011, 1:12am UTC](https://forums.freertos.org/t/idle-task-hook-for-low-power-application/5117/4 "2011-10-21T01:12:18Z")

</div>

**[gridsense](https://sourceforge.net/u/gridsense/)** wrote on [Friday, October 21, 2011](https://sourceforge.net/p/freertos/discussion/382005/thread/dfb34790/#06b6):

That is great idea!
