Hi,
I have two pins, one handles a system wake-up event and the other reacts to an external uvlo event.
The wake-up event is the only PIN that can interrupt and it configures itself to disable the sense on the pin. This event will only happen when the CPU is in full sleep mode. The interrupt routine will then enable the uvlo event.
The uvlo event uses the pin latch feature. Technically I could use the same approach to disable the sense, and maybe I should, but the latch seems to offer the same feature. My first question is - without using latch one can't determine which pin interrupted in the gpiote int?
My handler is
void GPIOTE_IRQHandler (void) { if ((NRF_GPIO->LATCH >> CFG_PIN_POWERMANAGER_UVLO) & 1) { POWERMANAGER_EventUvlo(); return; } SHUTDOWN_Awake(); }
Again in sleep the latch feature for uvlo pin is disabled, so it hits SHUTDOWN_Awake(), which then runs code to disable the sense for the uvlo pin and enable the sense & latch for the uvlo feature. The uvlo pin may trigger multiple times but the latch prevents the int from refiring.
Just wanting to check I have the correct approach!
Cheers, Andrew