Assert failed: prvProcessReceivedCommands timers.c:862 (xResult)

I’m getting an assert in the following kernel code:

if( ( pxTimer->ucStatus & tmrSTATUS_IS_AUTORELOAD ) != 0 )
    xResult = xTimerGenericCommand( pxTimer, tmrCOMMAND_START_DONT_TRACE, xMessage.u.xTimerParameters.xMessageValue + pxTimer->xTimerPeriodInTicks, NULL, tmrNO_DELAY );
    configASSERT( xResult );
    ( void ) xResult;

As this only happens sporadically, I’m not sure what I can do about it. Can you think of a scenario where xTimerGenericCommand would fail?

CPU load is about 30%, free memory about 100K, number of tasks is 9.

Is it possible that timer command queue is not large enough? Can you try increasing the value of configTIMER_QUEUE_LENGTH?


I just wanted to follow up and see if you had a chance to try out Gaurav’s suggestion to try and increase the value of configTIMER_QUEUE_LENGTH ?

Was that suggestion helpful or do you require any further assistance?


Sorry for not getting back earlier. In my tests, increasing the configTIMER_QUEUE_LENGTH did not help. I’m afraid it has to do with concurrency, since I did use the timer API to blink LEDs, which involves a lot of (possibly concurrent) calls to reset the timer, if blinking should keep on.

Before investigating deeper though I wanted to try another way to handle blinking LEDs (PWM, low-power coprocessor) and settled on the latter one. When I have some time, I will try to create an artificial minimal example that resembles my use case ­– perhaps I can reproduce it again and we can continue taking a look.

Thank you for reporting back!