Skip to main content
Associate II
October 6, 2023
Solved

All EXTIs triggered at same time

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.

This topic has been closed for replies.
waclawek.jan
waclawek.janBest answer
Super User
October 6, 2023

> 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

10 replies

ST Employee
October 6, 2023

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.
TDK
October 6, 2023

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.

https://github.com/STMicroelectronics/STM32CubeF7/blob/043626d52e34ee8146588bae597513398683e329/Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_exti.c#L434C52-L434C52

 

"If you feel a post has answered your question, please click ""Accept as Solution""."
waclawek.jan
waclawek.janBest answer
Super User
October 6, 2023

> 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

Associate II
October 6, 2023

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.

 

Associate II
October 6, 2023

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

waclawek.jan
Super User
October 6, 2023

> 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

Associate II
October 6, 2023

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 

botones.jpg

Associate II
October 6, 2023

Thanks a lot people!!! your advices make me find the fail very fast!!!

Associate II
October 6, 2023

this is my project!!

WhatsApp Image 2023-10-06 at 11.03.07 AM.jpeg

Associate II
October 6, 2023

WhatsApp Image 2023-10-06 at 11.02.30 AM.jpeg