How is max stack usage calculated in RTOS Resources tab in e2studio for Threadx threads?



We are using the RTOS resources tab in the debug view to view stack usage of the threadx threads while debugging.

The RTOS resources tab seems to be generating valid values for the column labeled MaxStackUsage(bytes).

However, I'm having trouble understanding how this value is determined.

I expected the TX_THREAD memeber variable , tx_thread_stack_highest_ptr , to hold the stack pointer when the stack was at maximum usage.  However, when I view this in memory for any of our threads, I find that the value is 0.

If not tx_thread_stack_highest_ptr , then how does the RTOS resources tab in e2studio determine maximum stack usage?  

I noticed that MaxStackUsage(bytes) is greyed out when selecting columns for real time refresh.  

SSP: 1.4.0


Version: 6.2.0
Build Id: R20180102-1636

Processor: S5D9