Code is hanging at xResult = xTimerGenericCommand?

So i have used Freertos timers before, and in this project i have used 3 freertos timer. it was running smoothly earlier. but ad task increased i have notice the code gets hang at

							xResult = xTimerGenericCommand( pxTimer, tmrCOMMAND_START_DONT_TRACE, xMessage.u.xTimerParameters.xMessageValue + pxTimer->xTimerPeriodInTicks, NULL, tmrNO_DELAY );
							configASSERT( xResult );

in timers.c

For troubleshooting i disabled one freertos timer but than it started Hanging at assert for another timer. this is timer related issue but i am unable to pinpoint what is causing it?

Timer task Stack depth is 256
Timer task priority is 3
Timer queue length is 10

Is the code actually stuck on the configASSERT() statement? A very common implementation of configASSERT() is to loop forever so that a developer can identify a problem and inspect the cause.

What is the return value in xResult?

Hi Jefftenney,
Thanks for reply, the xResult is 0. It just started happening randomly.

I’m assuming you found that xResult is zero after the call the xTimerGenericCommand(). And I’m also assuming your configASSERT() is defined to loop forever and do nothing when an assertion fails. Will you please use a debugger to verify these two assumptions?

Assuming the above, the timer command queue is likely full. Can you try increasing the queue length from 10 to 15?

Also, is the timer task highest priority? Is it possible that other lower priority tasks are starving timer task?