2016-08-25 08:02 AM
Hello,
i try to intialize and rise an software interrupt on stm32 platform.As far as i've found out one needs to set ExtI.SWIER register which effectively will invoke the interrupt handler function.So i assume setting ExtI.SWIER |= 4will call the EXTI2_IRQHandler. Q1: is that right? Q2: How does the mapping between the SWIER bit number to the IRQ_Handler work? I mean, there are 23 ier-sw interrupts or so but only 5 ExtIX handlers...2. there seem some initialization to be missing. I found a statement here in the forum that IER has to be set.... Now IER exists in various registers like lcd, flash .... but none of them seems to match this approach. Q3: Which IER register has to be set?In the docu it's stated that ExtI.IMR and ExtI.EMR needs to be setup too. As far as i understand i don't need Ext.Emr (thats only for rising/falling edge events)Q4: Is that right?Thanks+ cheers. #software-interrupt #rtfm2016-08-25 09:22 AM
A2
DCD EXTI15_10_IRQHandler ; External Line[15:10]s DCD RTC_Alarm_IRQHandler ; RTC Alarm (A and B) through EXTI Line DCD OTG_FS_WKUP_IRQHandler ; USB OTG FS Wakeup through EXTI lineDCD PVD_IRQHandler ; PVD through EXTI Line detection
DCD TAMP_STAMP_IRQHandler ; Tamper and TimeStamps through the EXTI line DCD RTC_WKUP_IRQHandler ; RTC Wakeup through the EXTI line EXTI10, EXTI11, EXTI12, EXTI13, EXTI14, EXTI15 go to EXTI15_10_IRQHandlerEXTI17 to RTC_Alarm_IRQHandlerEXTI22 to RTC_WKUP_IRQHandlerThought about using SVC ??2016-08-26 04:55 AM
Thanks. And
A3: NVIC.ISER[0] |= 0x100; // For EXTI2_IRQHandlerThougth about using svc. As far as i understand it's a sw interrupt which supports some function parameters. I don't need this so ''normal'' sw interrupt is enought for me.