Main and Process Stacks

The microcontroller profiles support two different stacks, a main stack and a process stack. It has two stack pointers, 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.


Your initialization or context switching code must initialize the process stack pointer.

Copyright © 2010-2012 ARM. All rights reserved.ARM DUI 0471G