This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Sleep Mode not stopping peripherals.

Hi! I'm using NRF52832 with SDK 15 and the application is running as expected. To optimize power consumption I'm using a conditional statement to put the chip in sleep mode with the use of "sd_power_system_off()".

I'm achieving around 0.3 mA in sleep mode but I got few components in my design so I think I'm doing something wrong and that the consumption should be smaller. I was wondering if I'm disabling the peripherals correctly so I've got some questions.

1) Does "sd_power_system_off()" stops advertising automatically or do I have to manually disable it before going into sleep mode?

2) I'm not sure if the timers need to be disable, searching Devzone I've founf that they consume power due to requiring the HF clock. I've tried to stop them with TASKS_SHUTDOWN and individually stop the timers with "app_timers_stop" but didn't had any sucess. Are the timers stopped when you call "sd_power_system_off()"?

Here's the function that I'm using to enter sleep mode

static void sleep_mode(void){
ret_code_t err_code;

	
		nrfx_saadc_uninit();
		nrf_drv_spi_uninit(&mLisSpiInstance);
		bsp_board_leds_off();	
		pwm_stop();
	  
	
		NRF_LOG_FINAL_FLUSH();
		NRF_LOG_DEFAULT_BACKENDS_UNINIT();
	
		nrf_gpio_cfg_input(29,NRF_GPIO_PIN_PULLDOWN);
		nrf_gpio_cfg_input(28,NRF_GPIO_PIN_PULLUP);
		nrf_gpio_cfg_input(30, NRF_GPIO_PIN_PULLUP);
	        nrf_gpio_cfg_input(31,NRF_GPIO_PIN_PULLUP);
		nrf_gpio_cfg_input(21,NRF_GPIO_PIN_PULLDOWN);
    // Prepare wakeup buttons.
  err_code = bsp_btn_ble_sleep_mode_prepare();
  APP_ERROR_CHECK(err_code);

    // Go to system-off mode (this function will not return; wakeup will cause a reset).
  err_code = sd_power_system_off();
  APP_ERROR_CHECK(err_code);
}

Parents
  • Hi,

    Are you testing this on a custom board, or on a nRF52 DK?

    Have you measured the current consumption with a minimal application (enabling softdevice and going right to system off mode), to see if the current is the same? This would tell you if the current is drawn from the chip or from something else on your board.

    In general, entering System OFF mode will turn off all clock sources and peripherals, only peripherals configured as wakeup sources should be active.

    Best regards,
    Jørgen

Reply
  • Hi,

    Are you testing this on a custom board, or on a nRF52 DK?

    Have you measured the current consumption with a minimal application (enabling softdevice and going right to system off mode), to see if the current is the same? This would tell you if the current is drawn from the chip or from something else on your board.

    In general, entering System OFF mode will turn off all clock sources and peripherals, only peripherals configured as wakeup sources should be active.

    Best regards,
    Jørgen

Children
Related