michaeln32 wrote on Tuesday, July 31, 2018:
Hi,
What is the difference between Next expire timer (xNextExpireTime) and timer period in ticks (pxTimer->xTimerPeriodInTicks) ?
michaeln32 wrote on Tuesday, July 31, 2018:
Hi,
What is the difference between Next expire timer (xNextExpireTime) and timer period in ticks (pxTimer->xTimerPeriodInTicks) ?
rtel wrote on Tuesday, July 31, 2018:
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.
michaeln32 wrote on Wednesday, August 01, 2018:
Is next expire timer is relative to xTickCount ?
Is the next equation is correct :
xNextExpireTime = xTickCount + xTimerPeriodInTicks
richarddamon wrote on Wednesday, August 01, 2018:
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.