Hello,
I use this code for system_off on a nrf52840 custom board.
const struct device *button = device_get_binding("GPIO_0");
gpio_pin_interrupt_configure(button, SW0_GPIO_PIN, GPIO_INT_EDGE_RISING);
nrf_gpio_cfg_input(SW0_GPIO_PIN, NRF_GPIO_PIN_NOPULL);
nrf_gpio_cfg_sense_set(SW0_GPIO_PIN, NRF_GPIO_PIN_SENSE_LOW);
pm_power_state_force(POWER_STATE_DEEP_SLEEP_1);
Its working good on some prototypes but after some days, few boards didn't wake up anymore.
Only after reset they wake up but the Interrupt stops working.
Does someone have an idea?