Sample use of the Run Time Statistics function on S32K144

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Sample use of the Run Time Statistics function on S32K144

992 Views
fengjuntian
Contributor I

hello,

I created a FreeRTOS project and used vTaskGetRuntimeStats () to get CPU usage.

But the program kept running portFORCE_INLINE static void vPortRaiseBASEPRI( void )

Please provide a sample program, thank you!

0 Kudos
Reply
2 Replies

983 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

have you enabled the statistics in the freertos component?

lukaszadrapa_0-1624893509204.png

Regards,

Lukas

0 Kudos
Reply

974 Views
fengjuntian
Contributor I

Thank you. I've solved the overflow problem.

I configured both options

#define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() /* nothing */ /* default: use Tick counter as runtime counter */

#define portGET_RUN_TIME_COUNTER_VALUE()    xTaskGetTickCount() /* default: use Tick counter as runtime counter */ 

My new question is, how do I calculate the CPU usage statistics for every five minutes?

0 Kudos
Reply