UM10462
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2016. All rights reserved.
User manual
Rev. 5.5 — 21 December 2016
456 of 523
NXP Semiconductors
UM10462
Chapter 24: LPC11U3x/2x/1x Appendix ARM Cortex-M0
The CMSIS also provides a number of functions for accessing the special registers using
MRS and MSR instructions:
24.4.3 About the instruction descriptions
The following sections give more information about using the instructions:
•
•
Section 24.4.3.2 “Restrictions when using PC or SP”
•
Section 24.4.3.3 “Shift Operations”
•
Section 24.4.3.4 “Address alignment”
•
Section 24.4.3.5 “PC-relative expressions”
•
Section 24.4.3.6 “Conditional execution”
24.4.3.1 Operands
An instruction operand can be an ARM register, a constant, or another instruction-specific
parameter. Instructions act on the operands and often store the result in a destination
register. When there is a destination register in the instruction, it is usually specified before
the other operands.
24.4.3.2 Restrictions when using PC or SP
Many instructions are unable to use, or have restrictions on whether you can use, the
Program Counter
(PC) or
Stack Pointer
(SP) for the operands or destination register.
See instruction descriptions for more information.
Remark:
When you update the PC with a BX, BLX, or POP instruction, bit[0] of any
address must be 1 for correct execution. This is because this bit indicates the destination
instruction set, and the Cortex-M0 processor only supports Thumb instructions. When a
BL or BLX instruction writes the value of bit[0] into the LR it is automatically assigned the
value 1.
SEV
void __SEV(void)
WFE
void __WFE(void)
WFI
void __WFI(void)
Table 425. insic functions to access the special registers
Special register
Access
CMSIS function
PRIMASK
Read
uint32_t __get_PRIMASK (void)
Write
void __set_PRIMASK (uint32_t value)
CONTROL
Read
uint32_t __get_CONTROL (void)
Write
void __set_CONTROL (uint32_t value)
MSP
Read
uint32_t __get_MSP (void)
Write
void __set_MSP (uint32_t TopOfMainStack)
PSP
Read
uint32_t __get_PSP (void)
Write
void __set_PSP (uint32_t TopOfProcStack)
Table 424. CMSIS intrinsic functions to generate some Cortex-M0 instructions
Instruction
CMSIS intrinsic function