Sample use of the Run Time Statistics function on S32K144

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Sample use of the Run Time Statistics function on S32K144

1,239 次查看
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 项奖励
回复
2 回复数

1,230 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

have you enabled the statistics in the freertos component?

lukaszadrapa_0-1624893509204.png

Regards,

Lukas

0 项奖励
回复

1,221 次查看
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 项奖励
回复