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

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

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

922 Views
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:

Labels (1)
0 Kudos
1 Reply

744 Views
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 Kudos