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>Handler Function</th>
20 <th>IRQn<br/>Value</th>
21 <th title="Cortex-M0/M0+
26 <th title="Cortex-M3/M4/M7
32 <th title="Cortex-M23">Armv8-M<br/>Baseline</th>
33 <th title="Cortex-M33/M35P">Armv8-M<br/>Mainline</th>
34 <th>Armv8.1-M<br/>Mainline</th>
39 <td><b>NonMaskableInt_IRQn</b></td>
42 <td><img src="check.png" alt="available"></td>
43 <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><img src="check.png" alt="available"></td>
49 <td>Non Maskable Interrupt</td>
52 <td><b>HardFault_IRQn</b></td>
53 <td>HardFault_Handler</td>
55 <td><img src="check.png" alt="available"></td>
56 <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>
62 <td>Hard Fault Interrupt</td>
65 <td><b>MemoryManagement_IRQn</b></td>
66 <td>MemManage_Handler</td>
69 <td><img src="check.png" alt="available"></td>
72 <td><img src="check.png" alt="available"></td>
73 <td><img src="check.png" alt="available"></td>
75 <td>Memory Management Interrupt</td>
78 <td><b>BusFault_IRQn</b></td>
79 <td>BusFault_Handler</td>
82 <td><img src="check.png" alt="available"></td>
85 <td><img src="check.png" alt="available"></td>
86 <td><img src="check.png" alt="available"></td>
88 <td>Bus Fault Interrupt</td>
91 <td><b>UsageFault_IRQn</b></td>
92 <td>UsageFault_Handler</td>
95 <td><img src="check.png" alt="available"></td>
98 <td><img src="check.png" alt="available"></td>
99 <td><img src="check.png" alt="available"></td>
101 <td>Usage Fault Interrupt</td>
105 <td><b>SecureFault_IRQn</b></td>
106 <td>SecureFault_Handler</td>
110 <td><img src="check.png" alt="available"></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>
117 <td><b>SVCall_IRQn</b></td>
120 <td><img src="check.png" alt="available"></td>
121 <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>
127 <td>SV Call Interrupt </td>
130 <td><b>DebugMonitor_IRQn</b></td>
131 <td>DebugMon_Handler</td>
134 <td><img src="check.png" alt="available"></td>
137 <td><img src="check.png" alt="available"></td>
138 <td><img src="check.png" alt="available"></td>
140 <td>Debug Monitor Interrupt</td>
143 <td><b>PendSV_IRQn</b></td>
144 <td>PendSV_Handler</td>
146 <td><img src="check.png" alt="available"></td>
147 <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>
153 <td>Pend SV Interrupt</td>
156 <td><b>SysTick_IRQn</b></td>
157 <td>SysTick_Handler</td>
159 <td><img src="check.png" alt="available"></td>
160 <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>
166 <td>System Tick Interrupt</td>
173 The Vector Table defines the entry addresses of the processor exceptions and the
174 device specific interrupts. It is typically located at the beginning of the
175 program memory, however \ref using_VTOR_pg it can be relocated to RAM. The symbol
176 <b>__Vectors</b> is the address of the vector table in the startup code and the
177 register <b>SCB->VTOR</b> holds the start address of the vector table.
180 An Armv8-M implementation with TrustZone provides two vector tables:
181 - vector table for Secure handlers
182 - vector table for Non-Secure handlers
184 Refer to \ref Model_TrustZone for more information.
189 At the beginning of the vector table, the initial stack value and the
190 exception vectors of the processor are defined. The vector table below
191 shows the exception vectors of a Armv8-M Mainline processor. Other processor
192 variants may have fewer vectors.
195 __Vectors DCD __initial_sp ; Top of Stack initialization
196 DCD Reset_Handler ; Reset Handler
197 DCD NMI_Handler ; NMI Handler
198 DCD HardFault_Handler ; Hard Fault Handler
199 DCD MemManage_Handler ; MPU Fault Handler
200 DCD BusFault_Handler ; Bus Fault Handler
201 DCD UsageFault_Handler ; Usage Fault Handler
202 DCD SecureFault_Handler ; Secure Fault Handler
206 DCD SVC_Handler ; SVCall Handler
207 DCD DebugMon_Handler ; Debug Monitor Handler
209 DCD PendSV_Handler ; PendSV Handler
210 DCD SysTick_Handler ; SysTick Handler
214 Device Specific Vectors
215 -----------------------
216 Following the processor exception vectors, the vector table contains also the
217 device specific interrupt vectors.
220 ; device specific interrupts
221 DCD WWDG_IRQHandler ; Window Watchdog
222 DCD PVD_IRQHandler ; PVD through EXTI Line detect
223 DCD TAMPER_IRQHandler ; Tamper
226 All device specific interrupts should have a default interrupt handler function that can
227 be overwritten in user code. Below is an example for this default handler function.
231 EXPORT WWDG_IRQHandler [WEAK]
232 EXPORT PVD_IRQHandler [WEAK]
233 EXPORT TAMPER_IRQHandler [WEAK]
246 The user application may simply define an interrupt handler function by using the handler name
250 void WWDG_IRQHandler(void)
258 The code below shows the usage of various CMSIS NVIC functions with an LPC1700 device.
265 uint32_t priorityGroup; /* Variables to store priority group and priority */
267 uint32_t preemptPriority;
268 uint32_t subPriority;
271 NVIC_SetPriorityGrouping(5); /* Set priority group to 5:
272 Bit[7..6] preempt priority Bits,
273 Bit[5..3] subpriority Bits
274 (valid for five priority bits) */
276 priorityGroup = NVIC_GetPriorityGrouping(); /* Get used priority grouping */
278 priority = NVIC_EncodePriority(priorityGroup, 1, 6); /* Encode priority with 6 for subpriority and 1 for preempt priority
279 Note: priority depends on the used priority grouping */
280 NVIC_SetPriority(UART0_IRQn, priority); /* Set new priority */
282 priority = NVIC_GetPriority(UART0_IRQn); /* Retrieve priority again */
283 NVIC_DecodePriority(priority, priorityGroup, &preemptPriority, &subPriority);
295 uint32_t active; /* Variable to store interrupt active state */
297 void TIMER0_IRQHandler(void) { /* Timer 0 interrupt handler */
299 if (LPC_TIM0->IR & (1 << 0)) { /* Check if interrupt for match channel 0 occured */
300 LPC_TIM0->IR |= (1 << 0); /* Acknowledge interrupt for match channel 0 occured */
302 active = NVIC_GetActive(TIMER0_IRQn); /* Get interrupt active state of timer 0 */
306 /* Set match channel register MR0 to 1 millisecond */
307 LPC_TIM0->MR0 = (((SystemCoreClock / 1000) / 4) - 1); /* 1 ms? */
309 LPC_TIM0->MCR = (3 << 0); /* Enable interrupt and reset for match channel MR0 */
310 NVIC_EnableIRQ(TIMER0_IRQn); /* Enable NVIC interrupt for timer 0 */
311 LPC_TIM0->TCR = (1 << 0); /* Enable timer 0 */
318 NVIC API Virtualization
319 =======================
320 The CMSIS-Core has provisions for overriding NVIC APIs as required for implementing
321 secure systems that control access to peripherals and related interrupts.
322 These overrides allow an operating system to control the access privileges of
323 application code to critical interrupts.
325 The NVIC function virtualization is enabled with the following \#define symbols:
326 - \ref CMSIS_NVIC_VIRTUAL enables overriding the CMSIS-Core (Cortex-M) NVIC functions.
327 - \ref CMSIS_VECTAB_VIRTUAL enables overriding the CMSIS-Core (Cortex-M) interrupt vector table access functions.
331 #define CMSIS_NVIC_VIRTUAL ///< Virtualization of the NVIC API
333 \def CMSIS_NVIC_VIRTUAL
334 When \ref CMSIS_NVIC_VIRTUAL is defined, the NVIC access functions in the table below must be implemented
335 for virtualizing NVIC access. These functions should be implemented
336 in a separate source module.
337 The original CMSIS-Core __NVIC functions are always available independent of \ref CMSIS_NVIC_VIRTUAL.
339 NVIC Access Functions | CMSIS-Core Functions
340 --------------------------|---------------------------------------------
341 NVIC_EnableIRQ | __NVIC_EnableIRQ
342 NVIC_GetEnableIRQ | __NVIC_GetEnableIRQ
343 NVIC_DisableIRQ | __NVIC_DisableIRQ
344 NVIC_GetPendingIRQ | __NVIC_GetPendingIRQ
345 NVIC_SetPendingIRQ | __NVIC_SetPendingIRQ
346 NVIC_ClearPendingIRQ | __NVIC_ClearPendingIRQ
347 NVIC_GetActive | __NVIC_GetActive
348 NVIC_SetPriority | __NVIC_SetPriority
349 NVIC_GetPriority | __NVIC_GetPriority
350 NVIC_SetPriorityGrouping | __NVIC_SetPriorityGrouping
351 NVIC_GetPriorityGrouping | __NVIC_GetPriorityGrouping
354 #define CMSIS_VECTAB_VIRTUAL ///< Virtualization of interrupt vector table access functions
357 \def CMSIS_VECTAB_VIRTUAL
358 When \ref CMSIS_NVIC_VIRTUAL is defined, the functions in the table below must be replaced
359 to virtualize the API access functions to the interrupt vector table. The NVIC vector table API should be implemented
360 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.
362 The original CMSIS-Core functions are always available, but prefixed with __NVIC.
364 Interrupt Vector Table Access | CMSIS-Core Functions
365 -------------------------------|---------------------------------------------
366 NVIC_GetVector | __NVIC_GetVector
367 NVIC_SetVector | __NVIC_SetVector
372 /**************************************************************************************************/
373 /** \brief Definition of IRQn numbers
376 The core exception enumeration names for IRQn values are defined in the \ref device_h_pg.
378 - Negative IRQn values represent processor core exceptions (internal interrupts).
379 - Positive IRQn values represent device-specific exceptions (external interrupts).
380 - The first device-specific interrupt has the IRQn value 0.
382 The table below describes the core exception names and their availability in various Cortex-M cores.
386 /****** Cortex-M3 Processor Exceptions/Interrupt Numbers **************************/
387 NonMaskableInt_IRQn = -14, ///< Exception 2: Non Maskable Interrupt
388 HardFault_IRQn = -13, ///< Exception 3: Hard Fault Interrupt
389 MemoryManagement_IRQn = -12, ///< Exception 4: Memory Management Interrupt [not on Cortex-M0 variants]
390 BusFault_IRQn = -11, ///< Exception 5: Bus Fault Interrupt [not on Cortex-M0 variants]
391 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]
395 SVCall_IRQn = -5, ///< Exception 11: SV Call Interrupt
396 DebugMonitor_IRQn = -4, ///< Exception 12: Debug Monitor Interrupt [not on Cortex-M0 variants]
397 PendSV_IRQn = -2, ///< Exception 14: Pend SV Interrupt [not on Cortex-M0 variants]
398 SysTick_IRQn = -1, ///< Exception 15: System Tick Interrupt
399 /****** Device-specific Interrupt Numbers *****************************************/
400 WWDG_STM_IRQn = 0, ///< Device Interrupt 0: Window WatchDog Interrupt
401 PVD_STM_IRQn = 1, ///< Device Interrupt 1: PVD through EXTI Line detection Interrupt
404 /**************************************************************************************************/
405 /** \brief Set priority grouping [not for Cortex-M0, Cortex-M0+, or SC000]
407 The function sets the priority grouping \em PriorityGroup using the required unlock sequence.
408 \em PriorityGroup is assigned to the field PRIGROUP (register AIRCR[10:8]). This field
409 determines the split of group priority from subpriority.
410 Only values from 0..7 are used.
411 In case of a conflict between priority grouping and available
412 priority bits (__NVIC_PRIO_BITS), the smallest possible priority group is set.
414 \param [in] PriorityGroup Priority group
417 - not for Cortex-M0, Cortex-M0+, or SC000.
418 - By default, priority group setting is zero.
421 - \ref NVIC_GetPriorityGrouping; NVIC_SetPriority; SCB_Type
424 void NVIC_SetPriorityGrouping(uint32_t PriorityGroup);
427 /**************************************************************************************************/
429 \brief Read the priority grouping [not for Cortex-M0, Cortex-M0+, or SC000]
431 This function returns the priority grouping (flag PRIGROUP in AIRCR[10:8]).
433 \return Priority grouping field
436 - not for Cortex-M0, Cortex-M0+, or SC000.
437 - By default, priority group setting is zero.
440 - \ref NVIC_SetPriorityGrouping; NVIC_GetPriority; SCB_Type
444 uint32_t NVIC_GetPriorityGrouping(void);
447 /**************************************************************************************************/
449 \brief Enable a device specific interrupt
451 This function enables the specified device specific interrupt \em IRQn.
452 \em IRQn cannot be a negative value.
454 \param [in] IRQn Interrupt number
457 - IRQn must not be negative.
458 - The registers that control the enabling and disabling of interrupts are called
460 - The number of supported interrupts depends on the implementation of the chip designer
461 and can be read form the Interrupt Controller Type Register (ICTR) in granularities of 32:
463 - 0 - 32 interrupts supported
464 - 1 - 64 interrupts supported
468 - \ref NVIC_DisableIRQ; SCnSCB_Type;
471 void NVIC_EnableIRQ(IRQn_Type IRQn);
474 /**************************************************************************************************/
476 \brief Get a device specific interrupt enable status
478 This function returns the interrupt enable status for the specified device specific interrupt \em IRQn.
479 \em IRQn cannot be a negative value.
481 \param [in] IRQn Interrupt number
484 - 0 Interrupt is not enabled
485 - 1 Interrupt is pending
488 - IRQn must not be negative.
489 - The registers that control the enabling and disabling of interrupts are called SETENA and CLRENA.
492 - \ref NVIC_EnableIRQ; NVIC_DisableIRQ;
495 uint32_t NVIC_GetEnableIRQ(IRQn_Type IRQn);
498 /**************************************************************************************************/
500 \brief Disable a device specific interrupt
502 This function disables the specified device specific interrupt \em IRQn.
503 \em IRQn cannot be a negative value.
505 \param [in] IRQn Number of the external interrupt to disable
508 - IRQn must not be negative.
509 - The registers that control the enabling and disabling of interrupts are called
513 - \ref NVIC_EnableIRQ
516 void NVIC_DisableIRQ(IRQn_Type IRQn);
519 /**************************************************************************************************/
521 \brief Get the pending device specific interrupt
523 This function returns the pending status of the specified device specific interrupt \em IRQn.
525 \param [in] IRQn Interrupt number
528 - 0 Interrupt is not pending
529 - 1 Interrupt is pending
532 - IRQn must not be negative.
533 - The registers that control the status of interrupts are called SETPEND and CLRPEND.
536 - \ref NVIC_SetPendingIRQ; NVIC_ClearPendingIRQ
539 uint32_t NVIC_GetPendingIRQ(IRQn_Type IRQn);
542 /**************************************************************************************************/
544 \brief Set a device specific interrupt to pending
546 This function sets the pending bit for the specified device specific interrupt \em IRQn.
547 \em IRQn cannot be a negative value.
549 \param [in] IRQn Interrupt number
552 - IRQn must not be negative.
553 - The registers that control the status of interrupts are called SETPEND and CLRPEND.
556 - \ref NVIC_GetPendingIRQ; NVIC_ClearPendingIRQ
559 void NVIC_SetPendingIRQ(IRQn_Type IRQn);
562 /**************************************************************************************************/
564 \brief Clear a device specific interrupt from pending
566 This function removes the pending state of the specified device specific interrupt \em IRQn.
567 \em IRQn cannot be a negative number.
569 \param [in] IRQn Interrupt number
572 - IRQn must not be negative.
573 - The registers that control the status of interrupts are called SETPEND and CLRPEND.
574 - An interrupt can have the status pending though it is not active.
577 - \ref NVIC_SetPendingIRQ; NVIC_GetPendingIRQ
580 void NVIC_ClearPendingIRQ(IRQn_Type IRQn);
583 /**************************************************************************************************/
585 \brief Get the device specific interrupt active status [not for Cortex-M0, Cortex-M0+, or SC000]
587 This function reads the Interrupt Active Register (NVIC_IABR0-NVIC_IABR7) in NVIC and
588 returns the active bit of the interrupt \em IRQn.
590 \param [in] IRQn Interrupt number
593 - 0 Interrupt is not active
594 - 1 Interrupt is active, or active and pending
597 - not for Cortex-M0, Cortex-M0+, or SC000.
598 - IRQn must not be negative.
599 - Each external interrupt has an active status bit. When the processor starts the interrupt
600 handler the bit is set to 1 and cleared when the interrupt return is executed.
601 - When an ISR is preempted and the processor executes anohter interrupt handler, the
602 previous interrupt is still defined as active.
608 uint32_t NVIC_GetActive(IRQn_Type IRQn);
611 /**************************************************************************************************/
613 \brief Set the priority for an interrupt
615 Sets the priority for the interrupt specified by \em IRQn.\em IRQn can can specify any
616 device specific interrupt, or processor exception. The \em priority specifies
617 the interrupt priority value, whereby lower values indicate a higher priority. The default
618 priority is 0 for every interrupt. This is the highest possible priority.
620 The priority cannot be set for every core interrupt. HardFault and NMI have a fixed (negative)
621 priority that is higher than any configurable exception or interrupt.
623 \param [in] IRQn Interrupt Number
624 \param [in] priority Priority to set
627 - The number of priority levels is configurable and depends on the implementation of the
628 chip designer. To determine the number of bits implemented for interrupt priority-level
629 registers, write \em 0xFF to one of the priority-level register, then read back the value. For
630 example, if the minimum number of 3 bits have been implemented, the read-back value is \em 0xE0.
631 - Writes to unimplemented bits are ignored.
632 - <b>For Cortex-M0</b>:
633 - Dynamic switching of interrupt priority levels is not supported. The priority level of
634 an interrupt should not be changed after it has been enabled.
635 - Supports 0 to 192 priority levels.
636 - Priority-level registers are 2 bit wide, occupying the two MSBs.
637 Each Interrupt Priority Level Register is 1-byte wide.
638 - <b>For Cortex-M3, Cortex-M4, and Cortex-M7</b>:
639 - Dynamic switching of interrupt priority levels is supported.
640 - Supports 0 to 255 priority levels.
641 - Priority-level registers have a maximum width of 8 bits and a minumum of 3 bits.
642 Each register can be further devided into preempt priority level and subpriority level.
645 - \ref NVIC_GetPriority; NVIC_SetPriorityGrouping; __set_BASEPRI;
648 void NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority);
651 /**************************************************************************************************/
653 \brief Get the priority of an interrupt
655 This function reads the priority for the specified interrupt \em IRQn. \em IRQn can can specify
656 any device specific interrupt, or processor exception.
658 The returned priority value is automatically aligned to the implemented
659 priority bits of the microcontroller.
661 \param [in] IRQn Interrupt number
663 \returns Interrupt priority
666 - Each external interrupt has an associated priority-level register.
667 - Unimplemented bits are read as zero.
670 - \ref NVIC_SetPriority; NVIC_GetPriorityGrouping; __get_BASEPRI;
673 uint32_t NVIC_GetPriority(IRQn_Type IRQn);
676 /**************************************************************************************************/
678 \brief Encodes Priority [not for Cortex-M0, Cortex-M0+, or SC000]
680 This function encodes the priority for an interrupt with the priority group \em PriorityGroup,
681 preemptive priority value \em PreemptPriority, and subpriority value \em SubPriority.
682 In case of a conflict between priority grouping and available
683 priority bits (__NVIC_PRIO_BITS) the smallest possible priority group is set.
685 \param [in] PriorityGroup Priority group
686 \param [in] PreemptPriority Preemptive priority value (starting from 0)
687 \param [in] SubPriority Subpriority value (starting from 0)
689 \returns Encoded priority for the interrupt
693 - not for Cortex-M0, Cortex-M0+, or SC000.
696 - \ref NVIC_DecodePriority; NVIC_SetPriority;
699 uint32_t NVIC_EncodePriority (uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority);
702 /**************************************************************************************************/
704 \brief Decode the interrupt priority [not for Cortex-M0, Cortex-M0+, or SC000]
706 This function decodes an interrupt priority value with the priority group \em PriorityGroup to
707 preemptive priority value \em pPreemptPriority and subpriority value \em pSubPriority.
708 In case of a conflict between priority grouping and available
709 priority bits (__NVIC_PRIO_BITS) the smallest possible priority group is set.
711 \param [in] Priority Priority
712 \param [in] PriorityGroup Priority group
713 \param [out] *pPreemptPriority Preemptive priority value (starting from 0)
714 \param [out] *pSubPriority Subpriority value (starting from 0)
718 - not for Cortex-M0, Cortex-M0+, or SC000.
721 - \ref NVIC_EncodePriority; NVIC_GetPriority; NVIC_GetPriorityGrouping;
724 void NVIC_DecodePriority (uint32_t Priority, uint32_t PriorityGroup, uint32_t* pPreemptPriority, uint32_t* pSubPriority);
727 /**************************************************************************************************/
729 \brief Read Interrupt Vector [not for Cortex-M0, SC000]
731 This function allows to read the address of an interrupt handler function.
733 \param [in] IRQn Interrupt number
735 \returns Address of interrupt handler function
738 - For using this function with Cortex-M0+ processor based devices, the SBC->VTOR register must be implemented.
741 - \ref NVIC_SetVector
744 uint32_t NVIC_GetVector(IRQn_Type IRQn);
747 /**************************************************************************************************/
749 \brief Modify Interrupt Vector [not for Cortex-M0, SC000]
751 This function allows to change the address of an interrupt handler function.
753 \param [in] IRQn Interrupt number
754 \param [in] vector Address of new interrupt handler function
757 - Usage of this function requires vector relocation to RAM. Refer to \ref using_VTOR_pg for more information.
758 - For using this function with Cortex-M0+ processor based devices, the SBC->VTOR register must be implemented.
761 - \ref NVIC_GetVector
764 void NVIC_SetVector(IRQn_Type IRQn, uint32_t vector);
767 /**************************************************************************************************/
769 \brief Reset the system
771 This function requests a system reset by setting the SYSRESETREQ flag in the AIRCR register.
774 - In most microcontroller designs, setting the SYSRESETREQ flag resets the processor and
775 most parts of the system, but should not affect the debug system.
780 void NVIC_SystemReset (void);
786 \brief Get Interrupt Target State
787 \details Reads the interrupt target field from the non-secure NVIC when in secure state.
788 \param [in] IRQn External interrupt number. Value cannot be negative.
790 - 0 if interrupt is assigned to Secure
791 - 1 if interrupt is assigned to Non Secure
793 - Only available for Armv8-M in secure state.
796 - \ref NVIC_ClearTargetState; NVIC_SetTargetState;
798 uint32_t NVIC_GetTargetState(IRQn_Type IRQn);
801 \brief Set Interrupt Target State
802 \details Sets the interrupt target field in the non-secure NVIC when in secure state.
803 \param [in] IRQn External interrupt number. Value cannot be negative.
805 - 0 if interrupt is assigned to Secure
806 - 1 if interrupt is assigned to Non Secure
808 - Only available for Armv8-M in secure state.
811 - \ref NVIC_ClearTargetState; NVIC_GetTargetState;
813 uint32_t NVIC_SetTargetState(IRQn_Type IRQn);
816 \brief Clear Interrupt Target State
817 \details Clears the interrupt target field in the non-secure NVIC when in secure state.
818 \param [in] IRQn External interrupt number. Value cannot be negative.
820 - 0 if interrupt is assigned to Secure
821 - 1 if interrupt is assigned to Non Secure
823 - Only available for Armv8-M in secure state.
826 - \ref NVIC_GetTargetState; NVIC_SetTargetState;
828 uint32_t NVIC_ClearTargetState(IRQn_Type IRQn);
834 /*@} end of NVIC_gr */