Software Interrupt NVIC
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-02-27 10:51 AM
I can not find enough information about the definition of a software interrupt with NVIC.
If the edge of an internal software bit is positive, an interrupt routine should be executed
Thanks
#stm32f4- Labels:
-
STM32F4 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-02-27 11:50 AM
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.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-02-27 06:39 PM
In ST documentation, the NVIC is described in the
section 4.3- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-03-01 11:21 AM
Sorry; tried a lot but without success. I can not find an example in which an internal programmbit 'Pippo' triggers an interrupt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-03-01 11:49 AM
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.'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-03-05 02:28 AM
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() ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-03-05 03:26 AM
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 Line3DCD EXTI4_IRQHandler ; EXTI Line4
DCD EXTI9_5_IRQHandler ; External Line[9:5]s
DCD EXTI15_10_IRQHandler ; External Line[15:10]
(startup_stm32xxx.s file)
Usually the interrupt handlers are in stm32xx_it.c
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-03-05 12:55 PM
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'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-03-05 02:08 PM
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...
