We are porting FreeRTOS to our R5F based platform. We see that portGET_RUN_TIME_COUNTER_VALUE returns a 32b and that is accumulated in pxCurrentTCB->ulRunTimeCounter,
*pulTotalRunTime = portGET_RUN_TIME_COUNTER_VALUE();
is used to get total time and then report task load numbers as %.
However in modern systems we do tend to switch tasks pretty rapidly so we want to use a high res timer, like 1us or 10us resolution.
But at 32b variables, @ 1us , the variables used by freertos will overflow in ~ 1hr and @ 10us in about 10 hrs and so.
A better solution would have been to define a type for this counters and then let the porting layer or application decide the type as uint32_t or uint64_t
Is my understanding correct this is a limitation in FreeRTOS run-time stats counting ?
Is there is a solution that can be used without modifying the FreeRTOS kernel ?