I have programmed the system_off with 2 causes of wake-up on 2 different pins.
When the device is woken up, how can I check which pin is the wake cause ?
Thanks for your help !
I have programmed the system_off with 2 causes of wake-up on 2 different pins.
When the device is woken up, how can I check which pin is the wake cause ?
Thanks for your help !
If you see the Reset behavior chapter, you will see that the GPIO is not reset on wake up from System off. So the below solution should work.
read and store(persistently or in GPREGRET register) the GPIO pin status before going to system off and then read again after waking from system off and compare them.
pin_status1 = (NRF_GPIO->IN & (1 << pin1_no) & (1 << pin2_no));
pin_status1 = (NRF_GPIO->IN & (1 << pin1_no) & (1 << pin2_no));