How can I calculate stack consumption of ControllerTask which internally calls Controller_TaskHandler((void *) NULL)?

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

How can I calculate stack consumption of ControllerTask which internally calls Controller_TaskHandler((void *) NULL)?

1,203 次查看
abaniketbhumkar
Contributor I

I am using freeRTOS API uxTaskGetStackHighWaterMark(NULL) to calculate the stack consumption of each task. I placed this API in while(1) of each task so that I can get the perfect runtime stack usage of each task.

I need to calculate stack consumption of ControllerTask which internally calls Controller_TaskHandler((void *) NULL).

As the Controller_TaskHandler((void *) NULL) is library function call, it is not accessible to us. 

Where can I use the uxTaskGetStackHighWaterMark(NULL) API to calculate the stack consumption of ControllerTask? Is there any callback from ControllerTask where I can use this API?

Thank you in advance :smileyhappy:

标签 (1)
0 项奖励
回复
1 回复

1,025 次查看
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi Aniket,

You are right, this task is part of the library that we provide. The task handler could be measure or could give you an idea of the memory that is taking for the process.

You could take as reference the Task list in the MCUxpresso.

pastedImage_1.png

Regards,

Mario

0 项奖励
回复