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] [April 2006 Threads] Fence-Post Errors and xFrequencyPosted by Nobody/Anonymous on April 13, 2006 Hello Richard,
I'm wondering if the mechanism that uses xFrequency to determine when tasks run takes into account something like this:
Let's say the timer is set to something which yields 256 ticks for 250ms. Should xFrequency be set to 255 or 256? i.e. - 256 'states' since counts start from zero...256 actually means 257 ticks instead?
Maybe the code already accounts for this.
Thanks, John W.
RE: Fence-Post Errors and xFrequencyPosted by Richard on April 13, 2006 Is this question relating to the vTaskDelayUntil() function, of the mechanism discussed in the other thread we have just posted to?
Could it be a resolution problem? For example, if you want to delay for 256 ticks, then the delay period could be between 256 ticks and (255 + n) ticks, where n is the fraction of time left between the delay function being called and the next tick?
Regards.
RE: Fence-Post Errors and xFrequencyPosted by Nobody/Anonymous on April 13, 2006 Hello Richard,
I haven't looked at that thread to tell you the truth - but I will.
Ex:
Timer_Hz = 1024 (0...1023) 250 ms 'scales' to 256 'counts' - is it really 255 ticks since we're really starting from 0 and not 1 - hence the 'fencepost'.
Thanks, John
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|