0

I'm trying to get an external interrupt from a digital input (GPI) at the STM32F411RE (using the Nucleo-F411RE).

When doing this for PA0/EXTI0 in CubeMX, the generated code works well, whenever a rising edge is detected EXTI0_IRQHandler() is called which itself jumps into HAL_GPIO_EXTI_Callback() via the CubeMX-HAL-Code.

Now for an optimised wiring I want to use PA2/PA3 instead of PA0. And this is what not works for me: the CubeMX-generated code looks quite similar, it uses EXTI2/EXTI3 instead of EXTI0, but the related ISR and callback are never called.

So: is there anything special which needs to be kept in mind when using a non-EXTI0-interrupt on the STM32F?

Thanks!

glts
  • 21,808
  • 12
  • 73
  • 94
Elmi
  • 5,899
  • 15
  • 72
  • 143
  • No, there is absolutely no difference in how EXTI0 or 1 or 2 or 3 work. You missed something in the setup. Check what port are external interrupts mapped to. Actually, it would be nice if you posted all pieces of code that have anything to do with it, including clock initiation and the setup of all 3 peripherals requires to have external gpio interrupt (GPIO port, EXTI, NVIC). Check if EXTI periphal has its clock provided – Ilya May 10 '23 at 08:19

0 Answers0