4.6.4 How Do I Know If the Stack Has Overflowed?

The 32-bit DSC devices use a stack that has an upper address boundary determined the the SPLIM SFR. Any stack operation beyond that boundary will trigger a _StackError trap.

Other stack errors, besides overflow, may be trapped and identified in code. For more information about using the software stack, see the following sections of this guide:

11.2.3 Auto Variable Allocation and Access, "Software Stack"

11.2.3 Auto Variable Allocation and Access, "The C Stack Usage"

See the software stack in your device data sheet.