SLAU723A October 2017 – October 2018 MSP432E401Y , MSP432E411Y
The processor uses a full descending stack, meaning that the stack pointer indicates the last stacked item on the 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, with a pointer for each held in independent registers (see the SP register on Figure 1-5).
In thread mode, the CONTROL register (see Figure 1-12) controls whether the processor uses the main stack or the process stack. In handler mode, the processor always uses the main stack. Table 1-1 lists the options for processor operations.
Processor Mode | Use | Privilege Level | Stack Used |
---|---|---|---|
Thread | Applications | Privileged or unprivileged(1) | Main stack or process stack(1) |
Handler | Exception handlers | Always privileged | Main stack |