Hi, I'm looking into a design based on the npm1300 and nrf5340 for a battery-powered wearable device.
We would like to use two buttons (A and B) as the user interface with the following functionalities
- A: input 1 (short press), power-on (long press), power-off (long press)
- B: input 2 (short press), future use (long press)
where the long press would be ~3 to 5s.
I was planning to use hibernate/shipping mode for the OFF state, and connect button A to the SHPHLD input as well as the MCU. However, SHPHLD is powered by VSYS/VBAT while our logic is 1.8V from the buck regulator, which makes this a bit problematic: Npm1100 SHPHLD button shared with GPIO
Since there are 5 gpios on the PMIC, I thought I could route the events INTENEVENTSSHPHLDSET to a specific GPIO. However, I could not find documentation on how this is done.
In section 6.6.1 it is mentioned that GPIOs can be used as interrupts by setting one of the events of interest (for example INTENEVENTSSHPHLDSET)
However this seems to only control whether an interrupt is generated given a certain event, but it is not clear how an event can be routed to a specific GPIO.
Is it possible to selectively wire different events on different GPIOs? If so how can this be done? Otherwise, how can the host assess what caused the interrupt?
Thank you!