Reliably detect edge type on anyedge interrupt

Moriki
Posts: 6
Joined: Sun May 02, 2021 6:31 pm

Reliably detect edge type on anyedge interrupt

Postby Moriki » Mon Aug 02, 2021 5:56 am

Hi, though I saw others asking similiar questions before, I couldn't find a satisfactory answer.

On a gpio with anyedge interrupt type, let's say a button, I want to reliably get info on the interrupt type that triggered the interrupt.
As for now, in my program I debounce the signal, ignoring all interrupts fired after the first interrupt for a millisecond. I am using gpio_get_level and issuing commands. But sometimes it seems that the function returns wrong values.

Is there any efficient and fast way to reliably deduce the interrupt type/level of the gpio in the interrupt context?

Thanks!
Moran

Who is online

Users browsing this forum: No registered users and 295 guests