UM10360 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2013. All rights reserved.
User manual Rev. 3 — 20 December 2013 717 of 841
NXP Semiconductors
UM10360
Chapter 34: Appendix: Cortex-M3 user guide
34.2.10.2 CPS
Change Processor State.
34.2.10.2.1 Syntax
CPSeffect 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.
34.2.10.2.2 Operation
CPS
changes the PRIMASK and FAULTMASK special register values. See
Section 34.3.1.3.6 “
Exception mask registers” for more information about these registers.
34.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.
34.2.10.2.4 Condition flags
This instruction does not change the condition flags.
34.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)