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

wakeup from any of 10 buttons

hello,

my custom hardware includes 10 buttons connected to 10 GPIOs of a nRF52832. The nRF52 is placed in low power or eventually system OFF all the time, waiting for a pin state change on any of the 10 buttons.

GPIO are currently tied to ground when button is pressed. When not pressed, the internal pullups place the GPIO state to high.

My problem for waking up is:

  • we could use GPIOTE but it is limited to 8 channels : we need 10
  • we could use port event but from what I can understand in the datasheet, it only works for detecting a rising edge on the pins, on our hardware we want to detect falling edges.

Do you see any way to wake up from any of 10 pins pushed to a low level?

Thanks in advance for your help.

  • I don't believe that is correct. You can get a port event on pin going low. We have buttons on our product that behave in just the way you describe and we detect the falling edge just fine. Section 20.1 of the PS says:

    "Pins can be individually configured, through the SENSE field in the PIN_CNF[n] register, to detect either a high level or a low level on their input.

    When the correct level is detected on any such configured pin, the sense mechanism will set the DETECT signal high. Each pin has a separate DETECT signal, and the default behaviour, as defined by the DETECTMODE register, is that the DETECT signal from all pins in the GPIO Port are combined into a common DETECT signal that is routed throughout the system"

    The detect signal itself is active high which may be what is confusing?

  • OK thanks for your help. I misunderstood the PORT event documentation (I was confused with the DETECT signal active high). I can now go on. Thanks again.

Related