Next expire timer and timer period in ticks
Hi,
What is the difference between Next expire timer (xNextExpireTime) and timer period in ticks (pxTimer->xTimerPeriodInTicks) ?
Next expire timer and timer period in ticks
There is little context to your question, but I’m going to guess the
next expire time is the time at which the timer callback function will
execute, while the timer period is the frequency at which the callback
function executes.
Next expire timer and timer period in ticks
Is next expire timer is relative to xTickCount ?
Is the next equation is correct :
xNextExpireTime = xTickCount + xTimerPeriodInTicks
Next expire timer and timer period in ticks
xNextExpireTime would be an absolute time (but relative to the wrap around period of the tick count). xTickCount is the current time as a absolute tick count, and xTimerPeriodInTicks would be an interval expressed in ticks.
For example, if you have a 100 Hz Tick Rate, and FreeRTOS has been running for 10 seconds, the current time would be 10*100 = 1000. If you want to set a timer for 1 second (100 ticks) then the expire time would be 1000 + 100 = 1100.