Hi, we have an application using an nRF52832 without a SD that we want to put into low power / sleep mode to save battery.
What commands should we use to do this and wake/reset with switch input?
Thanks Ian
Hi, we have an application using an nRF52832 without a SD that we want to put into low power / sleep mode to save battery.
What commands should we use to do this and wake/reset with switch input?
Thanks Ian
Hello,
There are two modes of sleeping. One of them is called "system on sleep" and the other is "system off sleep".
System off sleep uses less power than system on mode, but there are some limitations. You can't run any timers or clocks, so it can only wake on pin interrupts or power on resets (or NFC).
Look at any of the BLE examples from the SDK, and see how it implements system on mode sleep in the main() functions for-loop. Although these functions use the softdevice, the idle_state_handle() is implemented both with and without the softdevice.
To simplify it, you can use:
__WFE();
// Clear the internal event register.
__SEV();
__WFE()
in yout main for-loop to go to sleep. It will just wait for interrupts.
If you intend to go to system off (which will basically turn off the chip, and wait for a pin interrupt, and restart the application from scratch when reset), look into nrf_power_system_off(). Look at how these examples also sets up the wakeup interrupts using bsp_wakeup_button_enable(), which basically sets up an interrupt on a specific pin.
Best regards,
Edvin