Cortex-M4 Peripherals
ARM DUI 0553A
Copyright © 2010 ARM. All rights reserved.
4-4
ID121610
Non-Confidential
4.2.1
Accessing the Cortex-M4 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:
4.2.2
Interrupt Set-enable Registers
The NVIC_ISER0-NVIC_ISER7 registers enable interrupts, and show which interrupts are
enabled. See the register summary in
for the register attributes.
The bit assignments are:
If a pending interrupt is enabled, the NVIC activates the interrupt based on its priority. If an
interrupt is not enabled, asserting its interrupt signal changes the interrupt state to pending, but
the NVIC never activates the interrupt, regardless of its priority.
Table 4-3 CMSIS access NVIC functions
CMSIS function
Description
void NVIC_EnableIRQ(IRQn_Type IRQn)
a
Enables an interrupt or exception.
void NVIC_DisableIRQ(IRQn_Type IRQn)
Disables an interrupt or exception.
void NVIC_SetPendingIRQ(IRQn_Type IRQn)
Sets the pending status of interrupt or exception to 1.
void NVIC_ClearPendingIRQ(IRQn_Type IRQn)
Clears the pending status of interrupt or exception to 0.
uint32_t NVIC_GetPendingIRQ(IRQn_Type IRQn)
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)
Sets the priority of an interrupt or exception with
configurable priority level to 1.
uint32_t NVIC_GetPriority(IRQn_Type IRQn)
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 4-4 ISER bit assignments
Bits
Name
Function
[31:0]
SETENA
Interrupt set-enable bits.
Write:
0 = no effect
1 = enable interrupt.
Read:
0 = interrupt disabled
1 = interrupt enabled.
SETENA bits
31
0