This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Detecting Interruption Sense on Both states

Hi everyone !!

I have this hardware mapping, and I'd like to detect pin state change with an interrupt.

image description

My problem is that it seems I can't configure an interruption with sense on both edge. As you can see, my switch can either set 0 or 1 to my input, but I have to detect if it is a lowToHigh edgeor a HighToLow edge..

I thougt I could handle it by looking at EVENT_PORT with each bit corresponding to each of the GPIOs, but it doesn't seem like it.

To manage it for the moment, I change nrf_gpio_cfg_sense_input(...) from SENSE_HIGH to SENSE_LOW each time the interrupt is called, but it's not the best way to do it..

If someone could give me a hint, that would be great!

Thanks

Related