We have an nRF51822-based product that goes the SYSTEM OFF in certain situations.
We wake up with the DETECT signal from a pin which we set to sensing just before calling sd_power_system_off()
The code is really trivial:
nrf_gpio_cfg_sense_input(WAKEUP_PIN, NRF_GPIO_PIN_PULLUP, NRF_GPIO_PIN_SENSE_LOW);
simple_uart_putstring((uint8_t*)"Good bye, blue sky!\r\n");
This always seems to work in "sunny day" cases.
Unfortunately, we found a reproducible corner case for which the wake up does not work.
In case we have a TRANSIENT short between the 3V3 power rail and GND (I know, it's bad. It happened temporarily for a mechanical issue), the following happens:
The nRF51 enters successfully SYSTEM OFF, but never wakes up again for WAKEUP_PIN.
Is there some known situation where the wake up from DETECT could fail? We read the PANs (2.3 and 3.0) but did not find anything that could apply.
The only reason for this not to work would be if the reset/short wasn't as clean as assumed and the configuration of the wakeup pins isn't set after the reset. So a couple of questions:
1: Are you able to re-produce the issue?
2: If yes above, are you sure that the pin configuration is done after the reset has occurred?