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 using an
Your initialization or context switching code must initialize
the process stack pointer.