Arrow / Mbed OS DAPLink Reset
Embed: (wiki syntax)

« Back to documentation index

CMSIS Core Register Access Functions

CMSIS Core Register Access Functions

Functions

__STATIC_INLINE uint32_t __get_CONTROL (void)
 Enable IRQ Interrupts.
__STATIC_INLINE void __set_CONTROL (uint32_t control)
 Set Control Register.
__STATIC_INLINE uint32_t __get_IPSR (void)
 Get IPSR Register.
__STATIC_INLINE uint32_t __get_APSR (void)
 Get APSR Register.
__STATIC_INLINE uint32_t __get_xPSR (void)
 Get xPSR Register.
__STATIC_INLINE uint32_t __get_PSP (void)
 Get Process Stack Pointer.
__STATIC_INLINE void __set_PSP (uint32_t topOfProcStack)
 Set Process Stack Pointer.
__STATIC_INLINE uint32_t __get_MSP (void)
 Get Main Stack Pointer.
__STATIC_INLINE void __set_MSP (uint32_t topOfMainStack)
 Set Main Stack Pointer.
__STATIC_INLINE uint32_t __get_PRIMASK (void)
 Get Priority Mask.
__STATIC_INLINE void __set_PRIMASK (uint32_t priMask)
 Set Priority Mask.
__STATIC_INLINE uint32_t __get_BASEPRI (void)
 Get Base Priority.
__STATIC_INLINE void __set_BASEPRI (uint32_t basePri)
 Set Base Priority.
__STATIC_INLINE void __set_BASEPRI_MAX (uint32_t basePri)
 Set Base Priority with condition.
__STATIC_INLINE uint32_t __get_FAULTMASK (void)
 Get Fault Mask.
__STATIC_INLINE void __set_FAULTMASK (uint32_t faultMask)
 Set Fault Mask.
__STATIC_INLINE uint32_t __get_FPSCR (void)
 Get FPSCR.
__STATIC_INLINE void __set_FPSCR (uint32_t fpscr)
 Set FPSCR.
__STATIC_FORCEINLINE uint32_t __TZ_get_CONTROL_NS (void)
 Get Control Register (non-secure)
__STATIC_FORCEINLINE void __TZ_set_CONTROL_NS (uint32_t control)
 Set Control Register (non-secure)
__STATIC_FORCEINLINE uint32_t __TZ_get_PSP_NS (void)
 Get Process Stack Pointer (non-secure)
__STATIC_FORCEINLINE void __TZ_set_PSP_NS (uint32_t topOfProcStack)
 Set Process Stack Pointer (non-secure)
__STATIC_FORCEINLINE uint32_t __TZ_get_MSP_NS (void)
 Get Main Stack Pointer (non-secure)
__STATIC_FORCEINLINE void __TZ_set_MSP_NS (uint32_t topOfMainStack)
 Set Main Stack Pointer (non-secure)
__STATIC_FORCEINLINE uint32_t __TZ_get_SP_NS (void)
 Get Stack Pointer (non-secure)
__STATIC_FORCEINLINE void __TZ_set_SP_NS (uint32_t topOfStack)
 Set Stack Pointer (non-secure)
__STATIC_FORCEINLINE uint32_t __TZ_get_PRIMASK_NS (void)
 Get Priority Mask (non-secure)
__STATIC_FORCEINLINE void __TZ_set_PRIMASK_NS (uint32_t priMask)
 Set Priority Mask (non-secure)
__STATIC_FORCEINLINE uint32_t __TZ_get_BASEPRI_NS (void)
 Get Base Priority (non-secure)
__STATIC_FORCEINLINE void __TZ_set_BASEPRI_NS (uint32_t basePri)
 Set Base Priority (non-secure)
__STATIC_FORCEINLINE uint32_t __TZ_get_FAULTMASK_NS (void)
 Get Fault Mask (non-secure)
__STATIC_FORCEINLINE void __TZ_set_FAULTMASK_NS (uint32_t faultMask)
 Set Fault Mask (non-secure)
__STATIC_FORCEINLINE uint32_t __get_PSPLIM (void)
 Get Process Stack Pointer Limit Devices without ARMv8-M Main Extensions (i.e.
__STATIC_FORCEINLINE uint32_t __TZ_get_PSPLIM_NS (void)
 Get Process Stack Pointer Limit (non-secure) Devices without ARMv8-M Main Extensions (i.e.
__STATIC_FORCEINLINE void __set_PSPLIM (uint32_t ProcStackPtrLimit)
 Set Process Stack Pointer Limit Devices without ARMv8-M Main Extensions (i.e.
__STATIC_FORCEINLINE void __TZ_set_PSPLIM_NS (uint32_t ProcStackPtrLimit)
 Set Process Stack Pointer (non-secure) Devices without ARMv8-M Main Extensions (i.e.
__STATIC_FORCEINLINE uint32_t __get_MSPLIM (void)
 Get Main Stack Pointer Limit Devices without ARMv8-M Main Extensions (i.e.
__STATIC_FORCEINLINE uint32_t __TZ_get_MSPLIM_NS (void)
 Get Main Stack Pointer Limit (non-secure) Devices without ARMv8-M Main Extensions (i.e.
__STATIC_FORCEINLINE void __set_MSPLIM (uint32_t MainStackPtrLimit)
 Set Main Stack Pointer Limit Devices without ARMv8-M Main Extensions (i.e.
__STATIC_FORCEINLINE void __TZ_set_MSPLIM_NS (uint32_t MainStackPtrLimit)
 Set Main Stack Pointer Limit (non-secure) Devices without ARMv8-M Main Extensions (i.e.
__STATIC_FORCEINLINE void __enable_irq (void)
 Enable IRQ Interrupts.
__STATIC_FORCEINLINE void __disable_irq (void)
 Disable IRQ Interrupts.
__STATIC_FORCEINLINE void __enable_fault_irq (void)
 Enable FIQ.
__STATIC_FORCEINLINE void __disable_fault_irq (void)
 Disable FIQ.

Function Documentation

__STATIC_FORCEINLINE void __disable_fault_irq ( void   )

Disable FIQ.

Disables FIQ interrupts by setting the F-bit in the CPSR. Can only be executed in Privileged modes.

Definition at line 517 of file cmsis_gcc.h.

__STATIC_FORCEINLINE void __disable_irq ( void   )

Disable IRQ Interrupts.

Disables IRQ interrupts by setting the I-bit in the CPSR. Can only be executed in Privileged modes.

Definition at line 207 of file cmsis_gcc.h.

__STATIC_FORCEINLINE void __enable_fault_irq ( void   )

Enable FIQ.

Enables FIQ interrupts by clearing the F-bit in the CPSR. Can only be executed in Privileged modes.

Definition at line 506 of file cmsis_gcc.h.

__STATIC_FORCEINLINE void __enable_irq ( void   )

Enable IRQ Interrupts.

Enables IRQ interrupts by clearing the I-bit in the CPSR. Can only be executed in Privileged modes.

Definition at line 196 of file cmsis_gcc.h.

__STATIC_FORCEINLINE uint32_t __get_APSR ( void   )

Get APSR Register.

Returns the content of the APSR Register.

Returns:
APSR Register value

Definition at line 195 of file cmsis_armcc.h.

__STATIC_FORCEINLINE uint32_t __get_BASEPRI ( void   )

Get Base Priority.

Returns the current value of the Base Priority register.

Returns:
Base Priority register value

Definition at line 310 of file cmsis_armcc.h.

__STATIC_FORCEINLINE uint32_t __get_CONTROL ( void   )

Enable IRQ Interrupts.

Get Control Register.

Enables IRQ interrupts by clearing the I-bit in the CPSR. Can only be executed in Privileged modes. Disable IRQ Interrupts

Disables IRQ interrupts by setting the I-bit in the CPSR. Can only be executed in Privileged modes. Get Control Register

Returns the content of the Control Register.

Returns:
Control Register value

Returns the content of the Control Register.

Returns:
Control Register value

Definition at line 159 of file cmsis_armcc.h.

__STATIC_FORCEINLINE uint32_t __get_FAULTMASK ( void   )

Get Fault Mask.

Returns the current value of the Fault Mask register.

Returns:
Fault Mask register value

Definition at line 347 of file cmsis_armcc.h.

__STATIC_FORCEINLINE uint32_t __get_FPSCR ( void   )

Get FPSCR.

Returns the current value of the Floating Point Status/Control register.

Returns:
Floating Point Status/Control register value

Definition at line 374 of file cmsis_armcc.h.

__STATIC_FORCEINLINE uint32_t __get_IPSR ( void   )

Get IPSR Register.

Returns the content of the IPSR Register.

Returns:
IPSR Register value

Definition at line 183 of file cmsis_armcc.h.

__STATIC_FORCEINLINE uint32_t __get_MSP ( void   )

Get Main Stack Pointer.

Returns the current value of the Main Stack Pointer (MSP).

Returns:
MSP Register value

Definition at line 243 of file cmsis_armcc.h.

__STATIC_FORCEINLINE uint32_t __get_MSPLIM ( void   )

Get Main Stack Pointer Limit Devices without ARMv8-M Main Extensions (i.e.

Cortex-M23) lack the non-secure Stack Pointer Limit register hence zero is returned always.

Returns the current value of the Main Stack Pointer Limit (MSPLIM).

Returns:
MSPLIM Register value

Cortex-M23) lack the non-secure Stack Pointer Limit register hence zero is returned always in non-secure mode.

Returns the current value of the Main Stack Pointer Limit (MSPLIM).

Returns:
MSPLIM Register value

Definition at line 689 of file cmsis_armclang.h.

__STATIC_FORCEINLINE uint32_t __get_PRIMASK ( void   )

Get Priority Mask.

Returns the current state of the priority mask bit from the Priority Mask Register.

Returns:
Priority Mask value

Definition at line 267 of file cmsis_armcc.h.

__STATIC_FORCEINLINE uint32_t __get_PSP ( void   )

Get Process Stack Pointer.

Returns the current value of the Process Stack Pointer (PSP).

Returns:
PSP Register value

Definition at line 219 of file cmsis_armcc.h.

__STATIC_FORCEINLINE uint32_t __get_PSPLIM ( void   )

Get Process Stack Pointer Limit Devices without ARMv8-M Main Extensions (i.e.

Cortex-M23) lack the non-secure Stack Pointer Limit register hence zero is returned always in non-secure mode.

Returns the current value of the Process Stack Pointer Limit (PSPLIM).

Returns:
PSPLIM Register value

Definition at line 601 of file cmsis_armclang.h.

__STATIC_FORCEINLINE uint32_t __get_xPSR ( void   )

Get xPSR Register.

Returns the content of the xPSR Register.

Returns:
xPSR Register value

Definition at line 207 of file cmsis_armcc.h.

__STATIC_FORCEINLINE void __set_BASEPRI ( uint32_t  basePri )

Set Base Priority.

Assigns the given value to the Base Priority register.

Parameters:
[in]basePriBase Priority value to set

Definition at line 322 of file cmsis_armcc.h.

__STATIC_FORCEINLINE void __set_BASEPRI_MAX ( uint32_t  basePri )

Set Base Priority with condition.

Assigns the given value to the Base Priority register only if BASEPRI masking is disabled, or the new value increases the BASEPRI priority level.

Parameters:
[in]basePriBase Priority value to set

Definition at line 335 of file cmsis_armcc.h.

__STATIC_FORCEINLINE void __set_CONTROL ( uint32_t  control )

Set Control Register.

Writes the given value to the Control Register.

Parameters:
[in]controlControl Register value to set

Definition at line 171 of file cmsis_armcc.h.

__STATIC_FORCEINLINE void __set_FAULTMASK ( uint32_t  faultMask )

Set Fault Mask.

Assigns the given value to the Fault Mask register.

Parameters:
[in]faultMaskFault Mask value to set

Definition at line 359 of file cmsis_armcc.h.

__STATIC_FORCEINLINE void __set_FPSCR ( uint32_t  fpscr )

Set FPSCR.

Assigns the given value to the Floating Point Status/Control register.

Parameters:
[in]fpscrFloating Point Status/Control value to set

Definition at line 391 of file cmsis_armcc.h.

__STATIC_FORCEINLINE void __set_MSP ( uint32_t  topOfMainStack )

Set Main Stack Pointer.

Assigns the given value to the Main Stack Pointer (MSP).

Parameters:
[in]topOfMainStackMain Stack Pointer value to set

Definition at line 255 of file cmsis_armcc.h.

__STATIC_FORCEINLINE void __set_MSPLIM ( uint32_t  MainStackPtrLimit )

Set Main Stack Pointer Limit Devices without ARMv8-M Main Extensions (i.e.

Cortex-M23) lack the non-secure Stack Pointer Limit register hence the write is silently ignored.

Assigns the given value to the Main Stack Pointer Limit (MSPLIM).

Parameters:
[in]MainStackPtrLimitMain Stack Pointer Limit value to set

Cortex-M23) lack the non-secure Stack Pointer Limit register hence the write is silently ignored in non-secure mode.

Assigns the given value to the Main Stack Pointer Limit (MSPLIM).

Parameters:
[in]MainStackPtrLimitMain Stack Pointer Limit value to set

Definition at line 734 of file cmsis_armclang.h.

__STATIC_FORCEINLINE void __set_PRIMASK ( uint32_t  priMask )

Set Priority Mask.

Assigns the given value to the Priority Mask Register.

Parameters:
[in]priMaskPriority Mask

Definition at line 279 of file cmsis_armcc.h.

__STATIC_FORCEINLINE void __set_PSP ( uint32_t  topOfProcStack )

Set Process Stack Pointer.

Assigns the given value to the Process Stack Pointer (PSP).

Parameters:
[in]topOfProcStackProcess Stack Pointer value to set

Definition at line 231 of file cmsis_armcc.h.

__STATIC_FORCEINLINE void __set_PSPLIM ( uint32_t  ProcStackPtrLimit )

Set Process Stack Pointer Limit Devices without ARMv8-M Main Extensions (i.e.

Cortex-M23) lack the non-secure Stack Pointer Limit register hence the write is silently ignored in non-secure mode.

Assigns the given value to the Process Stack Pointer Limit (PSPLIM).

Parameters:
[in]ProcStackPtrLimitProcess Stack Pointer Limit value to set

Definition at line 647 of file cmsis_armclang.h.

__STATIC_FORCEINLINE uint32_t __TZ_get_BASEPRI_NS ( void   )

Get Base Priority (non-secure)

Returns the current value of the non-secure Base Priority register when in secure state.

Returns:
Base Priority register value

Definition at line 485 of file cmsis_armclang.h.

__STATIC_FORCEINLINE uint32_t __TZ_get_CONTROL_NS ( void   )

Get Control Register (non-secure)

Returns the content of the non-secure Control Register when in secure mode.

Returns:
non-secure Control Register value

Definition at line 181 of file cmsis_armclang.h.

__STATIC_FORCEINLINE uint32_t __TZ_get_FAULTMASK_NS ( void   )

Get Fault Mask (non-secure)

Returns the current value of the non-secure Fault Mask register when in secure state.

Returns:
Fault Mask register value

Definition at line 551 of file cmsis_armclang.h.

__STATIC_FORCEINLINE uint32_t __TZ_get_MSP_NS ( void   )

Get Main Stack Pointer (non-secure)

Returns the current value of the non-secure Main Stack Pointer (MSP) when in secure state.

Returns:
MSP Register value

Definition at line 331 of file cmsis_armclang.h.

__STATIC_FORCEINLINE uint32_t __TZ_get_MSPLIM_NS ( void   )

Get Main Stack Pointer Limit (non-secure) Devices without ARMv8-M Main Extensions (i.e.

Cortex-M23) lack the non-secure Stack Pointer Limit register hence zero is returned always.

Returns the current value of the non-secure Main Stack Pointer Limit(MSPLIM) when in secure state.

Returns:
MSPLIM Register value

Definition at line 712 of file cmsis_armclang.h.

__STATIC_FORCEINLINE uint32_t __TZ_get_PRIMASK_NS ( void   )

Get Priority Mask (non-secure)

Returns the current state of the non-secure priority mask bit from the Priority Mask Register when in secure state.

Returns:
Priority Mask value

Definition at line 412 of file cmsis_armclang.h.

__STATIC_FORCEINLINE uint32_t __TZ_get_PSP_NS ( void   )

Get Process Stack Pointer (non-secure)

Returns the current value of the non-secure Process Stack Pointer (PSP) when in secure state.

Returns:
PSP Register value

Definition at line 277 of file cmsis_armclang.h.

__STATIC_FORCEINLINE uint32_t __TZ_get_PSPLIM_NS ( void   )

Get Process Stack Pointer Limit (non-secure) Devices without ARMv8-M Main Extensions (i.e.

Cortex-M23) lack the non-secure Stack Pointer Limit register hence zero is returned always in non-secure mode.

Returns the current value of the non-secure Process Stack Pointer Limit (PSPLIM) when in secure state.

Returns:
PSPLIM Register value

Cortex-M23) lack the non-secure Stack Pointer Limit register hence zero is returned always.

Returns the current value of the non-secure Process Stack Pointer Limit (PSPLIM) when in secure state.

Returns:
PSPLIM Register value

Definition at line 624 of file cmsis_armclang.h.

__STATIC_FORCEINLINE uint32_t __TZ_get_SP_NS ( void   )

Get Stack Pointer (non-secure)

Returns the current value of the non-secure Stack Pointer (SP) when in secure state.

Returns:
SP Register value

Definition at line 371 of file cmsis_armclang.h.

__STATIC_FORCEINLINE void __TZ_set_BASEPRI_NS ( uint32_t  basePri )

Set Base Priority (non-secure)

Assigns the given value to the non-secure Base Priority register when in secure state.

Parameters:
[in]basePriBase Priority value to set

Definition at line 512 of file cmsis_armclang.h.

__STATIC_FORCEINLINE void __TZ_set_CONTROL_NS ( uint32_t  control )

Set Control Register (non-secure)

Writes the given value to the non-secure Control Register when in secure state.

Parameters:
[in]controlControl Register value to set

Definition at line 208 of file cmsis_armclang.h.

__STATIC_FORCEINLINE void __TZ_set_FAULTMASK_NS ( uint32_t  faultMask )

Set Fault Mask (non-secure)

Assigns the given value to the non-secure Fault Mask register when in secure state.

Parameters:
[in]faultMaskFault Mask value to set

Definition at line 578 of file cmsis_armclang.h.

__STATIC_FORCEINLINE void __TZ_set_MSP_NS ( uint32_t  topOfMainStack )

Set Main Stack Pointer (non-secure)

Assigns the given value to the non-secure Main Stack Pointer (MSP) when in secure state.

Parameters:
[in]topOfMainStackMain Stack Pointer value to set

Definition at line 358 of file cmsis_armclang.h.

__STATIC_FORCEINLINE void __TZ_set_MSPLIM_NS ( uint32_t  MainStackPtrLimit )

Set Main Stack Pointer Limit (non-secure) Devices without ARMv8-M Main Extensions (i.e.

Cortex-M23) lack the non-secure Stack Pointer Limit register hence the write is silently ignored.

Assigns the given value to the non-secure Main Stack Pointer Limit (MSPLIM) when in secure state.

Parameters:
[in]MainStackPtrLimitMain Stack Pointer value to set

Definition at line 755 of file cmsis_armclang.h.

__STATIC_FORCEINLINE void __TZ_set_PRIMASK_NS ( uint32_t  priMask )

Set Priority Mask (non-secure)

Assigns the given value to the non-secure Priority Mask Register when in secure state.

Parameters:
[in]priMaskPriority Mask

Definition at line 439 of file cmsis_armclang.h.

__STATIC_FORCEINLINE void __TZ_set_PSP_NS ( uint32_t  topOfProcStack )

Set Process Stack Pointer (non-secure)

Assigns the given value to the non-secure Process Stack Pointer (PSP) when in secure state.

Parameters:
[in]topOfProcStackProcess Stack Pointer value to set

Definition at line 304 of file cmsis_armclang.h.

__STATIC_FORCEINLINE void __TZ_set_PSPLIM_NS ( uint32_t  ProcStackPtrLimit )

Set Process Stack Pointer (non-secure) Devices without ARMv8-M Main Extensions (i.e.

Cortex-M23) lack the non-secure Stack Pointer Limit register hence the write is silently ignored in non-secure mode.

Assigns the given value to the non-secure Process Stack Pointer Limit (PSPLIM) when in secure state.

Parameters:
[in]ProcStackPtrLimitProcess Stack Pointer Limit value to set

Cortex-M23) lack the non-secure Stack Pointer Limit register hence the write is silently ignored.

Assigns the given value to the non-secure Process Stack Pointer Limit (PSPLIM) when in secure state.

Parameters:
[in]ProcStackPtrLimitProcess Stack Pointer Limit value to set

Definition at line 669 of file cmsis_armclang.h.

__STATIC_FORCEINLINE void __TZ_set_SP_NS ( uint32_t  topOfStack )

Set Stack Pointer (non-secure)

Assigns the given value to the non-secure Stack Pointer (SP) when in secure state.

Parameters:
[in]topOfStackStack Pointer value to set

Definition at line 385 of file cmsis_armclang.h.