AttachInterrupt use for shared IRQ handlers
Posted: Thu Oct 15, 2020 11:03 am
Hi,
I am new to STM32 but have experience with arduino framework in using esp8266 & esp32.
Using now a stm32f411ce
Question here is about interrupts/attachinterrupt.
I have read https://stm32f4-discovery.net/2014/08/s ... -tutorial/
This states : 16 interrupt lines but only 7 interupt handlers.
In STM32Duino I use attachInterrupt(pin, callback, type);
How is that handling f.e the
EXTI9_5_IRQn -> EXTI9_5_IRQHandler ->Handler for pins connected to line 5 to 9
Can I attach an interrupt callback to each of the 5-9 pins and the core handles that the correct one is called ?
Or is there only one callback active (the last attachInterrupt) ?
If so, is there a way to find out in the callback which of the pins initiated the interrupt /
Same question to f.e. PA0, PB0, PC0.
According to the documentation they are all connected to :
EXTI0_IRQn -> EXTI0_IRQHandler -> Handler for pins connected to line 0
I am new to STM32 but have experience with arduino framework in using esp8266 & esp32.
Using now a stm32f411ce
Question here is about interrupts/attachinterrupt.
I have read https://stm32f4-discovery.net/2014/08/s ... -tutorial/
This states : 16 interrupt lines but only 7 interupt handlers.
In STM32Duino I use attachInterrupt(pin, callback, type);
How is that handling f.e the
EXTI9_5_IRQn -> EXTI9_5_IRQHandler ->Handler for pins connected to line 5 to 9
Can I attach an interrupt callback to each of the 5-9 pins and the core handles that the correct one is called ?
Or is there only one callback active (the last attachInterrupt) ?
If so, is there a way to find out in the callback which of the pins initiated the interrupt /
Same question to f.e. PA0, PB0, PC0.
According to the documentation they are all connected to :
EXTI0_IRQn -> EXTI0_IRQHandler -> Handler for pins connected to line 0