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

Handling GPIO interrupt when pressed together

Hello,

 

I am using nRF52832, SDK_15.3.0, S132 SoftDevice and Segger for flash the image. I am using ‘ble_app_blinky’.

 

1) If I configure any GPIO as state change trigger (HiToLo or LoToHi) then without “Button Handle” and “BSP” modules are there any Interrupt function (or Call back functions) that will be triggered ?

              a) In GPIO HAL I am not seeing any call back function for ISR.

              https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s132.api.v6.1.1%2Fmodules.html

 

2) I have a scenario where two pins are pressed together. As DETECT signal is OR of all input pins, then how to differentiate which interrupt got triggered ?

a) Is this possible only by reading GPIO LATCH register or IN register.

 

Thanks & Regards

Vishnu Beema

Parents Reply Children
  • Hello Kenneth,

    For me only button press state is good enough. When I kept GPIOTE_CONFIG_IN_SENSE_HITOLO(false) with 2 sec delay, it was working when I press one button at a time.

    But if I press two buttons at a time (with in 2sec delay) never it worked.

    In GPIOTE_CONFIG_IN_SENSE_TOGGLE(true) few interrupts are getting missed. So finally I reverted back to GPIOTE_CONFIG_IN_SENSE_TOGGLE(true). Now its working when I press two buttons at a time.

    Bit confused between high-accuracy (true) and port event (false) modes.

    Thanks & Regards

    Vishnu Beema

  • beemavishnu said:
    Bit confused between high-accuracy (true) and port event (false) modes.

    Port event is low power (~uA) and "a bit slower", e.g. it may take a few additional us on wakeup. High-accuracy is high power (e.g. ~mA), but faster wakeup (within 1us).

Related