I am using the STM32L051K8U6 and I have set up to use EXTI interrupt on PA0. I also have EXTI interrupts enabled on PA3, PA10 and PA11. PA3, PA10 and PA11 do generate interrupts but not PA0. I include the MX project. Is there any possible reason for
I am using the STM32L051K8U6 and I have set up to use EXTI interrupt on PA0. I also have EXTI interrupts enabled on PA3, PA10 and PA11. PA3, PA10 and PA11 do generate interrupts but not PA0. I include the MX project. Is there any possible reason for
I can see only the CubeMX project, no schematics. Could you please upload it, or at least some clipping with the pin wiring and the pull-up? Also, have you changed anything in the generated code?
BR,
Jaroslav
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
Here are the schematics. I have not modified the generated code except for adding the main entrypoint and hooks that allow calls to MX_GPIO_Init() andMX_I2C1_Init();
This is my code for going to sleep and restoring from sleep
I just wanted to add, that a common theme we see here is "I have it in code but it doesn't work" and "I have it in schematics but it doesn't work". While one is SW and other HW, the point is the same: source code and schematics are detached from reality by the implementation.
In HW, the reality check is continuity measurement, or, if possible, turning the mcu pin to GPIO output and wiggling it in software while measuring on the outermost point of the whole path.
SW is usually much more complicated and there are more possible points of failure. The starting point is always reading out related registers' content and checking against expectation (according to RM). For interrupts, a (possibly incomplete) checklist is here. You can also simplify on the observation side, by toggling a pin in the ISR.