You copied the Doc URL to your clipboard.

Configuring individual IRQs

Each IRQ has an individual enable bit in the Interrupt Set Enable Registers, part of the NVIC registers. To enable or disable an IRQ, you must set the corresponding enable bit to either 1 or 0 respectively.

See the reference manual for the device you are using for specific information about the Interrupt Set Enable Register.

The following example shows a typical function that enables an IRQ for an SCS structure.

IRQ Enable Function

void NVIC_enableISR(unsigned isr)
    /* The isr argument is the number of the interrupt to enable. */
    SCS.NVIC.Enable[ (isr/32) ] = 1<<(isr % 32);


Some registers in the NVIC region can only be accessed from Privileged mode.

You can assign a priority level to each individual interrupt using the Interrupt Priority Registers apart from Hard Fault, Non Maskable Interrupt (NMI), and reset which have fixed priorities.