Quality RTOS & Embedded Software

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


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

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

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.


Careers

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

Renesas

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