Only privileged software can write to the
CONTROL
register to change the privilege level for software
execution in Thread mode. Unprivileged software can use the
SVC
instruction to make a supervisor
call to transfer control to privileged software.
2.3.2
Stacks
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 page 89).
In Thread mode, the
CONTROL
register (see page 99) controls whether the processor uses the
main stack or the process stack. In Handler mode, the processor always uses the main stack. The
options for processor operations are shown in Table 2-1 on page 85.
Table 2-1. Summary of Processor Mode, Privilege Level, and Stack Use
Stack Used
Privilege Level
Use
Processor Mode
Main stack or process stack
a
Privileged or unprivileged
a
Applications
Thread
Main stack
Always privileged
Exception handlers
Handler
a. See
CONTROL
2.3.3
Register Map
Figure 2-3 on page 86 shows the Cortex-M4F register set. Table 2-2 on page 86 lists the Core
registers. The core registers are not memory mapped and are accessed by register name, so the
base address is n/a (not applicable) and there is no offset.
85
June 18, 2014
Texas Instruments-Production Data
Tiva
™
TM4C1294NCPDT Microcontroller