I want to use MTB_DWT register for stack overflow and underflow errors in my code(MCU S32K116). My question is how i can use this register and adopt it to my code.
Unfortunately, the S32k1XX's core can't access these registers. The registers can be accessed via DAP by the debugger only.
Please refer to this thread for more details.
I'm sorry for the inconvenient this may cause.