[nRF52833] LATCH register validity after wake from System OFF

Hi,

I'm working on a legacy program using nRF52833 and nRF5 SDK using SoftDevice S113.

My application has two input GPIOs, and both can wake the MCU from System OFF. The app should be able to determine which GPIO (rising edge) woke it (let's say GPIO 1), and also be able to detect any potential rising edge events on GPIO 2 occurring between the time the MCU started to wake, SoftDevice initialized, and the main workloop runs. It must not miss/lose any rising edge events during the boot/initalization (each rising edge can be any width, so we don't need any debounce settings).

It seems this would be the typical use of the LATCH register, where the LATCH bit is set by the HW with the pin corresponding to the GPIO 1 (that woke the MCU from OFF), as well as set with GPIO 2 if any rising edges occurred during boot or SoftDevice initialization.

From looking at some other threads (herehere) and the reference manual it wasn't clear to me if the GPIO register block (specifically the LATCH register) retains its values across a System OFF wake, and MCU can read it to check which GPIOs toggled while waking.

Could you help confirm the LATCH register is still valid after waking from System OFF and this is the recommended approach for the App to know if there was GPIO activity on specific pins while waking?

Thanks,

Marco

Related