cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F407 external interrupt PD11 not working

user 143
Associate III

Hello,

I'm using the Pins PC0, PD11 and PD12 in my application as external interrupts with rising edge.

To handle the interrupt, I'm using the functions EXTI0_IRQHandler() for PC0 and EXTI15_10_IRQHandler() for PD11 and PD12.

In both functions is the same content (because the user can select one of the pins as interrupt source, but they should all do the same stuff). To clean the correct panding bits in the EXTI15_10_IRQHandler() handler, I added the following lines at the beginning:

if((EXTI->PR & GPIO_PIN_12) != 0)
   EXTI->PR |= GPIO_PIN_12;
else if((EXTI->PR & GPIO_PIN_11) != 0)
   EXTI->PR |= GPIO_PIN_11;

After this check, some lines are followed.

When I'm using PD12 my application works fine. But with PD11 it don't. The interrupt is not executed.

I'm husing CubeMX and HAL to configure my GPIOs and both, PD11 and PD12 has the absolutely same configuration.

I'm using a STM32F407 100-Pin microcontroller.

Does anyone have an idea, where my mistake could be?

Thank you

1 ACCEPTED SOLUTION

Accepted Solutions
user 143
Associate III

Thank you for your suggestion. I found the error. It was not a controller issue. I had a short circuit on PD11, so there was never a rising edge.

View solution in original post

3 REPLIES 3

Read out and check content of SYSCFG_EXTICRx respective for pin Px11 (and perhaps also the EXTI registers).

JW

user 143
Associate III

Thank you for your suggestion. I found the error. It was not a controller issue. I had a short circuit on PD11, so there was never a rising edge.

Thanks for coming back with the solution.

Please select your post as Best, so that the thread is marked as resolved.

JW