FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [November 2016 Threads] 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.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|