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?
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?
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’.