Hello,
We call vTaskStartScheduler() quite late after power-up. By this, the xTickCount does not represent the number of ticks since power-up.
To change this we removed the scheduler startet condition from the SysTickHandler:
~~~
void SysTickHandler()
{
//if ( xTaskGetSchedulerState() == taskSCHEDULER
NOTSTARTED )
xPortSysTickHandler();
}
~~~
and added the follwing return in case the scheduler is not running:
~~~
BaseType_t xTaskIncrementTick( void )
{
[…]
xTickCount = xConstTickCount;
if ( xSchedulerRunning != pdTRUE )
return pdFALSE;
if( xConstTickCount == ( TickType_t ) 0U )
[...]
}
~~~
Is this solution ok or is there better, less intrusive option (despite of starting the scheduler immediately after power-up)?
Thanks a lot for any help and best regards!