SWCU185G January 2018 – June 2024 CC1312PSIP , CC1312R , CC1352P , CC1352R , CC2642R , CC2642R-Q1 , CC2652P , CC2652PSIP , CC2652R , CC2652RB , CC2652RSIP , CC2662R-Q1
The Arm® Cortex®-M4F 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 in Table 3-16).
In thread mode, the CONTROL register (see Table 3-24) controls whether the processor uses the main stack or the process stack. In handler mode, the processor always uses the main stack. Table 3-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 |
Handler | Exception handlers | Always privileged | Main stack |