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>
27 <th>ARMv8-M<br/>Baseline</th>
28 <th>ARMv8-M<br/>Mainline</th>
32 <td><b>NonMaskableInt_IRQn</b></td>
34 <td><img src="check.png" alt="available"></td>
35 <td><img src="check.png" alt="available"></td>
36 <td><img src="check.png" alt="available"></td>
37 <td><img src="check.png" alt="available"></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>Non Maskable Interrupt</td>
46 <td><b>HardFault_IRQn</b></td>
48 <td><img src="check.png" alt="available"></td>
49 <td><img src="check.png" alt="available"></td>
50 <td><img src="check.png" alt="available"></td>
51 <td><img src="check.png" alt="available"></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>Hard Fault Interrupt</td>
60 <td><b>MemoryManagement_IRQn</b></td>
64 <td><img src="check.png" alt="available"></td>
65 <td><img src="check.png" alt="available"></td>
66 <td><img src="check.png" alt="available"></td>
68 <td><img src="check.png" alt="available"></td>
70 <td><img src="check.png" alt="available"></td>
71 <td>Memory Management Interrupt</td>
74 <td><b>BusFault_IRQn</b></td>
78 <td><img src="check.png" alt="available"></td>
79 <td><img src="check.png" alt="available"></td>
80 <td><img src="check.png" alt="available"></td>
82 <td><img src="check.png" alt="available"></td>
84 <td><img src="check.png" alt="available"></td>
85 <td>Bus Fault Interrupt</td>
88 <td><b>UsageFault_IRQn</b></td>
92 <td><img src="check.png" alt="available"></td>
93 <td><img src="check.png" alt="available"></td>
94 <td><img src="check.png" alt="available"></td>
96 <td><img src="check.png" alt="available"></td>
98 <td><img src="check.png" alt="available"></td>
99 <td>Usage Fault Interrupt</td>
102 <td><b>SecureFault_IRQn</b></td>
111 <td><img src="check.png" alt="available"></td>
112 <td><img src="check.png" alt="available"></td>
113 <td>Secure Fault Interrupt</td>
116 <td><b>SVCall_IRQn</b></td>
118 <td><img src="check.png" alt="available"></td>
119 <td><img src="check.png" alt="available"></td>
120 <td><img src="check.png" alt="available"></td>
121 <td><img src="check.png" alt="available"></td>
122 <td><img src="check.png" alt="available"></td>
123 <td><img src="check.png" alt="available"></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>SV Call Interrupt </td>
130 <td><b>DebugMonitor_IRQn</b></td>
134 <td><img src="check.png" alt="available"></td>
135 <td><img src="check.png" alt="available"></td>
136 <td><img src="check.png" alt="available"></td>
138 <td><img src="check.png" alt="available"></td>
140 <td><img src="check.png" alt="available"></td>
141 <td>Debug Monitor Interrupt</td>
144 <td><b>PendSV_IRQn</b></td>
146 <td><img src="check.png" alt="available"></td>
147 <td><img src="check.png" alt="available"></td>
148 <td><img src="check.png" alt="available"></td>
149 <td><img src="check.png" alt="available"></td>
150 <td><img src="check.png" alt="available"></td>
151 <td><img src="check.png" alt="available"></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>Pend SV Interrupt</td>
158 <td><b>SysTick_IRQn</b></td>
160 <td><img src="check.png" alt="available"></td>
161 <td><img src="check.png" alt="available"></td>
162 <td><img src="check.png" alt="available"></td>
163 <td><img src="check.png" alt="available"></td>
164 <td><img src="check.png" alt="available"></td>
165 <td><img src="check.png" alt="available"></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>System Tick Interrupt</td>
176 The Vector Table defines the entry addresses of the processor exceptions and the
177 device specific interrupts. It is typically located at the beginning of the
178 program memory, however \ref using_VTOR_pg it can be relocated to RAM. The symbol
179 <b>__Vectors</b> is the address of the vector table in the startup code and the
180 register <b>SCB->VTOR</b> holds the start address of the vector table.
182 An ARMv8-M implementation with TrustZone provides two vector tables:
183 - vector table for Secure handlers
184 - vector table for Non-Secure handlers
186 Refer to \ref Model_TrustZone for more information.
190 At the beginning of the vector table, the initial stack value and the
191 exception vectors of the processor are defined. The vector table below
192 shows the exception vectors of a ARMv8-M Mainline processor. Other processor
193 variants may have fewer vectors.
196 __Vectors DCD __initial_sp ; Top of Stack initialization
197 DCD Reset_Handler ; Reset Handler
198 DCD NMI_Handler ; NMI Handler
199 DCD HardFault_Handler ; Hard Fault Handler
200 DCD MemManage_Handler ; MPU Fault Handler
201 DCD BusFault_Handler ; Bus Fault Handler
202 DCD UsageFault_Handler ; Usage Fault Handler
203 DCD SecureFault_Handler ; Secure Fault Handler
207 DCD SVC_Handler ; SVCall Handler
208 DCD DebugMon_Handler ; Debug Monitor Handler
210 DCD PendSV_Handler ; PendSV Handler
211 DCD SysTick_Handler ; SysTick Handler
215 Device Specific Vectors
216 -----------------------
217 Following the processor exception vectors, the vector table contains also the
218 device specific interrupt vectors.
221 ; device specific interrupts
222 DCD WWDG_IRQHandler ; Window Watchdog
223 DCD PVD_IRQHandler ; PVD through EXTI Line detect
224 DCD TAMPER_IRQHandler ; Tamper
227 All device specific interrupts should have a default interrupt handler function that can
228 be overwritten in user code. Below is an example for this default handler function.
232 EXPORT WWDG_IRQHandler [WEAK]
233 EXPORT PVD_IRQHandler [WEAK]
234 EXPORT TAMPER_IRQHandler [WEAK]
247 The user application may simply define an interrupt handler function by using the handler name
251 void WWDG_IRQHandler(void)
259 The code below shows the usage of various CMSIS NVIC functions with an LPC1700 device.
266 uint32_t priorityGroup; /* Variables to store priority group and priority */
268 uint32_t preemptPriority;
269 uint32_t subPriority;
272 NVIC_SetPriorityGrouping(5); /* Set priority group to 5:
273 Bit[7..6] preempt priority Bits,
274 Bit[5..3] subpriority Bits
275 (valid for five priority bits) */
277 priorityGroup = NVIC_GetPriorityGrouping(); /* Get used priority grouping */
279 priority = NVIC_EncodePriority(priorityGroup, 1, 6); /* Encode priority with 6 for subpriority and 1 for preempt priority
280 Note: priority depends on the used priority grouping */
281 NVIC_SetPriority(UART0_IRQn, priority); /* Set new priority */
283 priority = NVIC_GetPriority(UART0_IRQn); /* Retrieve priority again */
284 NVIC_DecodePriority(priority, priorityGroup, &preemptPriority, &subPriority);
296 uint32_t active; /* Variable to store interrupt active state */
298 void TIMER0_IRQHandler(void) { /* Timer 0 interrupt handler */
300 if (LPC_TIM0->IR & (1 << 0)) { /* Check if interrupt for match channel 0 occured */
301 LPC_TIM0->IR |= (1 << 0); /* Acknowledge interrupt for match channel 0 occured */
303 active = NVIC_GetActive(TIMER0_IRQn); /* Get interrupt active state of timer 0 */
307 /* Set match channel register MR0 to 1 millisecond */
308 LPC_TIM0->MR0 = (((SystemCoreClock / 1000) / 4) - 1); /* 1 ms? */
310 LPC_TIM0->MCR = (3 << 0); /* Enable interrupt and reset for match channel MR0 */
311 NVIC_EnableIRQ(TIMER0_IRQn); /* Enable NVIC interrupt for timer 0 */
312 LPC_TIM0->TCR = (1 << 0); /* Enable timer 0 */
319 NVIC API Virtualization
320 =======================
321 The CMSIS-Core has provisions for overriding NVIC APIs as required for implementing
322 secure systems that control access to peripherals and related interrupts.
323 These overrides allow an operating system to control the access privileges of
324 application code to critical interrupts.
326 The NVIC function virtualization is enabled with the following \#define symbols:
327 - \ref CMSIS_NVIC_VIRTUAL enables overriding the CMSIS-CORE NVIC functions.
328 - \ref CMSIS_VECTAB_VIRTUAL enables overriding the CMSIS-CORE interrupt vector table access functions.
332 #define CMSIS_NVIC_VIRTUAL ///< Virtualization of the NVIC API
334 \def CMSIS_NVIC_VIRTUAL
335 When \ref CMSIS_NVIC_VIRTUAL is defined, the NVIC access functions in the table below must be implemented
336 for virtualizing NVIC access. These functions should be implemented
337 in a separate source module.
338 The original CMSIS-Core __NVIC functions are always available independent of \ref CMSIS_NVIC_VIRTUAL.
340 NVIC Access Functions | CMSIS-Core Functions
341 --------------------------|---------------------------------------------
342 NVIC_EnableIRQ | __NVIC_EnableIRQ
343 NVIC_GetEnableIRQ | __NVIC_GetEnableIRQ
344 NVIC_DisableIRQ | __NVIC_DisableIRQ
345 NVIC_GetPendingIRQ | __NVIC_GetPendingIRQ
346 NVIC_SetPendingIRQ | __NVIC_SetPendingIRQ
347 NVIC_ClearPendingIRQ | __NVIC_ClearPendingIRQ
348 NVIC_GetActive | __NVIC_GetActive
349 NVIC_SetPriority | __NVIC_SetPriority
350 NVIC_GetPriority | __NVIC_GetPriority
351 NVIC_SetPriorityGrouping | __NVIC_SetPriorityGrouping
352 NVIC_GetPriorityGrouping | __NVIC_GetPriorityGrouping
355 #define CMSIS_VECTAB_VIRTUAL ///< Virtualization of interrupt vector table access functions
358 \def CMSIS_VECTAB_VIRTUAL
359 When \ref CMSIS_NVIC_VIRTUAL is defined, the functions in the table below must be replaced
360 to virtualize the API access functions to the interrupt vector table. The NVIC vector table API should be implemented
361 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.
363 The original CMSIS-Core functions are always available, but prefixed with __NVIC.
365 Interrupt Vector Table Access | CMSIS-Core Functions
366 -------------------------------|---------------------------------------------
367 NVIC_GetVector | __NVIC_GetVector
368 NVIC_SetVector | __NVIC_SetVector
373 /**************************************************************************************************/
374 /** \brief Definition of IRQn numbers
377 The core exception enumeration names for IRQn values are defined in the file \b device.h.
379 - Negative IRQn values represent processor core exceptions (internal interrupts).
380 - Positive IRQn values represent device-specific exceptions (external interrupts).
381 - The first device-specific interrupt has the IRQn value 0.
383 The table below describes the core exception names and their availability in various Cortex-M cores.
387 /****** Cortex-M3 Processor Exceptions/Interrupt Numbers **************************/
388 NonMaskableInt_IRQn = -14, ///< Exception 2: Non Maskable Interrupt
389 HardFault_IRQn = -13, ///< Exception 3: Hard Fault Interrupt
390 MemoryManagement_IRQn = -12, ///< Exception 4: Memory Management Interrupt [not on Cortex-M0 variants]
391 BusFault_IRQn = -11, ///< Exception 5: Bus Fault Interrupt [not on Cortex-M0 variants]
392 UsageFault_IRQn = -10, ///< Exception 6: Usage Fault Interrupt [not on Cortex-M0 variants]
393 SecureFault_IRQn = -9, ///< Exception 7: Secure Fault Interrupt [only on ARMv8-M]
394 SVCall_IRQn = -5, ///< Exception 11: SV Call Interrupt
395 DebugMonitor_IRQn = -4, ///< Exception 12: Debug Monitor Interrupt [not on Cortex-M0 variants]
396 PendSV_IRQn = -2, ///< Exception 14: Pend SV Interrupt [not on Cortex-M0 variants]
397 SysTick_IRQn = -1, ///< Exception 15: System Tick Interrupt
398 /****** Device-specific Interrupt Numbers *****************************************/
399 WWDG_STM_IRQn = 0, ///< Device Interrupt 0: Window WatchDog Interrupt
400 PVD_STM_IRQn = 1, ///< Device Interrupt 1: PVD through EXTI Line detection Interrupt
403 /**************************************************************************************************/
404 /** \brief Set priority grouping [not for Cortex-M0, Cortex-M0+, or SC000]
406 The function sets the priority grouping \em PriorityGroup using the required unlock sequence.
407 \em PriorityGroup is assigned to the field PRIGROUP (register AIRCR[10:8]). This field
408 determines the split of group priority from subpriority.
409 Only values from 0..7 are used.
410 In case of a conflict between priority grouping and available
411 priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set.
413 \param [in] PriorityGroup Priority group
416 - not for Cortex-M0, Cortex-M0+, or SC000.
417 - By default, priority group setting is zero.
420 - \ref NVIC_GetPriorityGrouping; NVIC_SetPriority; SCB_Type
423 void NVIC_SetPriorityGrouping(uint32_t PriorityGroup);
426 /**************************************************************************************************/
428 \brief Read the priority grouping [not for Cortex-M0, Cortex-M0+, or SC000]
430 This function returns the priority grouping (flag PRIGROUP in AIRCR[10:8]).
432 \return Priority grouping field
435 - not for Cortex-M0, Cortex-M0+, or SC000.
436 - By default, priority group setting is zero.
439 - \ref NVIC_SetPriorityGrouping; NVIC_GetPriority; SCB_Type
443 uint32_t NVIC_GetPriorityGrouping(void);
446 /**************************************************************************************************/
448 \brief Enable a device specific interrupt
450 This function enables the specified device specific interrupt \em IRQn.
451 \em IRQn cannot be a negative value.
453 \param [in] IRQn Interrupt number
456 - IRQn must not be negative.
457 - The registers that control the enabling and disabling of interrupts are called
459 - The number of supported interrupts depends on the implementation of the chip designer
460 and can be read form the Interrupt Controller Type Register (ICTR) in granularities of 32:
462 - 0 - 32 interrupts supported
463 - 1 - 64 interrupts supported
467 - \ref NVIC_DisableIRQ; SCnSCB_Type;
470 void NVIC_EnableIRQ(IRQn_Type IRQn);
473 /**************************************************************************************************/
475 \brief Get a device specific interrupt enable status
477 This function returns the interrupt enable status for the specified device specific interrupt \em IRQn.
478 \em IRQn cannot be a negative value.
480 \param [in] IRQn Interrupt number
483 - 0 Interrupt is not enabled
484 - 1 Interrupt is pending
487 - IRQn must not be negative.
488 - The registers that control the enabling and disabling of interrupts are called SETENA and CLRENA.
491 - \ref NVIC_EnableIRQ; NVIC_DisableIRQ;
494 uint32_t NVIC_GetEnableIRQ(IRQn_Type IRQn);
497 /**************************************************************************************************/
499 \brief Disable a device specific interrupt
501 This function disables the specified device specific interrupt \em IRQn.
502 \em IRQn cannot be a negative value.
504 \param [in] IRQn Number of the external interrupt to disable
507 - IRQn must not be negative.
508 - The registers that control the enabling and disabling of interrupts are called
512 - \ref NVIC_EnableIRQ
515 void NVIC_DisableIRQ(IRQn_Type IRQn);
518 /**************************************************************************************************/
520 \brief Get the pending device specific interrupt
522 This function returns the pending status of the specified device specific interrupt \em IRQn.
524 \param [in] IRQn Interrupt number
527 - 0 Interrupt is not pending
528 - 1 Interrupt is pending
531 - IRQn must not be negative.
532 - The registers that control the status of interrupts are called SETPEND and CLRPEND.
535 - \ref NVIC_SetPendingIRQ; NVIC_ClearPendingIRQ
538 uint32_t NVIC_GetPendingIRQ(IRQn_Type IRQn);
541 /**************************************************************************************************/
543 \brief Set a device specific interrupt to pending
545 This function sets the pending bit for the specified device specific interrupt \em IRQn.
546 \em IRQn cannot be a negative value.
548 \param [in] IRQn Interrupt number
551 - IRQn must not be negative.
552 - The registers that control the status of interrupts are called SETPEND and CLRPEND.
555 - \ref NVIC_GetPendingIRQ; NVIC_ClearPendingIRQ
558 void NVIC_SetPendingIRQ(IRQn_Type IRQn);
561 /**************************************************************************************************/
563 \brief Clear a device specific interrupt from pending
565 This function removes the pending state of the specified device specific interrupt \em IRQn.
566 \em IRQn cannot be a negative number.
568 \param [in] IRQn Interrupt number
571 - IRQn must not be negative.
572 - The registers that control the status of interrupts are called SETPEND and CLRPEND.
573 - An interrupt can have the status pending though it is not active.
576 - \ref NVIC_SetPendingIRQ; NVIC_GetPendingIRQ
579 void NVIC_ClearPendingIRQ(IRQn_Type IRQn);
582 /**************************************************************************************************/
584 \brief Get the device specific interrupt active status [not for Cortex-M0, Cortex-M0+, or SC000]
586 This function reads the Interrupt Active Register (NVIC_IABR0-NVIC_IABR7) in NVIC and
587 returns the active bit of the interrupt \em IRQn.
589 \param [in] IRQn Interrupt number
592 - 0 Interrupt is not active
593 - 1 Interrupt is active, or active and pending
596 - not for Cortex-M0, Cortex-M0+, or SC000.
597 - IRQn must not be negative.
598 - Each external interrupt has an active status bit. When the processor starts the interrupt
599 handler the bit is set to 1 and cleared when the interrupt return is executed.
600 - When an ISR is preempted and the processor executes anohter interrupt handler, the
601 previous interrupt is still defined as active.
607 uint32_t NVIC_GetActive(IRQn_Type IRQn);
610 /**************************************************************************************************/
612 \brief Set the priority for an interrupt
614 Sets the priority for the interrupt specified by \em IRQn.\em IRQn can can specify any
615 device specific interrupt, or processor exception. The \em priority specifies
616 the interrupt priority value, whereby lower values indicate a higher priority. The default
617 priority is 0 for every interrupt. This is the highest possible priority.
619 The priority cannot be set for every core interrupt. HardFault and NMI have a fixed (negative)
620 priority that is higher than any configurable exception or interrupt.
622 \param [in] IRQn Interrupt Number
623 \param [in] priority Priority to set
626 - The number of priority levels is configurable and depends on the implementation of the
627 chip designer. To determine the number of bits implemented for interrupt priority-level
628 registers, write \em 0xFF to one of the priority-level register, then read back the value. For
629 example, if the minimum number of 3 bits have been implemented, the read-back value is \em 0xE0.
630 - Writes to unimplemented bits are ignored.
631 - <b>For Cortex-M0</b>:
632 - Dynamic switching of interrupt priority levels is not supported. The priority level of
633 an interrupt should not be changed after it has been enabled.
634 - Supports 0 to 192 priority levels.
635 - Priority-level registers are 2 bit wide, occupying the two MSBs.
636 Each Interrupt Priority Level Register is 1-byte wide.
637 - <b>For Cortex-M3, Cortex-M4, and Cortex-M7</b>:
638 - Dynamic switching of interrupt priority levels is supported.
639 - Supports 0 to 255 priority levels.
640 - Priority-level registers have a maximum width of 8 bits and a minumum of 3 bits.
641 Each register can be further devided into preempt priority level and subpriority level.
644 - \ref NVIC_GetPriority; NVIC_SetPriorityGrouping; __set_BASEPRI;
647 void NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority);
650 /**************************************************************************************************/
652 \brief Get the priority of an interrupt
654 This function reads the priority for the specified interrupt \em IRQn. \em IRQn can can specify
655 any device specific interrupt, or processor exception.
657 The returned priority value is automatically aligned to the implemented
658 priority bits of the microcontroller.
660 \param [in] IRQn Interrupt number
662 \returns Interrupt priority
665 - Each external interrupt has an associated priority-level register.
666 - Unimplemented bits are read as zero.
669 - \ref NVIC_SetPriority; NVIC_GetPriorityGrouping; __get_BASEPRI;
672 uint32_t NVIC_GetPriority(IRQn_Type IRQn);
675 /**************************************************************************************************/
677 \brief Encodes Priority [not for Cortex-M0, Cortex-M0+, or SC000]
679 This function encodes the priority for an interrupt with the priority group \em PriorityGroup,
680 preemptive priority value \em PreemptPriority, and subpriority value \em SubPriority.
681 In case of a conflict between priority grouping and available
682 priority bits (__NVIC_PRIO_BITS) the smallest possible priority group is set.
684 \param [in] PriorityGroup Priority group
685 \param [in] PreemptPriority Preemptive priority value (starting from 0)
686 \param [in] SubPriority Subpriority value (starting from 0)
688 \returns Encoded priority for the interrupt
692 - not for Cortex-M0, Cortex-M0+, or SC000.
695 - \ref NVIC_DecodePriority; NVIC_SetPriority;
698 uint32_t NVIC_EncodePriority (uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority);
701 /**************************************************************************************************/
703 \brief Decode the interrupt priority [not for Cortex-M0, Cortex-M0+, or SC000]
705 This function decodes an interrupt priority value with the priority group \em PriorityGroup to
706 preemptive priority value \em pPreemptPriority and subpriority value \em pSubPriority.
707 In case of a conflict between priority grouping and available
708 priority bits (__NVIC_PRIO_BITS) the smallest possible priority group is set.
710 \param [in] Priority Priority
711 \param [in] PriorityGroup Priority group
712 \param [out] *pPreemptPriority Preemptive priority value (starting from 0)
713 \param [out] *pSubPriority Subpriority value (starting from 0)
717 - not for Cortex-M0, Cortex-M0+, or SC000.
720 - \ref NVIC_EncodePriority; NVIC_GetPriority; NVIC_GetPriorityGrouping;
723 void NVIC_DecodePriority (uint32_t Priority, uint32_t PriorityGroup, uint32_t* pPreemptPriority, uint32_t* pSubPriority);
726 /**************************************************************************************************/
728 \brief Read Interrupt Vector [not for Cortex-M0, SC000]
730 This function allows to read the address of an interrupt handler function.
732 \param [in] IRQn Interrupt number
734 \returns Address of interrupt handler function
737 - For using this function with Cortex-M0+ processor based devices, the SBC->VTOR register must be implemented.
740 - \ref NVIC_SetVector
743 uint32_t NVIC_GetVector(IRQn_Type IRQn);
746 /**************************************************************************************************/
748 \brief Modify Interrupt Vector [not for Cortex-M0, SC000]
750 This function allows to change the address of an interrupt handler function.
752 \param [in] IRQn Interrupt number
753 \param [in] vector Address of new interrupt handler function
756 - Usage of this function requires vector relocation to RAM. Refer to \ref using_VTOR_pg for more information.
757 - For using this function with Cortex-M0+ processor based devices, the SBC->VTOR register must be implemented.
760 - \ref NVIC_GetVector
763 void NVIC_SetVector(IRQn_Type IRQn, uint32_t vector);
766 /**************************************************************************************************/
768 \brief Reset the system
770 This function requests a system reset by setting the SYSRESETREQ flag in the AIRCR register.
773 - In most microcontroller designs, setting the SYSRESETREQ flag resets the processor and
774 most parts of the system, but should not affect the debug system.
779 void NVIC_SystemReset (void);
783 \brief Get Interrupt Target State
784 \details Reads the interrupt target field from the non-secure NVIC when in secure state.
785 \param [in] IRQn External interrupt number. Value cannot be negative.
787 - 0 if interrupt is assigned to Secure
788 - 1 if interrupt is assigned to Non Secure
790 - Only available for ARMv8-M in secure state.
793 - \ref NVIC_ClearTargetState; NVIC_SetTargetState;
795 uint32_t NVIC_GetTargetState(IRQn_Type IRQn);
798 \brief Set Interrupt Target State
799 \details Sets the interrupt target field in the non-secure NVIC when in secure state.
800 \param [in] IRQn External interrupt number. Value cannot be negative.
802 - 0 if interrupt is assigned to Secure
803 - 1 if interrupt is assigned to Non Secure
805 - Only available for ARMv8-M in secure state.
808 - \ref NVIC_ClearTargetState; NVIC_GetTargetState;
810 uint32_t NVIC_SetTargetState(IRQn_Type IRQn);
813 \brief Clear Interrupt Target State
814 \details Clears the interrupt target field in the non-secure NVIC when in secure state.
815 \param [in] IRQn External interrupt number. Value cannot be negative.
817 - 0 if interrupt is assigned to Secure
818 - 1 if interrupt is assigned to Non Secure
820 - Only available for ARMv8-M in secure state.
823 - \ref NVIC_GetTargetState; NVIC_SetTargetState;
825 uint32_t NVIC_ClearTargetState(IRQn_Type IRQn);
828 /*@} end of NVIC_gr */