2.5.1.2 Stacks

The processor uses a full descending stack. This means the stack pointer holds the address of the last stacked item in the stack memory. When the processor pushes a new item onto the stack, it decrements the stack pointer and then writes the item to the new memory location. The processor implements two stacks, the main stack and the process stack, held in independent registers, see 2.5.1.3.2 Stack Pointer.

In Thread mode, the CONTROL register controls whether the processor uses the main stack or the process stack, see 2.5.1.3.10 CONTROL Register. In Handler mode, the processor always uses the main stack. The options for processor operations are:

Table 2-1. Summary of Processor Mode, Execution Privilege Level, and Stack Use Options
Processor Mode Used to Execute Privilege Level for Software Execution Stack Used
Thread Applications Privileged or unprivileged Main stack or process stack
Handler Exception handlers Always privileged Main stack