Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training


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 ]    [ Sitemap ]    [ ]

Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.

Free TCP/IP and file system demos for the RTOS

Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

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

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

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

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists