xTimerChangePeriod(): smallest value allowed for parameter xNewPeriod

Dear all,

I wonder is there is a smallest value allowed for parameter xNewPeriod for timer API function xTimerChangePeriod( xTimer, xNewPeriod, xTicksToWait )?

I know that 0 is not supported which is internally checked by

configASSERT( ( pxTimer->xTimerPeriodInTicks > 0 ) );

Is there any other limitation, would even xNewPeriod = 1 tick work reliable? I did’t encounter any issue, just would like to get sure that I have only forbid xNewPeriod = 0.

regards

spachner

A period of 1 would be activated every tick, which is quite possible, but might have better ways to do. The issue with 0 is that it means keep doing it without a break, which doesn’t make real sense.

Hi,

thanks for the quick answer. I understand what you are saying, but you presuppose that xTimerCreate() was called with uxAutoReload = true.

Could even imagine that xTimerChangePeriod(..., xNewPeriod = 0, ...) would make sense for a one-shot timer. Would expect that the callback is fired immediately then. Could e.g. happen when xNewPeriod is calculated somehow by a fomulae and results, as an edge-case, to 0.

But nevertheless I’m fine.

regards

spachner