System off power consumption is high

I'm using VisualGDB and NARODIC NRF52x V15.3 package, The power consumption after nrf_pwr_mgmt_shutdown(NRF_PWR_MGMT_SHUTDOWN_STAY_IN_SYSOFF) command was 2.5mA I wrote this simple code in the beginning of the main and it reduces to 0.95mA but it is still too high.

I also checked other peripherals which are using SPI and I2C by cutting power line and measuring the current or turning GPIO to input or output but still have this problem.

does anyone know what is the problem?

MY guess is maybe problem is related to the debugging SWD or compiler configuration but i didn't find anything yet.

	SCB->SCR |= SCB_SCR_SLEEPDEEP_Msk;

	ret_code_t err_code= nrf_pwr_mgmt_init();
	APP_ERROR_CHECK(err_code);
	NRF_PWR_MGMT_HANDLER_REGISTER(pmShutdownEvent, 0);
	nrf_pwr_mgmt_shutdown(NRF_PWR_MGMT_SHUTDOWN_STAY_IN_SYSOFF);

'
'
'

bool pmShutdownEvent(nrf_pwr_mgmt_evt_t event)
{
    switch(event)
    {
    	case NRF_PWR_MGMT_EVT_PREPARE_SYSOFF :
    	nrf_gpio_cfg_sense_input(POWER_SWITCH_PIN, NRF_GPIO_PIN_PULLUP, POWER_SWITCH_ACTIVE_LEVEL ? NRF_GPIO_PIN_SENSE_HIGH : NRF_GPIO_PIN_SENSE_LOW);
    
    	break ;
    
    }
	return true;
}

Parents
  • Hello MHassan,

    My name is Ted, fellow Devzone developer.  Though we are not working in the same Nordic SDK, I have been focused a couple of months now on achieving single microamps current draw in an nRF9160 based hardware design.  My SDK at present is ncs v1.6.1.  Despite SDK differences, we may be facing one or more of the same issues.

    A question for you:  can you find out whether the call to routine nrf_pwr_mgmt_shutdown() accounts for turning off any high frequency clock that would otherwise be enabled and driving, for example, the RX line of a configured enabled UART?  I'm sure there are differences between your target processor or core and the application core of the nRF9160.  Our core is a Cortex-M33.  When I enable one or more UART devices, I must make a specific API call to power down the given UART and turn off its high frequency clock source.

    In the nRF9160 application core, this saves about 600 microamperes of current use.

    Another issue I found more recently is that when a serial peripheral block is configured for I2C operation, at least in ncs v1.6.1 and the associated Zephyr + Nordic HAL code that's built automatically, internal pull-up resistors are enabled on my chosen SCL and SDA lines.  The SCL pull up configuration continues to draw about 65uA, at least in my testing with Nordic's Power Profiler Kit II, even when I've put the application core into a full sleep mode.

    In my situation its possible to disable Cortex-M33 pull-ups as described by Håkon in this reply of his to Devzone ticket 87549.  It is a little less obvious how to turn them back on, and I am still testing some code to be sure I am doing so correctly.

    If you have pull ups or pull downs enabled, that may be drawing some current, though likely only a fraction of the 0.95mA you mention.

    Again our respective processors probably differ.  It would be good though to understand all the actions the power management routine nrf_pwr_mgmt_shutdown() takes when it is called.

    Just some thoughts.  I am finding power management issues to be tough to tackle!  If any of these items I mention pertain to your situation though, I figure it is worth sharing if it can help you move forward even a modest step.

    - Ted

Reply
  • Hello MHassan,

    My name is Ted, fellow Devzone developer.  Though we are not working in the same Nordic SDK, I have been focused a couple of months now on achieving single microamps current draw in an nRF9160 based hardware design.  My SDK at present is ncs v1.6.1.  Despite SDK differences, we may be facing one or more of the same issues.

    A question for you:  can you find out whether the call to routine nrf_pwr_mgmt_shutdown() accounts for turning off any high frequency clock that would otherwise be enabled and driving, for example, the RX line of a configured enabled UART?  I'm sure there are differences between your target processor or core and the application core of the nRF9160.  Our core is a Cortex-M33.  When I enable one or more UART devices, I must make a specific API call to power down the given UART and turn off its high frequency clock source.

    In the nRF9160 application core, this saves about 600 microamperes of current use.

    Another issue I found more recently is that when a serial peripheral block is configured for I2C operation, at least in ncs v1.6.1 and the associated Zephyr + Nordic HAL code that's built automatically, internal pull-up resistors are enabled on my chosen SCL and SDA lines.  The SCL pull up configuration continues to draw about 65uA, at least in my testing with Nordic's Power Profiler Kit II, even when I've put the application core into a full sleep mode.

    In my situation its possible to disable Cortex-M33 pull-ups as described by Håkon in this reply of his to Devzone ticket 87549.  It is a little less obvious how to turn them back on, and I am still testing some code to be sure I am doing so correctly.

    If you have pull ups or pull downs enabled, that may be drawing some current, though likely only a fraction of the 0.95mA you mention.

    Again our respective processors probably differ.  It would be good though to understand all the actions the power management routine nrf_pwr_mgmt_shutdown() takes when it is called.

    Just some thoughts.  I am finding power management issues to be tough to tackle!  If any of these items I mention pertain to your situation though, I figure it is worth sharing if it can help you move forward even a modest step.

    - Ted

Children
No Data
Related