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] [October 2016 Threads] Timer callback intrval accuracyPosted by joe_her on October 25, 2016 I wonder what accuracy can I get for the intrvals of the timer callback routine.
For example if I set it to 100 ms, System tick is 1ms, and the callback is short, how many ticks will it miss(if any)?
Is it better, or is it the same as read system ticks and wait with taskDelayUntil() in a task loop (instead of using timer callback)?
Thanks
Johanan
Timer callback intrval accuracyPosted by edwards3 on October 25, 2016 The accuracy is set by the tick frequency and the priority of the timer service task relative to other tasks.
All timing, including when a timer callback function is executed, is limited by the granularity of the configured tick frequency.For example if you block a task for 10 ticks and the task enters the blocked state immediately before a tick interrupt the time the task blocks for will be closer to 9 ticks than 10, maybe 9.05 ticks. If instead the task entered the block state immediately after a tick interrupt the time the task blocks for could be 9.999 ticks.
Timer callback intrval accuracyPosted by joe_her on October 26, 2016 I can set normal task priority, but I don't see how to set a software timer priority that runs a call back function.
So if I need a function that will run every 100 ms, and I can tolerate some +/- gittter on the interval, but would like that the average time will be as accurate as possible (that is after 1000 seconds it will run 10000 times), what is the best way to implement it? (softwre timer? waitUntil? or any other idea..)
Timer callback intrval accuracyPosted by rtel on October 26, 2016 See http://www.freertos.org/RTOS-software-timer.html and in particular
the description of configTIMERTASKPRIORITY on
http://www.freertos.org/Configuring-a-real-time-RTOS-application-to-use-software-timers.html
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|