The NVIC is ARM's part of the design, you'd likely want to review the TRM, and books by Joseph Yiu, for specifics
Let's play it from this angle, what have you tried (show code), and how does that deviate from expectations.
In ST documentation, the NVIC is described in the PM0214 section 4.3
Sorry; tried a lot but without success. I can not find an example in which an internal programmbit "Pippo" triggers an interrupt
You haven't mentioned what processor you are using. If you are looking to set up an interrupt that may be triggered by software, consult your reference manual and do a search for "software interrupt". In the STM32F407, the EXTI controller has a register called "Software interrupt event register". From the reference manual: "An interrupt/event request can also be generated by software by writing a ‘1’ in the software interrupt/event register."
With setting: EXTI_IMR |=0x10; and EXTI_EMR |=0x10;
when i write: EXTI_SWIER |=0x10; then EXTI_PR changes from 0x00 to 0x10 (Ok)
Question: which interrupt subroutine is executed EXTI_IRQ4_ISR() ?
The SW interrupt replaces the Input pin.
Available interrupt vectors are:
DCD EXTI0_IRQHandler ; EXTI Line0 DCD EXTI1_IRQHandler ; EXTI Line1 DCD EXTI2_IRQHandler ; EXTI Line2 DCD EXTI3_IRQHandler ; EXTI Line3
DCD EXTI4_IRQHandler ; EXTI Line4
DCD EXTI9_5_IRQHandler ; External Line[9:5]s
DCD EXTI15_10_IRQHandler ; External Line[15:10]
Usually the interrupt handlers are in stm32xx_it.c
Sorry, I can not find in the handbooks of STM32F407VG how to assign an interrupt (EXTI_SWIER.B4 = 1) to a routine and which name the Rotione has!
"STM42F4xx_Reference_manual_DM00031020" - "Programming_Manual__en.DM00046982"
P388 from RM
Take an example in cube of EXTI external interrupt with GPIO. Put a breakpoint in the interrupt routine.
Trigger the interrupt and confirm code stops. Now, open the EXTI HW register window in the debugger and manually disable rise and fall detection on that EXTI. continue the code until it goes back to main loop. Stop the code and set the corresponding SW interrupt bit. Continue the code and check if the interrupt breakpoint is activated. If successful, then the rest should be pure coding...
Retrieving data ...