
DR
AFT
DR
AFT
DRAFT
DR
D
RAFT
DRAFT
DRA
FT DRAF
D
RAFT DRAFT DRAFT DRAFT DRAFT D
DRAFT
D
RAFT DRA
FT DRAFT DRAFT DRAFT DRA
UM10360_0
© NXP B.V. 2009. All rights reserved.
User manual
Rev. 00.06 — 5 June 2009
703 of 808
NXP Semiconductors
UM10360
Chapter 34: Appendix: Cortex-M3 User Guide
Base Priority Mask Register:
The BASEPRI register defines the minimum priority for
exception processing. When BASEPRI is set to a nonzero value, it prevents the activation
of all exceptions with same or lower priority level as the BASEPRI value. See the register
summary in
for its attributes. The bit assignments are shown in
[1]
This field is similar to the priority fields in the interrupt priority registers. The processor implements only
bits[7:M] of this field, bits[M-1:0] read as zero and ignore writes. The value of M depends on the specific
device. See
Section 37–1.2.7 “Interrupt Priority Registers”
for more information. Remember that higher
priority field values correspond to lower exception priorities.
3.1.3.7
CONTROL register
The CONTROL register controls the stack used and the privilege level for software
execution when the processor is in Thread mode. See the register summary in
for its attributes. The bit assignments are shown in
Handler mode always uses the MSP, so the processor ignores explicit writes to the active
stack pointer bit of the CONTROL register when in Handler mode. The exception entry
and return mechanisms update the CONTROL register.
In an OS environment, ARM recommends that threads running in Thread mode use the
process stack and the kernel and exception handlers use the main stack.
By default, Thread mode uses the MSP. To switch the stack pointer used in Thread mode
to the PSP, use the
MSR
instruction to set the Active stack pointer bit to 1, see
Remark:
When changing the stack pointer, software must use an
ISB
instruction
immediately after the
MSR
instruction. This ensures that instructions after the ISB execute
using the new stack pointer. See
Table 605.
BASEPRI register bit assignments
Bits
Name
Function
[31:8]
-
Reserved
[7:0]
BASEPRI
Priority mask bits:
0x0000
= no effect
Nonzero = defines the base priority for exception processing.
The processor does not process any exception with a priority value
greater than or equal to BASEPRI.
Table 606.
CONTROL register bit assignments
Bits
Name
Function
[31:2]
-
Reserved
[1]
Active stack
pointer
Defines the current stack:
0 = MSP is the current stack pointer
1 = PSP is the current stack pointer.
In Handler mode this bit reads as zero and ignores writes.
[0]
Thread mode
privilege level
Defines the Thread mode privilege level:
0 = privileged
1 = unprivileged.