Hi
I could not really find a satisfactory answer to my question, what (if any) impact has the setting of the SLEEPDEEEP bit before calling nrf_pwr_mgmt_run? I'm wondering if the SD in sd_app_evt_wait() overwrites those registers anyway or what it is doing, from what I read is, that it internally also calls the _WFE instruction.
// Set SLEEPDEEP bit of Cortex System Control Register SCB->SCR |= (uint32_t)SCB_SCR_SLEEPDEEP_Msk; nrf_pwr_mgmt_run();
Setup:
- nrf52840
- SDK 17.x
- Using the SD 140 (enabled)
Further questions:
- Are HFCLK and LFCLK runing in SYSTEM_ON mode? Does SLEEPDEEP have any impact on this?
- Does the system wakeup from a timer peripheral interrupt/expiry? TIMER4 in this case system.
- Does the system wakeup from the RTC interrupt/expiry.
How I would approach low power consumption with my current knowledge:
- disable unused peripherals
- configure perhipherals from which the system shall wakeup from sleep
- call nrf_pwr_mgmt_run() within the main loop.
Is this approach reasonable?
Thanks in advance for any help.
Cheers David