2023-10-06 04:39 AM
I configured the EXTIs for 16 inputs from PD0 to PD15, rising and falling edge, IRQ1 for PD0, IRQ2 por PD1, and so on as must be for groups 5-9 and 10-15 IRQ Handler. I debug the program with a breakpoint in each EXTI_IRQ_HANDLER and all of them are activated when I press a button. I found the behavior of the callback because of this but I do not know the cause.
Solved! Go to Solution.
2023-10-06 08:37 AM
> when I press a button
What button? What exactly is the hardware? Can you post a photo? Can't it be that that button indeed causes a pulse on all pins of PD (e.g. through inadequate common ground)?
JW
2023-10-06 06:29 AM
Hello @RafaelSTM32,
it would be helpful if you could share the code snippet for the EXTI_IRQ_HANDLER functions and the callback function.
Also, what is the need to use 16 EXTIs?
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.
2023-10-06 06:34 AM
Check for the appropriate flags in the EXTI->PR register. All pins have their own interrupt flag. HAL does this for you and will provide the GPIO_Pin that triggered the interrupt.
Look at HAL_EXTI_IRQHandler for inspiration.
2023-10-06 08:37 AM
> when I press a button
What button? What exactly is the hardware? Can you post a photo? Can't it be that that button indeed causes a pulse on all pins of PD (e.g. through inadequate common ground)?
JW
2023-10-06 10:12 AM - edited 2023-10-06 10:38 AM
Thank you for your ideas, I got a new path because of you to look for and I found when I press a button it's created an spike that triggers to all inputs EXTIs, I'll look for a mistake or something in the hardware. I got an oscilloscope to do this, I need to buy one.
2023-10-06 10:14 AM - edited 2023-10-06 10:36 AM
the need for the EXTIs is because I am doing a logger for all inputs, I need to detect when an input is activated and deactivated
2023-10-06 11:43 AM
> I found when I press a button it's created an spike that triggers to all inputs EXTIs
Post relevant portion of schematics, and a photo of your setup.
JW
2023-10-06 02:31 PM
Hi, I found a broken track in my pcb, it looked fine when I tested with a multimeter for continuity but when I pressed a button the force applied opened the track and isolated the ground connection of my debounce capacitors giving an spike in almost all inputs
2023-10-06 02:33 PM
Thanks a lot people!!! your advices make me find the fail very fast!!!
2023-10-06 02:34 PM
this is my project!!