
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
685 of 808
NXP Semiconductors
UM10360
Chapter 34: Appendix: Cortex-M3 User Guide
2.10.2 CPS
Change Processor State.
2.10.2.1
Syntax
CPS
effect
iflags
where:
effect
is one of:
IE
Clears the special purpose register.
ID
Sets the special purpose register
iflags
is a sequence of one or more flags:
i
Set or clear PRIMASK.
f
Set or clear FAULTMASK.
2.10.2.2
Operation
CPS
changes the PRIMASK and FAULTMASK special register values. See
35–1.1.3.6 “Exception mask registers”
for more information about these registers.
2.10.2.3
Restrictions
The restrictions are:
•
use
CPS
only from privileged software, it has no effect if used in unprivileged software.
•
CPS
cannot be conditional and so must not be used inside an IT block.
2.10.2.4
Condition flags
This instruction does not change the condition flags.
2.10.2.5
Examples
CPSID i
; Disable interrupts and configurable fault handlers (set PRIMASK)
CPSID f
; Disable interrupts and all fault handlers (set FAULTMASK)
CPSIE i
; Enable interrupts and configurable fault handlers (clear PRIMASK)
CPSIE f
; Enable interrupts and fault handlers (clear FAULTMASK)