CMSIS-Core (Cortex-M): Core Register Access Functions

| CMSIS-Core (Cortex-M) Version 5.1.2 CMSIS-Core support for Cortex-M processor-based devices

- Main Page
- Usage and Description
- Reference

All Data Structures Files Functions Variables Enumerations Enumerator Groups Pages
Functions
Core Register Access Functions
TrustZone for Armv8-M

Core register Access functions related to TrustZone for Armv8-M. More...

## Functions
uint32_t | __TZ_get_CONTROL_NS (void)
| Get Control register (non-secure) More...
void | __TZ_set_CONTROL_NS (uint32_t control)
| Set Control register (non-secure) More...
uint32_t | __TZ_get_PSP_NS (void)
| Get Process Stack Pointer (non-secure) More...
void | __TZ_set_PSP_NS (uint32_t topOfProcStack)
| Set Process Stack Pointer (non-secure) More...
uint32_t | __TZ_get_MSP_NS (void)
| Get Main Stack Pointer (non-secure) More...
void | __TZ_set_MSP_NS (uint32_t topOfMainStack)
| Set Main Stack Pointer (non-secure) More...
uint32_t | __TZ_get_SP_NS (void)
| Get Stack Pointer (non-secure) More...
void | __TZ_set_SP_NS (uint32_t topOfStack)
| Set Stack Pointer (non-secure) More...
uint32_t | __TZ_get_PRIMASK_NS (void)
| Get Priority Mask (non-secure) More...
void | __TZ_set_PRIMASK_NS (uint32_t priMask)
| Set Priority Mask (non-secure) More...
uint32_t | __TZ_get_BASEPRI_NS (void)
| Get Base Priority (non-secure) More...
void | __TZ_set_BASEPRI_NS (uint32_t basePri)
| Set Base Priority (non-secure) More...
uint32_t | __TZ_get_FAULTMASK_NS (void)
| Get Fault Mask (non-secure) More...
void | __TZ_set_FAULTMASK_NS (uint32_t faultMask)
| Set Fault Mask (non-secure) More...
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. More...
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 zero is returned always. More...
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. More...
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 zero is returned always. More...

## Description

## Function Documentation

uint32_t __TZ_get_BASEPRI_NS | ( | void |  | ) |

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

Returns
  Base Priority register value

See Also
  - __get_BASEPRI

uint32_t __TZ_get_CONTROL_NS | ( | void |  | ) |

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

Returns
  non-secure Control register value

See Also
  - __get_CONTROL; CONTROL_Type

uint32_t __TZ_get_FAULTMASK_NS | ( | void |  | ) |

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

Returns
  Fault Mask register value

See Also
  - __get_FAULTMASK

uint32_t __TZ_get_MSP_NS | ( | void |  | ) |

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

Returns
  MSP register value

See Also
  - __get_MSP

uint32_t __TZ_get_MSPLIM_NS | ( | void |  | ) |

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

Returns
  MSPLIM register value

uint32_t __TZ_get_PRIMASK_NS | ( | void |  | ) |

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

Returns
  Priority Mask value

See Also
  - __get_PRIMASK

uint32_t __TZ_get_PSP_NS | ( | void |  | ) |

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

Returns
  PSP register value

See Also
  - __get_PSP

uint32_t __TZ_get_PSPLIM_NS | ( | void |  | ) |

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

Returns
  PSPLIM register value

uint32_t __TZ_get_SP_NS | ( | void |  | ) |

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

Returns
  SP register value

void __TZ_set_BASEPRI_NS | ( | uint32_t | basePri | ) |

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

Parameters

  [in] | basePri | Base Priority value to set

See Also
  - __set_BASEPRI

void __TZ_set_CONTROL_NS | ( | uint32_t | control | ) |

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

Parameters

  [in] | control | Control register value to set

See Also
  - __set_CONTROL; CONTROL_Type

void __TZ_set_FAULTMASK_NS | ( | uint32_t | faultMask | ) |

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

Parameters

  [in] | faultMask | Fault Mask value to set

See Also
  - __set_FAULTMASK

void __TZ_set_MSP_NS | ( | uint32_t | topOfMainStack | ) |

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

Parameters

  [in] | topOfMainStack | Main Stack Pointer value to set

See Also
  - __set_MSP

void __TZ_set_MSPLIM_NS | ( | uint32_t | MainStackPtrLimit | ) |

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

Parameters

  [in] | MainStackPtrLimit | Main Stack Pointer value to set

void __TZ_set_PRIMASK_NS | ( | uint32_t | priMask | ) |

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

Parameters

  [in] | priMask | Priority Mask

See Also
  - __set_PRIMASK

void __TZ_set_PSP_NS | ( | uint32_t | topOfProcStack | ) |

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

Parameters

  [in] | topOfProcStack | Process Stack Pointer value to set

See Also
  - __set_PSP

void __TZ_set_PSPLIM_NS | ( | uint32_t | ProcStackPtrLimit | ) |

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

Parameters

  [in] | ProcStackPtrLimit | Process Stack Pointer Limit value to set

void __TZ_set_SP_NS | ( | uint32_t | topOfStack | ) |

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

Parameters

  [in] | topOfStack | Stack Pointer value to set