# In Tickless Idle Mode Expected Idle Time is always less then 4

**URL:** <https://forums.freertos.org/t/in-tickless-idle-mode-expected-idle-time-is-always-less-then-4/6199>\
**Category:** Kernel\
**Created:** [October 7, 2016, 9:55am UTC](https://forums.freertos.org/t/in-tickless-idle-mode-expected-idle-time-is-always-less-then-4/6199 "2016-10-07T09:55:44Z")\
**Posts on this page:** 3\
**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 7, 2016, 9:55am UTC](https://forums.freertos.org/t/in-tickless-idle-mode-expected-idle-time-is-always-less-then-4/6199/1 "2016-10-07T09:55:44Z")

</div>

**[rahimoval](https://sourceforge.net/u/rahimoval/)** wrote on [Friday, October 07, 2016](https://sourceforge.net/p/freertos/discussion/382005/thread/7282764d/#3b84):

Hi all,  
I am using freeRTOS version 9.x.x on Freescale Cortex-M0+ port. I have configured tickless idle and using systick as normal context switch timer and during tickless idle the systick is deactivated and MCU specific 16 bit low-power timer (LPTMR) is activated to wake the MCU and make time adjusments to tick. It is working, but one problem which I heve is that in SuppressTickAndSleep the parameter xExpectedIdleTime is always less then 4, which is very short to put the MCU in LP-Mode. I am using timers with long periods (30 mins) and other my application tasks are blocked on queues waiting for messages. What am I doing wrong? Why the expected idle time is very short in my case?  
Thanks in advance for your answers

---

<div class="post-metadata">

**Author:** ![McuOnEclipse](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/mcuoneclipse/32/32_2.png) [@McuOnEclipse](https://forums.freertos.org/u/McuOnEclipse)\
**Post date:** [October 8, 2016, 11:36am UTC](https://forums.freertos.org/t/in-tickless-idle-mode-expected-idle-time-is-always-less-then-4/6199/2 "2016-10-08T11:36:15Z")

</div>

**[xz8987f](https://sourceforge.net/u/xz8987f/)** wrote on [Saturday, October 08, 2016](https://sourceforge.net/p/freertos/discussion/382005/thread/7282764d/#0603):

Hello,  
I would say that you have something running with a period of about 4 ticks? Are you sure you don’t have a task or FreeRTOS timer running at the frequency. If you are debugging it with a Segger probe, you might use their SystemView ([https://mcuoneclipse.com/2015/11/16/segger-systemview-realtime-analysis-and-visualization-for-freertos/](https://mcuoneclipse.com/2015/11/16/segger-systemview-realtime-analysis-and-visualization-for-freertos/)) to see what is going on. If you are using Eclipse, then a Kernel awareness might be helpful (see [https://mcuoneclipse.com/2016/07/06/freertos-kernel-awareness-for-eclipse-from-nxp/](https://mcuoneclipse.com/2016/07/06/freertos-kernel-awareness-for-eclipse-from-nxp/) and [https://mcuoneclipse.com/2016/04/09/freertos-thread-debugging-with-eclipse-and-openocd/](https://mcuoneclipse.com/2016/04/09/freertos-thread-debugging-with-eclipse-and-openocd/)). I had a similar problem in the past in a huge software project where a task was polling a semaphore instead of using a larger timeout: that polling thrashed pretty much longer idle time.

I hope this helps,  
Erich

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [October 8, 2016, 1:32pm UTC](https://forums.freertos.org/t/in-tickless-idle-mode-expected-idle-time-is-always-less-then-4/6199/3 "2016-10-08T13:32:43Z")

</div>

**[rahimoval](https://sourceforge.net/u/rahimoval/)** wrote on [Saturday, October 08, 2016](https://sourceforge.net/p/freertos/discussion/382005/thread/7282764d/#c0c1):

Hi,  
thanks for your reply. I found the problem. My tasks were blocking on queues with limited delay times (exactly 5 ticks). I have defined these delay times to port max delay and everything seems to be ok now. Thanks for your links. I’ll definitely look through them
