cancel
Showing results for 
Search instead for 
Did you mean: 

Which IRQn is used for each EXTI Line?

epalaima
Associate II
Posted on February 06, 2017 at 04:13

Hi, I am working on a project using EXTI interrupts from the GPIO pins on the STM32F303 Discovery Board. I am using the STM32F03x_StdPeriph_Driver and CMSIS libraries. 

In these libraries EXTI 1-16 are defined, while for the EXTI IRQn interrupt handlers 0-4 are defined, as well as 9_5 and 15_10. Which interrupt handler is meant to work with each EXTI Line? Is it possible to have the 9_5 line handle interrupts from multiple lines? Say from both 6 and 7? 

#handler #exti #interrupt #irqn
2 REPLIES 2
john doe
Lead
Posted on February 06, 2017 at 06:14

the irq handlers in the libraries are configured to handle the irqs of the chip

where you see irq handler for 0-4, et al, that means in your callback routine, you need to determine which irq was called so you can handle them individually, despite the callback handling multiple irq.

Self.Glenn
Associate III
Posted on February 06, 2017 at 07:03

In your interrupt service routine you would do something like this:

void EXTI15_10_IRQHandler (void)

{

//test for exti13 and 14

if (EXTI_GetITStatus(EXTI_LINE13) != RESET)

{

//process EXTI13 events

EXTI_ClearITPendingBit(EXTI_LINE13); //clear the interrupt flag

}

if (EXTI_GetITStatus(EXTI_LINE14) != RESET)

{

//process EXTI14 events

EXTI_ClearITPendingBit(EXTI_LINE14); //clear the interrupt flag

}

}

Glenn