PM0215
3.2
CMSIS intrinsic functions
ISO/IEC C code cannot directly access some Cortex-M0 instructions. This section describes
intrinsic functions that can generate these instructions, provided by the CMIS and that might
be provided by a C compiler. If a C compiler does not support an appropriate intrinsic
function, you might have to use an inline assembler to access some instructions.
The CMSIS provides the intrinsic functions listed in
ISO/TEC C code cannot directly access.
Table 15.
Instruction
CPSIE I
CPSID I
ISB
DSB
DMB
NOP
REV
REV16
REVSH
SEV
WFE
WFI
The CMSIS also provides a number of functions for accessing the special registers using
and
MRS
Table 16.
Special register
PRIMASK
CONTROL
MSP
PSP
CMSIS intrinsic functions to generate some Cortex-M0 instructions
void __enable_irq(void)
void __disable_irq(void)
void __ISB(void)
void __DSB(void)
void __DMB(void)
void __NOP(void)
uint32_t __REV(uint32_t int value)
uint32_t __REV16(uint32_t int value)
uint32_t __REVSH(uint32_t int value)
void __SEV(void)
void __WFE(void)
void __WFI(void)
instructions (see
MSR
CMSIS intrinsic functions to access the special registers
Access
Read
Write
Read
Write
Read
Write
Read
Write
Doc ID 022979 Rev 1
The STM32 Cortex-M0 instruction set
Table 15
CMSIS intrinsic function
Table
16).
uint32_t __get_PRIMASK (void)
void __set_PRIMASK (uint32_t value)
uint32_t __get_CONTROL (void)
void __set_CONTROL (uint32_t value)
uint32_t __get_MSP (void)
void __set_MSP (uint32_t TopOfMainStack)
uint32_t __get_PSP (void)
void __set_PSP (uint32_t TopOfProcStack)
to generate instructions that
CMSIS function
35/91
Need help?
Do you have a question about the STM32F0 Series and is the answer not in the manual?
Questions and answers