stack overflow or stack underflow error

cancel
Showing results for 
Search instead for 
Did you mean: 

stack overflow or stack underflow error

144 Views
smt87
Contributor II

Hi,

I am using S32k116 micro controller. For safety control I have a notification in case of stack overflow or stack underflow error. In safety document implementation hint is that It is possible to to use the data watchpoint comparator in DWT to trigger a debug monitor exception on stack overflow and underflow.

What does it means actually and how can i control these error status?

0 Kudos
3 Replies

119 Views
JRoberto
NXP Employee
NXP Employee

Hello @smt87 

This article explains how to debug with Watchpoints. Kindly take a look at:
Watchpoint with S32 Design Studio for S32 Platform... - NXP Community

Best Regards!

0 Kudos

112 Views
smt87
Contributor II

Hi

Actually, I want to use MTB_DWT register for stack overflow and underflow errors in my code. My question is how i can use this register and adopt it to my code.

0 Kudos

97 Views
JRoberto
NXP Employee
NXP Employee

Sadly it seems that this can not be done on the S32k11X. Check this thread.

https://community.nxp.com/t5/S32K/Example-of-DWT-for-stack-usage-monitoring-on-S32K1xx/m-p/1160990#

0 Kudos