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




Loading

Is it possible to run a tickless timer at a slower frequency than the system tick?

Posted by martisen on November 28, 2016

I only have a 16-bit timer available to run in low-power mode, and I would like to have a tick rate of 1 ms when running normally.

However, my application will from time to time have long idle periods where it will onlywake up a couple of times per day.

Is it possible to run the tickless timer at a slower rate than the system tick, and not go into deep-sleep unless the xExpectedIdleTime is more than one count on the tickless timer, which for instance could be running at 1Hz?

Are there any recommended ways for sleeping for extended periods of time?


Is it possible to run a tickless timer at a slower frequency than the system tick?

Posted by rtel on November 28, 2016

Yes - if you are providing your own tickless idle implementation then you can either:

1) Have one clock that provides both the normal tick interrupts, and is re-programmed before sleep to generate the long sleep time, and after sleep to set the clock back to the tick frequency.

or

2) Use two clocks, say clock A and clock B. Then set clock A to generate the tick interrupt, before sleep stop clock A and set clock B to wake you up after the long sleep, on wake restart clock A so it generates the regular ticks again.


Is it possible to run a tickless timer at a slower frequency than the system tick?

Posted by heinbali01 on November 28, 2016

How long does it take before your 16-bit timer gets an overflow? What is its lowest frequency?

If you also want a tick-rate of 1000 Hz, I guess the longest sleep will only last 65.535 seconds :-)

Are other (32-bit) timers shut-down during this low power mode? Would it be really expensive to power them up?

Most of the current can often be saved by inspecting the I/O ports


Is it possible to run a tickless timer at a slower frequency than the system tick?

Posted by martisen on November 29, 2016

Thanks for the replies. Using the deepest sleepmode, I only have this 16-bit timer available as well as an RTC running at 1 hz.

So then I guess I will just do a custom implementation of the tickless idle with the tickless clock running at a very slow speed.


[ 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