forkd

Dependencies:   mbed

Fork of LGstaandart by Dmitry Kovalev

Embed: (wiki syntax)

« Back to documentation index

CMSIS Core Instruction Interface

CMSIS Core Instruction Interface

Access to dedicated instructions. More...

Functions

uint32_t __REV16 (uint32_t value)
 Reverse byte order (16 bit)
int32_t __REVSH (int32_t value)
 Reverse byte order in signed short value.
void __CLREX (void)
 Remove the exclusive lock.
static __INLINE void __WFI (void)
 Wait For Interrupt.
static __INLINE void __WFE (void)
 Wait For Event.
static __INLINE void __SEV (void)
 Send Event.
static uint32_t __RBIT (uint32_t value)
 Reverse bit order of value.
static uint8_t __LDREXB (volatile uint8_t *addr)
 LDR Exclusive (8 bit)
static uint16_t __LDREXH (volatile uint16_t *addr)
 LDR Exclusive (16 bit)
static uint32_t __LDREXW (volatile uint32_t *addr)
 LDR Exclusive (32 bit)
static uint32_t __STREXB (uint8_t value, volatile uint8_t *addr)
 STR Exclusive (8 bit)
static uint32_t __STREXH (uint16_t value, volatile uint16_t *addr)
 STR Exclusive (16 bit)
static uint32_t __STREXW (uint32_t value, volatile uint32_t *addr)
 STR Exclusive (32 bit)
 __attribute__ ((always_inline)) static __INLINE void __NOP(void)
 No Operation.

Detailed Description

Access to dedicated instructions.


Function Documentation

__attribute__ ( (always_inline)   )

No Operation.

STR Exclusive (16 bit)

STR Exclusive (8 bit)

LDR Exclusive (32 bit)

LDR Exclusive (16 bit)

LDR Exclusive (8 bit)

Reverse bit order of value.

Reverse byte order in signed short value.

Reverse byte order (16 bit)

Reverse byte order (32 bit)

Data Memory Barrier.

Data Synchronization Barrier.

Instruction Synchronization Barrier.

Send Event.

Wait For Event.

Wait For Interrupt.

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

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

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.

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

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.

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

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

This function reverses the byte order in integer value.

Parameters:
[in]valueValue to reverse
Returns:
Reversed value

This function reverses the byte order in two unsigned short values.

Parameters:
[in]valueValue to reverse
Returns:
Reversed value

This function reverses the byte order in a signed short value with sign extension to integer.

Parameters:
[in]valueValue to reverse
Returns:
Reversed value

This function reverses the bit order of the given value.

Parameters:
[in]valueValue to reverse
Returns:
Reversed value

This function performs a exclusive LDR command for 8 bit value.

Parameters:
[in]ptrPointer to data
Returns:
value of type uint8_t at (*ptr)

This function performs a exclusive LDR command for 16 bit values.

Parameters:
[in]ptrPointer to data
Returns:
value of type uint16_t at (*ptr)

This function performs a exclusive LDR command for 32 bit values.

Parameters:
[in]ptrPointer to data
Returns:
value of type uint32_t at (*ptr)

This function performs a exclusive STR command for 8 bit values.

Parameters:
[in]valueValue to store
[in]ptrPointer to location
Returns:
0 Function succeeded
1 Function failed

This function performs a exclusive STR command for 16 bit values.

Parameters:
[in]valueValue to store
[in]ptrPointer to location
Returns:
0 Function succeeded
1 Function failed

Definition at line 459 of file core_cmInstr.h.

void __CLREX ( void   )

Remove the exclusive lock.

This function removes the exclusive lock which is created by LDREX.

static uint8_t __LDREXB ( volatile uint8_t *  addr ) [static]

LDR Exclusive (8 bit)

This function performs a exclusive LDR command for 8 bit value.

Parameters:
[in]ptrPointer to data
Returns:
value of type uint8_t at (*ptr)

Definition at line 355 of file core_cmInstr.h.

static uint16_t __LDREXH ( volatile uint16_t *  addr ) [static]

LDR Exclusive (16 bit)

This function performs a exclusive LDR command for 16 bit values.

Parameters:
[in]ptrPointer to data
Returns:
value of type uint16_t at (*ptr)

Definition at line 368 of file core_cmInstr.h.

static uint32_t __LDREXW ( volatile uint32_t *  addr ) [static]

LDR Exclusive (32 bit)

This function performs a exclusive LDR command for 32 bit values.

Parameters:
[in]ptrPointer to data
Returns:
value of type uint32_t at (*ptr)

Definition at line 382 of file core_cmInstr.h.

static uint32_t __RBIT ( uint32_t  value ) [static]

Reverse bit order of value.

This function reverses the bit order of the given value.

Parameters:
[in]valueValue to reverse
Returns:
Reversed value

Definition at line 342 of file core_cmInstr.h.

static uint32_t __REV16 ( uint32_t  value )

Reverse byte order (16 bit)

This function reverses the byte order in two unsigned short values.

Parameters:
[in]valueValue to reverse
Returns:
Reversed value

Definition at line 112 of file core_cmInstr.h.

static __INLINE __ASM int32_t __REVSH ( int32_t  value )

Reverse byte order in signed short value.

This function reverses the byte order in a signed short value with sign extension to integer.

Parameters:
[in]valueValue to reverse
Returns:
Reversed value

Definition at line 130 of file core_cmInstr.h.

static __INLINE void __SEV ( void   ) [static]

Send Event.

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

Definition at line 303 of file core_cmInstr.h.

static uint32_t __STREXB ( uint8_t  value,
volatile uint8_t *  addr 
) [static]

STR Exclusive (8 bit)

This function performs a exclusive STR command for 8 bit values.

Parameters:
[in]valueValue to store
[in]ptrPointer to location
Returns:
0 Function succeeded
1 Function failed

Definition at line 397 of file core_cmInstr.h.

static uint32_t __STREXH ( uint16_t  value,
volatile uint16_t *  addr 
) [static]

STR Exclusive (16 bit)

This function performs a exclusive STR command for 16 bit values.

Parameters:
[in]valueValue to store
[in]ptrPointer to location
Returns:
0 Function succeeded
1 Function failed

Definition at line 412 of file core_cmInstr.h.

static uint32_t __STREXW ( uint32_t  value,
volatile uint32_t *  addr 
) [static]

STR Exclusive (32 bit)

This function performs a exclusive STR command for 32 bit values.

Parameters:
[in]valueValue to store
[in]ptrPointer to location
Returns:
0 Function succeeded
1 Function failed

Definition at line 428 of file core_cmInstr.h.

static __INLINE void __WFE ( void   ) [static]

Wait For Event.

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.

Definition at line 293 of file core_cmInstr.h.

static __INLINE void __WFI ( void   ) [static]

Wait For Interrupt.

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

Definition at line 282 of file core_cmInstr.h.