4.2.1. Accessing the Cortex-M7 NVIC registers using CMSIS

CMSIS functions enable software portability between different Cortex-M profile processors. To access the NVIC registers when using CMSIS, use the following functions:

Table 4.3. CMSIS access NVIC functions

CMSIS functionDescription
void NVIC_EnableIRQ(IRQn_Type IRQn)[a]Enables an interrupt or exception.
void NVIC_DisableIRQ(IRQn_Type IRQn)[a]Disables an interrupt or exception.
void NVIC_SetPendingIRQ(IRQn_Type IRQn)[a]Sets the pending status of interrupt or exception to 1.
void NVIC_ClearPendingIRQ(IRQn_Type IRQn)[a]Clears the pending status of interrupt or exception to 0.
uint32_t NVIC_GetPendingIRQ(IRQn_Type IRQn)[a]Reads the pending status of interrupt or exception. This function returns non-zero value if the pending status is set to 1.
void NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority)[a]Sets the priority of an interrupt or exception with configurable priority level to 1.
uint32_t NVIC_GetPriority(IRQn_Type IRQn)[a]Reads the priority of an interrupt or exception with configurable priority level. This function return the current priority level.

[a] The input parameter IRQn is the IRQ number, see Table 2.14 for more information.


Copyright © 2015, 2018 Arm. All rights reserved.ARM DUI 0646C
Non-ConfidentialID121118