5.27 Main and Process stacks

The microcontroller profiles support two different stacks, a main stack and a process stack.

There are two stack pointers in a microcontroller profile, one for each stack. Only one stack pointer is visible at a time, depending on the stack in use.
The main stack is used at reset, and on entry to an exception handler. To use the process stack it must be selected. You can do this while in Thread Mode, by writing to CONTROL[1] using an MSR instruction.

Note

Your initialization or context switching code must initialize the process stack pointer.
Non-ConfidentialPDF file icon PDF versionARM DUI0471K
Copyright © 2010-2014 ARM. All rights reserved.