software timer

sasikalaswathi wrote on Wednesday, October 23, 2019:

In software timers, Whenever the timer set in xTimerCreate() less than the configTICK_RATE_HZ, value of xTimerPeriodInTicks variable inside the function prvInitialiseNewTimer taken as zero? Is my underatanding correct?

I tried for the following values,
time value - 1ms
configTICK_RATE_HZ - 10 ms.
In this case, value of xTimerPeriodInTicks is 0 eventhough i set the 1 ms.

sasikalaswathi wrote on Wednesday, October 23, 2019:

In case software timers, I need another confirmation. is there any restriction on the maximum time value set ?

rtel wrote on Wednesday, October 23, 2019:

The minimum time you can set is one tick. The maximum is 0xffffffff assuming TickType_t is 32-bits.

sasikalaswathi wrote on Wednesday, October 23, 2019:

Hi Richard, Thanks for the quick reply

richard_damon wrote on Wednesday, October 23, 2019:

Or more generally, PORT_MAXDELAY which will be 0xFFFF with 16 bit ticks and 0xFFFFFFFF for 32 bit ticks.

As to your first question, time periods are specifiec in TICKS, not ms, (you can use the macro pdMS_TO_TICKS to convert a time in ms to ticks), And configTICK_RATE_HZ would be specified in Hz, not ms, so a 10ms tick would be 100 Hz.