Hi,
I am trying to minimize the power consumption on a NRF52840.
https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/optimizing-power-on-nrf52-designs states that the power consumption in SYSTEM_OFF should be some nA.
My system consists of a NRF52840 (with Softdevice S140, SDK 17.0.2) and a SPI slave device with a low active reset pin.
I started at 0.7mA for my whole system if the NRF52840 is in SYSTEM_OFF and the slave in reset, that's way to much.
First I noticed, that
void nrf_drv_spi_uninit(nrf_drv_spi_t const * p_instance)
does not reset all used pins but only MISO. I set them all back to default
nrf_drv_spi_uninit(&inst);
nrf_gpio_cfg_default(pin_ss);
nrf_gpio_cfg_default(pin_miso);
nrf_gpio_cfg_default(pin_mosi);
nrf_gpio_cfg_default(pin_sck);
and reduced my power consumption to 0.44mA.
Is this uninitialization by purpose?
Furthermore I could reduce the power consumption to 0.014 mA if I disconnect the SPI slave from power.
Even an empty main like
int main()
{
nrf_pwr_mgmt_shutdown(NRF_PWR_MGMT_SHUTDOWN_GOTO_SYSOFF);
}
draws 0.011mA.
Any hints where I can search to reduce the power some more?
A simple main like
#include <nrf_log.h>
#include <nrf_log_ctrl.h>
#include <nrf_log_default_backends.h>
#include <nrf_pwr_mgmt.h>
int main()
{
APP_ERROR_CHECK(NRF_LOG_INIT(NULL));
NRF_LOG_DEFAULT_BACKENDS_INIT();
while(1)
{
if(NRF_LOG_PROCESS() == false)
{
nrf_pwr_mgmt_run();
}
NRF_LOG_INFO("wakeup");
NRF_LOG_FLUSH();
}
}
does not idle in nrf_pwr_mgmt_run(). Could be there anything wrong in my sdk config?
Best regards
Matthias