cancel
Showing results for 
Search instead for 
Did you mean: 

EXTI configured to trigger on RISING edges but triggers on both FALLING and RISING edges.

Carlos Diaz R.
Associate III

Hi,

I'm using the STM32F091 microcontroller on a custom made PCB, i'm reading two switch buttons, both have the following configuration (image below), the SENS_P signal go directly to PA10 of the microcontroller which is configured with EXTI triggered by a rising edge. (This part of the schematic was copied from a Nucleo board schematic).

0690X000009Z6K4QAK.png

I'm having an issue when i push the switch button, sometimes the interrupt is being also triggered on the falling edge of the signal, to debug it I'm toggling a test point like so:

void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin)
{
	HAL_GPIO_TogglePin(TP_GPIO_Port, TP_Pin);
}

And the following screenshoot of the oscilloscope shows the issue, where the yellow signal is SENS_P and the blue signal is TP, you can see how on the first change on SENS_P the interrupt is correctly triggered on the rising edge, and in the second change the interrupt is being triggered on both falling and rising edge of SENS_P.

0690X000009Z6KTQA0.png

Do you think i'm having a rising edge on the yellow signal, so fast the oscilloscope isn't able to detect it? or does it seems more like a hardware issue?

Regards

-- Carlos

1 REPLY 1

Do you think i'm having a rising edge on the yellow signal, so fast the oscilloscope isn't able to detect it?

Yes. Buttons bounce, and EXTI is not filtered by any means. The hardware filter is nice to have, but not a panacea.

JW