CMSIS-Core (Cortex-A)  Version 1.2.1
CMSIS-Core support for Cortex-A processor-based devices
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Intrinsic Functions

Functions that generate specific Cortex-A CPU Instructions. More...

Macros

#define __NOP   __nop
 No Operation. More...
 
#define __WFI   __wfi
 Wait For Interrupt. More...
 
#define __WFE   __wfe
 Wait For Event. More...
 
#define __SEV   __sev
 Send Event. More...
 
#define __ISB()   __isb(0xF)
 Instruction Synchronization Barrier. More...
 
#define __DSB()   __dsb(0xF)
 Data Synchronization Barrier. More...
 
#define __DMB()   __dmb(0xF)
 Data Memory Barrier. More...
 
#define __BKPT(value)   __breakpoint(value)
 Breakpoint. More...
 

Functions

uint32_t __REV (uint32_t value)
 Reverse byte order (32 bit) More...
 
uint16_t __REV16 (uint16_t value)
 Reverse byte order (16 bit) More...
 
int32_t __REVSH (int32_t value)
 Reverse byte order (16 bit) More...
 
uint32_t __ROR (uint32_t op1, uint32_t op2)
 Rotate Right in unsigned value (32 bit) More...
 
uint32_t __RBIT (uint32_t value)
 Reverse bit order of value. More...
 
uint8_t __CLZ (uint32_t value)
 Count leading zeros. More...
 

Description

Macro Definition Documentation

#define __BKPT (   value)    __breakpoint(value)

Causes the processor to enter Debug state. Debug tools can use this to investigate system state when the instruction at a particular address is reached.

Causes the processor to enter Debug state. Debug tools can use this to investigate system state when the instruction at a particular address is reached.

Parameters
[in]valueis ignored by the processor. If required, a debugger can use it to store additional information about the breakpoint.
#define __DMB ( )    __dmb(0xF)

Ensures the apparent order of the explicit memory operations before and after the instruction, without ensuring their completion.

#define __DSB ( )    __dsb(0xF)

Acts as a special kind of Data Memory Barrier. It completes when all explicit memory accesses before this instruction complete.

#define __ISB ( )    __isb(0xF)

Instruction Synchronization Barrier flushes the pipeline in the processor, so that all instructions following the ISB are fetched from cache or memory, after the instruction has been completed.

#define __NOP   __nop

No Operation does nothing. This instruction can be used for code alignment purposes.

#define __SEV   __sev

Send Event is a hint instruction. It causes an event to be signaled to the CPU.

#define __WFE   __wfe

Wait For Event is a hint instruction that permits the processor to enter

Wait For Event is a hint instruction that permits the processor to enter a low-power state until one of a number of events occurs.

#define __WFI   __wfi

Wait For Interrupt is a hint instruction that suspends execution until one of a number of events occurs.

Function Documentation

uint8_t __CLZ ( uint32_t  value)

Counts the number of leading zeros of a data value.

Parameters
[in]valueValue to count the leading zeros
Returns
number of leading zeros in value
uint32_t __RBIT ( uint32_t  value)

Reverses the bit order of the given value.

Parameters
[in]valueValue to reverse
Returns
Reversed value
uint32_t __REV ( uint32_t  value)

Reverses the byte order in unsigned integer value. For example, 0x12345678 becomes 0x78563412.

Parameters
[in]valueValue to reverse
Returns
Reversed value
uint16_t __REV16 ( uint16_t  value)

Reverses the byte order within each halfword of a word. For example, 0x12345678 becomes 0x34127856.

Parameters
[in]valueValue to reverse
Returns
Reversed value
int32_t __REVSH ( int32_t  value)

Reverses the byte order in a 16-bit value and returns the signed 16-bit result. For example, 0x0080 becomes 0x8000.

Parameters
[in]valueValue to reverse
Returns
Reversed value
uint32_t __ROR ( uint32_t  op1,
uint32_t  op2 
)

Rotate Right (immediate) provides the value of the contents of a register rotated by a variable number of bits.

Parameters
[in]op1Value to rotate
[in]op2Number of Bits to rotate
Returns
Rotated value