I'd like to use the pin sense function as the power switch of my NRF51822 device. That is to say, after the very first power cycle (reset or battery change), the device goes into power off mode directly and wait for button input. Clicking the button will toggle my device on/off.
I've considered using a power cycle counter. However, this requires RAM retention, which consumes power.
Is there any other way of setting sense input at the very first power cycle?
Thanks.