SDAA473 November 2026 MSPM33C321A , MSPM33C321A-Q1
Both secure application and non-secure application have its own interrupt vector table, so user can define IRQ handlers for both secure state and non-secure state, and appropriately the linker will place them. Please check '.intvecs' in cmd file of both applications.
Non-secure interrupts can still be serviced when executing a Secure function. Transitions between security states take place automatically during exception handling.
Armv8-M architecture definite the register ITNS( interrupt target non-secure state) in NVIC, which allows users to define whether the interrupt should target a secure state or non-secure state.
As shown in the Table 3-6, some IRQs are configurable, which means user can configure them to be handled by either secure handler or NS handler. And some of IRQs are banked, which means we can have two different IRQ handlers for S and NS, and set the ITNS register to redirect the interrupt to the appropriate handler.
For exception prioritisation. user may want to guarentee that critical secure exceptions are always given higher priority than NS exceptions. Secure exception priority can be enabled by setting AIRCR.PRIS.
| Exception number | Exception type | Type | Default target type | Note |
| 1 | Reset | Secure only | Secure | - |
| 2 | NMI | Configurable | Secure | Configurable by AIRCR.BFHFMNINS bit. However, AIRCR.BFHFNMINS bit should be set to 1 only when Secure state is unused and calling Secure functions or Secure exceptions should be strictly blocked. |
| 3 | HardFault | Configurable | Secure | Configurable by AIRCR.BFHFMNINS bit. However, AIRCR.BFHFNMINS bit should be set to 1 only when Secure state is unused and calling Secure functions or Secure exceptions should be strictly blocked |
| 4 |
MemManage Fault |
Banked | N/A | - |
| 5 | BusFault | Configurable | Secure | Configurable by AIRCR.BFHFMNINS bit. However, AIRCR.BFHFNMINS bit should be set to 1 only when Secure state is unused and calling Secure functions or Secure exceptions should be strictly blocked |
| 6 | UsageFault | Banked | N/A | - |
| 7 | SecureFault | Secure only | Secure | - |
| 11 | SVC | Banked | N/A | - |
| 12 |
Debug monitor |
Configurable | Depends on External Debug authentication signals | If Secure debug is enabled in the debug authentication interface, it will target the Secure state, else Debug Monitor exception targets Non-secure state |
| 14 | PendSV | Banked | N/A | |
| 15 | SysTick |
Banked or Configurable |
Banked if two SysTick timers are available. If there is only one SysTick timer, by default the SysTick exception targets Secure state. | When one SysTick timer is used, then ICSR.STTNS bit is used to configure the target state of SysTick. Two SysTick timers are always present on Mainline CPUs like Cortex-M33 and greater. |
| 16-495 |
External interrupts |
Configurable | Secure | Using NVIC_ITNS register the interrupts can be configured to either Secure or Non-secure state. |
For more information, please refer to the MSPM33 C3-Series 160MHz Microcontrollers technical reference manual.
In the example, user can use NVIC_SetTargetState() to set configurable IRQ to non-secure. User can also use NVIC_GetTargetState() to check the IRQ S/NS status.