Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


Tickless Idle and timers question

Posted by denisdaviau on May 14, 2014

In my application, I need to run in two different modes. When the screen is active, I need to use timers for screen updates and such. Once that times out, I need to go into low power mode that is exited with the RTC or a touch interrupt (no active software timers). I plan on stopping all the timers before going to sleep and turning them back on after wakeup.

The tickless idle examples I saw have timers turned off. Is there a restriction on the use of tickless idle and software timers?

In my "playing" I noticed something strange with my bare bones project. With times turned on (configUSETIMERS = 1) but no timers created, I still get my current consumption down to where I need it. The strange thing is that after the first RTC wake up, vTaskDelay (associated with an LED on period) is 10 times as long as it was before going to sleep. With the timers turned off (configUSETIMERS = 0) this is not an issue.

Your help with this is greatly appreciated.


Tickless Idle and timers question

Posted by rtel on May 14, 2014

I think the only time software timers become a problem is when you want an indefinite tickless time.

If all the application's tasks are blocked indefinitely (they are all waiting for events without a timeout) then the maximum tickless period you can achieve is dependent on how frequently the clock overflows. If your are only using a 16-bit clock then it might overflow frequently, so if your application allows, it could make sense to just turn the clock off completely, so the only thing that can wake the system up is an external event rather than a pre-programmed timer event. However, you cannot turn the clock off completely if you are using software timers - therefore software timer functionality and indefinite tickless period functionality are mutually exclusive.


Tickless Idle and timers question

Posted by denisdaviau on May 15, 2014

I did get tickless idle to work with a software timer. It was a bit of a hack, with changes to port.c, task.c, timers.c and timers.h. The key is to stop timers when you want to go to "Stop" mode and start them back up again when the application is active.

If anyone is interested, I can post the code. (tell me how cause I am new to the Source Forge support portal.)

Tickless Idle and timers question

Posted by lantczak on September 6, 2016

@Denis can you confirm that tickless mode is not working correctly with software timers? I noticed strange behaviour of my system when tickless mode is used

Tickless Idle and timers question

Posted by rtel on September 6, 2016

You don't say what your issue is, what version of FreeRTOS you are using, and are replying to a very old thread. If you look through the version history you will see some changes were made to better support timers in tickless mode - which version are you using?

[ Back to the top ]    [ About FreeRTOS ]    [ Privacy ]    [ Sitemap ]    [ ]

Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


FreeRTOS and other embedded software careers at AWS.

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers


STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner