5.6.4 How Do I Know If the Stack Has Overflowed?

The 16-bit devices use a stack that's upper address boundary can be set in the SPLIM register. Therefore, it is possible to set a stack level to prevent overflow.

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:

Auto Variable Allocation and Access, "Software Stack"

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

See the software stack in your device data sheet.