2 \defgroup NVIC_gr Interrupts and Exceptions (NVIC)
4 \brief Functions to access the Nested Vector Interrupt Controller (NVIC).
6 This section explains how to use interrupts and exceptions and access functions for the Nested Vector Interrupt Controller (NVIC).
8 Arm provides a template file <strong>startup_<em>device</em></strong> for each supported
9 compiler. The file must be adapted by the silicon vendor to include interrupt vectors for all device-specific
10 interrupt handlers. Each interrupt handler is defined as a <strong><em>weak</em></strong> function
11 to an dummy handler. These interrupt handlers can be used directly in application software
12 without being adapted by the programmer.
14 The table below lists the core exception vectors of the various Cortex-M processors.
16 <table class="cmtable" summary="Core Exception Name">
18 <th>Exception Vector</th>
19 <th>IRQn<br/>Value</th>
30 <th>Armv8-M<br/>Baseline</th>
31 <th>Armv8-M<br/>Mainline</th>
36 <td><b>NonMaskableInt_IRQn</b></td>
38 <td><img src="check.png" alt="available"></td>
39 <td><img src="check.png" alt="available"></td>
40 <td><img src="check.png" alt="available"></td>
41 <td><img src="check.png" alt="available"></td>
42 <td><img src="check.png" alt="available"></td>
43 <td><img src="check.png" alt="available"></td>
44 <td><img src="check.png" alt="available"></td>
45 <td><img src="check.png" alt="available"></td>
46 <td><img src="check.png" alt="available"></td>
47 <td>Non Maskable Interrupt</td>
50 <td><b>HardFault_IRQn</b></td>
52 <td><img src="check.png" alt="available"></td>
53 <td><img src="check.png" alt="available"></td>
54 <td><img src="check.png" alt="available"></td>
55 <td><img src="check.png" alt="available"></td>
56 <td><img src="check.png" alt="available"></td>
57 <td><img src="check.png" alt="available"></td>
58 <td><img src="check.png" alt="available"></td>
59 <td><img src="check.png" alt="available"></td>
60 <td><img src="check.png" alt="available"></td>
61 <td>Hard Fault Interrupt</td>
64 <td><b>MemoryManagement_IRQn</b></td>
68 <td><img src="check.png" alt="available"></td>
69 <td><img src="check.png" alt="available"></td>
70 <td><img src="check.png" alt="available"></td>
72 <td><img src="check.png" alt="available"></td>
74 <td><img src="check.png" alt="available"></td>
75 <td>Memory Management Interrupt</td>
78 <td><b>BusFault_IRQn</b></td>
82 <td><img src="check.png" alt="available"></td>
83 <td><img src="check.png" alt="available"></td>
84 <td><img src="check.png" alt="available"></td>
86 <td><img src="check.png" alt="available"></td>
88 <td><img src="check.png" alt="available"></td>
89 <td>Bus Fault Interrupt</td>
92 <td><b>UsageFault_IRQn</b></td>
96 <td><img src="check.png" alt="available"></td>
97 <td><img src="check.png" alt="available"></td>
98 <td><img src="check.png" alt="available"></td>
100 <td><img src="check.png" alt="available"></td>
102 <td><img src="check.png" alt="available"></td>
103 <td>Usage Fault Interrupt</td>
107 <td><b>SecureFault_IRQn</b></td>
116 <td><img src="check.png" alt="available"></td>
117 <td><img src="check.png" alt="available"></td>
118 <td>Secure Fault Interrupt</td>
122 <td><b>SVCall_IRQn</b></td>
124 <td><img src="check.png" alt="available"></td>
125 <td><img src="check.png" alt="available"></td>
126 <td><img src="check.png" alt="available"></td>
127 <td><img src="check.png" alt="available"></td>
128 <td><img src="check.png" alt="available"></td>
129 <td><img src="check.png" alt="available"></td>
130 <td><img src="check.png" alt="available"></td>
131 <td><img src="check.png" alt="available"></td>
132 <td><img src="check.png" alt="available"></td>
133 <td>SV Call Interrupt </td>
136 <td><b>DebugMonitor_IRQn</b></td>
140 <td><img src="check.png" alt="available"></td>
141 <td><img src="check.png" alt="available"></td>
142 <td><img src="check.png" alt="available"></td>
144 <td><img src="check.png" alt="available"></td>
146 <td><img src="check.png" alt="available"></td>
147 <td>Debug Monitor Interrupt</td>
150 <td><b>PendSV_IRQn</b></td>
152 <td><img src="check.png" alt="available"></td>
153 <td><img src="check.png" alt="available"></td>
154 <td><img src="check.png" alt="available"></td>
155 <td><img src="check.png" alt="available"></td>
156 <td><img src="check.png" alt="available"></td>
157 <td><img src="check.png" alt="available"></td>
158 <td><img src="check.png" alt="available"></td>
159 <td><img src="check.png" alt="available"></td>
160 <td><img src="check.png" alt="available"></td>
161 <td>Pend SV Interrupt</td>
164 <td><b>SysTick_IRQn</b></td>
166 <td><img src="check.png" alt="available"></td>
167 <td><img src="check.png" alt="available"></td>
168 <td><img src="check.png" alt="available"></td>
169 <td><img src="check.png" alt="available"></td>
170 <td><img src="check.png" alt="available"></td>
171 <td><img src="check.png" alt="available"></td>
172 <td><img src="check.png" alt="available"></td>
173 <td><img src="check.png" alt="available"></td>
174 <td><img src="check.png" alt="available"></td>
175 <td>System Tick Interrupt</td>
182 The Vector Table defines the entry addresses of the processor exceptions and the
183 device specific interrupts. It is typically located at the beginning of the
184 program memory, however \ref using_VTOR_pg it can be relocated to RAM. The symbol
185 <b>__Vectors</b> is the address of the vector table in the startup code and the
186 register <b>SCB->VTOR</b> holds the start address of the vector table.
189 An Armv8-M implementation with TrustZone provides two vector tables:
190 - vector table for Secure handlers
191 - vector table for Non-Secure handlers
193 Refer to \ref Model_TrustZone for more information.
198 At the beginning of the vector table, the initial stack value and the
199 exception vectors of the processor are defined. The vector table below
200 shows the exception vectors of a Armv8-M Mainline processor. Other processor
201 variants may have fewer vectors.
204 __Vectors DCD __initial_sp ; Top of Stack initialization
205 DCD Reset_Handler ; Reset Handler
206 DCD NMI_Handler ; NMI Handler
207 DCD HardFault_Handler ; Hard Fault Handler
208 DCD MemManage_Handler ; MPU Fault Handler
209 DCD BusFault_Handler ; Bus Fault Handler
210 DCD UsageFault_Handler ; Usage Fault Handler
211 DCD SecureFault_Handler ; Secure Fault Handler
215 DCD SVC_Handler ; SVCall Handler
216 DCD DebugMon_Handler ; Debug Monitor Handler
218 DCD PendSV_Handler ; PendSV Handler
219 DCD SysTick_Handler ; SysTick Handler
223 Device Specific Vectors
224 -----------------------
225 Following the processor exception vectors, the vector table contains also the
226 device specific interrupt vectors.
229 ; device specific interrupts
230 DCD WWDG_IRQHandler ; Window Watchdog
231 DCD PVD_IRQHandler ; PVD through EXTI Line detect
232 DCD TAMPER_IRQHandler ; Tamper
235 All device specific interrupts should have a default interrupt handler function that can
236 be overwritten in user code. Below is an example for this default handler function.
240 EXPORT WWDG_IRQHandler [WEAK]
241 EXPORT PVD_IRQHandler [WEAK]
242 EXPORT TAMPER_IRQHandler [WEAK]
255 The user application may simply define an interrupt handler function by using the handler name
259 void WWDG_IRQHandler(void)
267 The code below shows the usage of various CMSIS NVIC functions with an LPC1700 device.
274 uint32_t priorityGroup; /* Variables to store priority group and priority */
276 uint32_t preemptPriority;
277 uint32_t subPriority;
280 NVIC_SetPriorityGrouping(5); /* Set priority group to 5:
281 Bit[7..6] preempt priority Bits,
282 Bit[5..3] subpriority Bits
283 (valid for five priority bits) */
285 priorityGroup = NVIC_GetPriorityGrouping(); /* Get used priority grouping */
287 priority = NVIC_EncodePriority(priorityGroup, 1, 6); /* Encode priority with 6 for subpriority and 1 for preempt priority
288 Note: priority depends on the used priority grouping */
289 NVIC_SetPriority(UART0_IRQn, priority); /* Set new priority */
291 priority = NVIC_GetPriority(UART0_IRQn); /* Retrieve priority again */
292 NVIC_DecodePriority(priority, priorityGroup, &preemptPriority, &subPriority);
304 uint32_t active; /* Variable to store interrupt active state */
306 void TIMER0_IRQHandler(void) { /* Timer 0 interrupt handler */
308 if (LPC_TIM0->IR & (1 << 0)) { /* Check if interrupt for match channel 0 occured */
309 LPC_TIM0->IR |= (1 << 0); /* Acknowledge interrupt for match channel 0 occured */
311 active = NVIC_GetActive(TIMER0_IRQn); /* Get interrupt active state of timer 0 */
315 /* Set match channel register MR0 to 1 millisecond */
316 LPC_TIM0->MR0 = (((SystemCoreClock / 1000) / 4) - 1); /* 1 ms? */
318 LPC_TIM0->MCR = (3 << 0); /* Enable interrupt and reset for match channel MR0 */
319 NVIC_EnableIRQ(TIMER0_IRQn); /* Enable NVIC interrupt for timer 0 */
320 LPC_TIM0->TCR = (1 << 0); /* Enable timer 0 */
327 NVIC API Virtualization
328 =======================
329 The CMSIS-Core has provisions for overriding NVIC APIs as required for implementing
330 secure systems that control access to peripherals and related interrupts.
331 These overrides allow an operating system to control the access privileges of
332 application code to critical interrupts.
334 The NVIC function virtualization is enabled with the following \#define symbols:
335 - \ref CMSIS_NVIC_VIRTUAL enables overriding the CMSIS-Core (Cortex-M) NVIC functions.
336 - \ref CMSIS_VECTAB_VIRTUAL enables overriding the CMSIS-Core (Cortex-M) interrupt vector table access functions.
340 #define CMSIS_NVIC_VIRTUAL ///< Virtualization of the NVIC API
342 \def CMSIS_NVIC_VIRTUAL
343 When \ref CMSIS_NVIC_VIRTUAL is defined, the NVIC access functions in the table below must be implemented
344 for virtualizing NVIC access. These functions should be implemented
345 in a separate source module.
346 The original CMSIS-Core __NVIC functions are always available independent of \ref CMSIS_NVIC_VIRTUAL.
348 NVIC Access Functions | CMSIS-Core Functions
349 --------------------------|---------------------------------------------
350 NVIC_EnableIRQ | __NVIC_EnableIRQ
351 NVIC_GetEnableIRQ | __NVIC_GetEnableIRQ
352 NVIC_DisableIRQ | __NVIC_DisableIRQ
353 NVIC_GetPendingIRQ | __NVIC_GetPendingIRQ
354 NVIC_SetPendingIRQ | __NVIC_SetPendingIRQ
355 NVIC_ClearPendingIRQ | __NVIC_ClearPendingIRQ
356 NVIC_GetActive | __NVIC_GetActive
357 NVIC_SetPriority | __NVIC_SetPriority
358 NVIC_GetPriority | __NVIC_GetPriority
359 NVIC_SetPriorityGrouping | __NVIC_SetPriorityGrouping
360 NVIC_GetPriorityGrouping | __NVIC_GetPriorityGrouping
363 #define CMSIS_VECTAB_VIRTUAL ///< Virtualization of interrupt vector table access functions
366 \def CMSIS_VECTAB_VIRTUAL
367 When \ref CMSIS_NVIC_VIRTUAL is defined, the functions in the table below must be replaced
368 to virtualize the API access functions to the interrupt vector table. The NVIC vector table API should be implemented
369 in a separate source module. This allows, for example, alternate implementations to relocate the vector table from flash to RAM on the first vector table update.
371 The original CMSIS-Core functions are always available, but prefixed with __NVIC.
373 Interrupt Vector Table Access | CMSIS-Core Functions
374 -------------------------------|---------------------------------------------
375 NVIC_GetVector | __NVIC_GetVector
376 NVIC_SetVector | __NVIC_SetVector
381 /**************************************************************************************************/
382 /** \brief Definition of IRQn numbers
385 The core exception enumeration names for IRQn values are defined in the file \b device.h.
387 - Negative IRQn values represent processor core exceptions (internal interrupts).
388 - Positive IRQn values represent device-specific exceptions (external interrupts).
389 - The first device-specific interrupt has the IRQn value 0.
391 The table below describes the core exception names and their availability in various Cortex-M cores.
395 /****** Cortex-M3 Processor Exceptions/Interrupt Numbers **************************/
396 NonMaskableInt_IRQn = -14, ///< Exception 2: Non Maskable Interrupt
397 HardFault_IRQn = -13, ///< Exception 3: Hard Fault Interrupt
398 MemoryManagement_IRQn = -12, ///< Exception 4: Memory Management Interrupt [not on Cortex-M0 variants]
399 BusFault_IRQn = -11, ///< Exception 5: Bus Fault Interrupt [not on Cortex-M0 variants]
400 UsageFault_IRQn = -10, ///< Exception 6: Usage Fault Interrupt [not on Cortex-M0 variants]
402 SecureFault_IRQn = -9, ///< Exception 7: Secure Fault Interrupt [only on Armv8-M]
404 SVCall_IRQn = -5, ///< Exception 11: SV Call Interrupt
405 DebugMonitor_IRQn = -4, ///< Exception 12: Debug Monitor Interrupt [not on Cortex-M0 variants]
406 PendSV_IRQn = -2, ///< Exception 14: Pend SV Interrupt [not on Cortex-M0 variants]
407 SysTick_IRQn = -1, ///< Exception 15: System Tick Interrupt
408 /****** Device-specific Interrupt Numbers *****************************************/
409 WWDG_STM_IRQn = 0, ///< Device Interrupt 0: Window WatchDog Interrupt
410 PVD_STM_IRQn = 1, ///< Device Interrupt 1: PVD through EXTI Line detection Interrupt
413 /**************************************************************************************************/
414 /** \brief Set priority grouping [not for Cortex-M0, Cortex-M0+, or SC000]
416 The function sets the priority grouping \em PriorityGroup using the required unlock sequence.
417 \em PriorityGroup is assigned to the field PRIGROUP (register AIRCR[10:8]). This field
418 determines the split of group priority from subpriority.
419 Only values from 0..7 are used.
420 In case of a conflict between priority grouping and available
421 priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set.
423 \param [in] PriorityGroup Priority group
426 - not for Cortex-M0, Cortex-M0+, or SC000.
427 - By default, priority group setting is zero.
430 - \ref NVIC_GetPriorityGrouping; NVIC_SetPriority; SCB_Type
433 void NVIC_SetPriorityGrouping(uint32_t PriorityGroup);
436 /**************************************************************************************************/
438 \brief Read the priority grouping [not for Cortex-M0, Cortex-M0+, or SC000]
440 This function returns the priority grouping (flag PRIGROUP in AIRCR[10:8]).
442 \return Priority grouping field
445 - not for Cortex-M0, Cortex-M0+, or SC000.
446 - By default, priority group setting is zero.
449 - \ref NVIC_SetPriorityGrouping; NVIC_GetPriority; SCB_Type
453 uint32_t NVIC_GetPriorityGrouping(void);
456 /**************************************************************************************************/
458 \brief Enable a device specific interrupt
460 This function enables the specified device specific interrupt \em IRQn.
461 \em IRQn cannot be a negative value.
463 \param [in] IRQn Interrupt number
466 - IRQn must not be negative.
467 - The registers that control the enabling and disabling of interrupts are called
469 - The number of supported interrupts depends on the implementation of the chip designer
470 and can be read form the Interrupt Controller Type Register (ICTR) in granularities of 32:
472 - 0 - 32 interrupts supported
473 - 1 - 64 interrupts supported
477 - \ref NVIC_DisableIRQ; SCnSCB_Type;
480 void NVIC_EnableIRQ(IRQn_Type IRQn);
483 /**************************************************************************************************/
485 \brief Get a device specific interrupt enable status
487 This function returns the interrupt enable status for the specified device specific interrupt \em IRQn.
488 \em IRQn cannot be a negative value.
490 \param [in] IRQn Interrupt number
493 - 0 Interrupt is not enabled
494 - 1 Interrupt is pending
497 - IRQn must not be negative.
498 - The registers that control the enabling and disabling of interrupts are called SETENA and CLRENA.
501 - \ref NVIC_EnableIRQ; NVIC_DisableIRQ;
504 uint32_t NVIC_GetEnableIRQ(IRQn_Type IRQn);
507 /**************************************************************************************************/
509 \brief Disable a device specific interrupt
511 This function disables the specified device specific interrupt \em IRQn.
512 \em IRQn cannot be a negative value.
514 \param [in] IRQn Number of the external interrupt to disable
517 - IRQn must not be negative.
518 - The registers that control the enabling and disabling of interrupts are called
522 - \ref NVIC_EnableIRQ
525 void NVIC_DisableIRQ(IRQn_Type IRQn);
528 /**************************************************************************************************/
530 \brief Get the pending device specific interrupt
532 This function returns the pending status of the specified device specific interrupt \em IRQn.
534 \param [in] IRQn Interrupt number
537 - 0 Interrupt is not pending
538 - 1 Interrupt is pending
541 - IRQn must not be negative.
542 - The registers that control the status of interrupts are called SETPEND and CLRPEND.
545 - \ref NVIC_SetPendingIRQ; NVIC_ClearPendingIRQ
548 uint32_t NVIC_GetPendingIRQ(IRQn_Type IRQn);
551 /**************************************************************************************************/
553 \brief Set a device specific interrupt to pending
555 This function sets the pending bit for the specified device specific interrupt \em IRQn.
556 \em IRQn cannot be a negative value.
558 \param [in] IRQn Interrupt number
561 - IRQn must not be negative.
562 - The registers that control the status of interrupts are called SETPEND and CLRPEND.
565 - \ref NVIC_GetPendingIRQ; NVIC_ClearPendingIRQ
568 void NVIC_SetPendingIRQ(IRQn_Type IRQn);
571 /**************************************************************************************************/
573 \brief Clear a device specific interrupt from pending
575 This function removes the pending state of the specified device specific interrupt \em IRQn.
576 \em IRQn cannot be a negative number.
578 \param [in] IRQn Interrupt number
581 - IRQn must not be negative.
582 - The registers that control the status of interrupts are called SETPEND and CLRPEND.
583 - An interrupt can have the status pending though it is not active.
586 - \ref NVIC_SetPendingIRQ; NVIC_GetPendingIRQ
589 void NVIC_ClearPendingIRQ(IRQn_Type IRQn);
592 /**************************************************************************************************/
594 \brief Get the device specific interrupt active status [not for Cortex-M0, Cortex-M0+, or SC000]
596 This function reads the Interrupt Active Register (NVIC_IABR0-NVIC_IABR7) in NVIC and
597 returns the active bit of the interrupt \em IRQn.
599 \param [in] IRQn Interrupt number
602 - 0 Interrupt is not active
603 - 1 Interrupt is active, or active and pending
606 - not for Cortex-M0, Cortex-M0+, or SC000.
607 - IRQn must not be negative.
608 - Each external interrupt has an active status bit. When the processor starts the interrupt
609 handler the bit is set to 1 and cleared when the interrupt return is executed.
610 - When an ISR is preempted and the processor executes anohter interrupt handler, the
611 previous interrupt is still defined as active.
617 uint32_t NVIC_GetActive(IRQn_Type IRQn);
620 /**************************************************************************************************/
622 \brief Set the priority for an interrupt
624 Sets the priority for the interrupt specified by \em IRQn.\em IRQn can can specify any
625 device specific interrupt, or processor exception. The \em priority specifies
626 the interrupt priority value, whereby lower values indicate a higher priority. The default
627 priority is 0 for every interrupt. This is the highest possible priority.
629 The priority cannot be set for every core interrupt. HardFault and NMI have a fixed (negative)
630 priority that is higher than any configurable exception or interrupt.
632 \param [in] IRQn Interrupt Number
633 \param [in] priority Priority to set
636 - The number of priority levels is configurable and depends on the implementation of the
637 chip designer. To determine the number of bits implemented for interrupt priority-level
638 registers, write \em 0xFF to one of the priority-level register, then read back the value. For
639 example, if the minimum number of 3 bits have been implemented, the read-back value is \em 0xE0.
640 - Writes to unimplemented bits are ignored.
641 - <b>For Cortex-M0</b>:
642 - Dynamic switching of interrupt priority levels is not supported. The priority level of
643 an interrupt should not be changed after it has been enabled.
644 - Supports 0 to 192 priority levels.
645 - Priority-level registers are 2 bit wide, occupying the two MSBs.
646 Each Interrupt Priority Level Register is 1-byte wide.
647 - <b>For Cortex-M3, Cortex-M4, and Cortex-M7</b>:
648 - Dynamic switching of interrupt priority levels is supported.
649 - Supports 0 to 255 priority levels.
650 - Priority-level registers have a maximum width of 8 bits and a minumum of 3 bits.
651 Each register can be further devided into preempt priority level and subpriority level.
654 - \ref NVIC_GetPriority; NVIC_SetPriorityGrouping; __set_BASEPRI;
657 void NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority);
660 /**************************************************************************************************/
662 \brief Get the priority of an interrupt
664 This function reads the priority for the specified interrupt \em IRQn. \em IRQn can can specify
665 any device specific interrupt, or processor exception.
667 The returned priority value is automatically aligned to the implemented
668 priority bits of the microcontroller.
670 \param [in] IRQn Interrupt number
672 \returns Interrupt priority
675 - Each external interrupt has an associated priority-level register.
676 - Unimplemented bits are read as zero.
679 - \ref NVIC_SetPriority; NVIC_GetPriorityGrouping; __get_BASEPRI;
682 uint32_t NVIC_GetPriority(IRQn_Type IRQn);
685 /**************************************************************************************************/
687 \brief Encodes Priority [not for Cortex-M0, Cortex-M0+, or SC000]
689 This function encodes the priority for an interrupt with the priority group \em PriorityGroup,
690 preemptive priority value \em PreemptPriority, and subpriority value \em SubPriority.
691 In case of a conflict between priority grouping and available
692 priority bits (__NVIC_PRIO_BITS) the smallest possible priority group is set.
694 \param [in] PriorityGroup Priority group
695 \param [in] PreemptPriority Preemptive priority value (starting from 0)
696 \param [in] SubPriority Subpriority value (starting from 0)
698 \returns Encoded priority for the interrupt
702 - not for Cortex-M0, Cortex-M0+, or SC000.
705 - \ref NVIC_DecodePriority; NVIC_SetPriority;
708 uint32_t NVIC_EncodePriority (uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority);
711 /**************************************************************************************************/
713 \brief Decode the interrupt priority [not for Cortex-M0, Cortex-M0+, or SC000]
715 This function decodes an interrupt priority value with the priority group \em PriorityGroup to
716 preemptive priority value \em pPreemptPriority and subpriority value \em pSubPriority.
717 In case of a conflict between priority grouping and available
718 priority bits (__NVIC_PRIO_BITS) the smallest possible priority group is set.
720 \param [in] Priority Priority
721 \param [in] PriorityGroup Priority group
722 \param [out] *pPreemptPriority Preemptive priority value (starting from 0)
723 \param [out] *pSubPriority Subpriority value (starting from 0)
727 - not for Cortex-M0, Cortex-M0+, or SC000.
730 - \ref NVIC_EncodePriority; NVIC_GetPriority; NVIC_GetPriorityGrouping;
733 void NVIC_DecodePriority (uint32_t Priority, uint32_t PriorityGroup, uint32_t* pPreemptPriority, uint32_t* pSubPriority);
736 /**************************************************************************************************/
738 \brief Read Interrupt Vector [not for Cortex-M0, SC000]
740 This function allows to read the address of an interrupt handler function.
742 \param [in] IRQn Interrupt number
744 \returns Address of interrupt handler function
747 - For using this function with Cortex-M0+ processor based devices, the SBC->VTOR register must be implemented.
750 - \ref NVIC_SetVector
753 uint32_t NVIC_GetVector(IRQn_Type IRQn);
756 /**************************************************************************************************/
758 \brief Modify Interrupt Vector [not for Cortex-M0, SC000]
760 This function allows to change the address of an interrupt handler function.
762 \param [in] IRQn Interrupt number
763 \param [in] vector Address of new interrupt handler function
766 - Usage of this function requires vector relocation to RAM. Refer to \ref using_VTOR_pg for more information.
767 - For using this function with Cortex-M0+ processor based devices, the SBC->VTOR register must be implemented.
770 - \ref NVIC_GetVector
773 void NVIC_SetVector(IRQn_Type IRQn, uint32_t vector);
776 /**************************************************************************************************/
778 \brief Reset the system
780 This function requests a system reset by setting the SYSRESETREQ flag in the AIRCR register.
783 - In most microcontroller designs, setting the SYSRESETREQ flag resets the processor and
784 most parts of the system, but should not affect the debug system.
789 void NVIC_SystemReset (void);
795 \brief Get Interrupt Target State
796 \details Reads the interrupt target field from the non-secure NVIC when in secure state.
797 \param [in] IRQn External interrupt number. Value cannot be negative.
799 - 0 if interrupt is assigned to Secure
800 - 1 if interrupt is assigned to Non Secure
802 - Only available for Armv8-M in secure state.
805 - \ref NVIC_ClearTargetState; NVIC_SetTargetState;
807 uint32_t NVIC_GetTargetState(IRQn_Type IRQn);
810 \brief Set Interrupt Target State
811 \details Sets the interrupt target field in the non-secure NVIC when in secure state.
812 \param [in] IRQn External interrupt number. Value cannot be negative.
814 - 0 if interrupt is assigned to Secure
815 - 1 if interrupt is assigned to Non Secure
817 - Only available for Armv8-M in secure state.
820 - \ref NVIC_ClearTargetState; NVIC_GetTargetState;
822 uint32_t NVIC_SetTargetState(IRQn_Type IRQn);
825 \brief Clear Interrupt Target State
826 \details Clears the interrupt target field in the non-secure NVIC when in secure state.
827 \param [in] IRQn External interrupt number. Value cannot be negative.
829 - 0 if interrupt is assigned to Secure
830 - 1 if interrupt is assigned to Non Secure
832 - Only available for Armv8-M in secure state.
835 - \ref NVIC_GetTargetState; NVIC_SetTargetState;
837 uint32_t NVIC_ClearTargetState(IRQn_Type IRQn);
843 /*@} end of NVIC_gr */