I am exploring the nRF52832 using nRF52-DK for a low powered BLE device. And for that I am making the System OFF example as my basis for measuring currents of different features and software flows.
The chip can be woken up from System OFF using a GPIO, which is configured as
nrf_gpio_cfg_input(NRF_DT_GPIOS_TO_PSEL(DT_ALIAS(sw0), gpios), NRF_GPIO_PIN_PULLUP); nrf_gpio_cfg_sense_set(NRF_DT_GPIOS_TO_PSEL(DT_ALIAS(sw0), gpios), NRF_GPIO_PIN_SENSE_LOW);
In the example the sleep mode is selected as
struct pm_state_info info =
{
.exit_latency_us = 0,
.min_residency_us = 0,
.state = PM_STATE_SOFT_OFF,
.substate_id = 0,
};Which is then passed as
pm_state_force(0u, &info);
And finally it goes into System OFF mode with
k_sleep(K_SECONDS(SLEEP_S)); // SLEEP_S is 5
After 5 seconds I expected it to wake up, but it never does. It wakes up from the GPIO just fine, but not from the timer.
Is there a proper way to configure this?
Any help would be greatly appreciated.
Thanks in advance 