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

sd_power_dcdc_mode_set(NRF_POWER_DCDC_ENABLE) no effect on power consumption

Hello,

I am working on a wearable device and need the lowest power consumption possible. The project configuration is:

  • S132 7.2.0
  • SDK 17.0.2

The board is powered with a bench power supply which displayed current to mA resolution. I am not seeing any difference in power consumption when the DC/DC regulator is enabled. In previous projects there was a significant difference when this feature was enabled. It does not matter if it is before or after enabling the soft device/BLE.

  • Jorgen,

    First I need to verify that you used SDK 17.0.2 and S132 7.2.0 for your tests below? That code snippet could not be your main.c, is it?

    Note: I discovered that the nRF52832 consumes 3.25mA *more* when running in debug mode. The following graphs are under debug control so we can see each step in the process.

    I want back to the original code base which was SDK 15.2 and S132 6.0. This operation is very different.

    In the old SDK and soft device there is a significant drop in current when nrf_pwr_mgmt_init() is called.

    Note: The current after the program is loaded and the debugger is at main is around 14mA. The same as I see with the new SDK and soft device. However you do not get the significant drop in current in the new code.

    This is the old code from power on, no debugger attachment. The average current is around 7.25mA.

    About 26 seconds after power on the consumption drops to 1.3mA and stays at that level.

    The code using the new SDK and soft device has been stripped down to the following.

    int main(void)
    {
        ret_code_t ret_code;
    
        // Initialize nrf_log module
        // Do not use Deferred processing since the string to be logged must be available when processed
        APP_ERROR_CHECK(NRF_LOG_INIT(get_timestamp_ticks));
        NRF_LOG_DEFAULT_BACKENDS_INIT();
    
        // Initialize app_timer module
        APP_ERROR_CHECK(app_timer_init());
        APP_SCHED_INIT(SCHED_MAX_EVENT_DATA_SIZE, SCHED_QUEUE_SIZE);
    
        // Initialize BLE operation
        ret_code = nrf_pwr_mgmt_init();
        APP_ERROR_CHECK(ret_code);
    
        ret_code = nrf_sdh_enable_request();
        APP_ERROR_CHECK(ret_code);
    
        // NOTE: This is not the same order as Konrad's project. Enabling DCDC befoe enabling the soft
        // device will return an error.
        ret_code = sd_power_dcdc_mode_set(NRF_POWER_DCDC_ENABLE);
        APP_ERROR_CHECK(ret_code);
    
        while (true) {
        
            // Execute the scheduler upon waking up from an event or interrupt.
            nrf_pwr_mgmt_run();
    
            // Polled execution of services
            nrf_cli_process(&m_cli_rtt);
            app_sched_execute();
        }
    
        return 0;
    }
    

    This code doesn't even initialize the bluetooth stack and this consumes 10.72mA with no debugger attached.

    I would be happy to share my sdk_config.h, main.c and SES project if you think it would help. I believe my only option at this time is to revert to the old SDK and soft device.

    Thanks

  • As one final test I compiled the ble_app_template project in examples. This is the power consumption.

    int main(void)
    {
        bool erase_bonds;
    
        // Initialize.
        log_init();
        timers_init();
        buttons_leds_init(&erase_bonds);
        power_management_init();
        ble_stack_init();
        gap_params_init();
        gatt_init();
        advertising_init();
        services_init();
        conn_params_init();
        peer_manager_init();
    
        // Start execution.
        NRF_LOG_INFO("Template example started.");
        application_timers_start();
    
        advertising_start(erase_bonds);
        sd_power_dcdc_mode_set(NRF_POWER_DCDC_ENABLE);
    
        // Enter main loop.
        for (;;)
        {
            idle_state_handle();
        }
    }
    

    Added a line to enable the DCDC converter.

    The only other change was the sdk_config/sdh_lf_clock configuration to match our hardware.

    There definitely seems to be something wrong with latest SDK and soft device.

    Allen

  • Hi,

    Allen said:
    Either I don't have the PPK setup properly or there may be a hardware issue? Below is a screen capture at startup. It appears that the baseline power consumption is [email protected] with only the BLE initialized. When the DCDC regulator is enabled the consumption actually went up! The capture you provided suggests that the baseline power should be around 5mA and with DCDC enabled it goes lower. I captured this several times to make sure my eyes were not deceiving me.

    I'm not sure how you have connected your board to the PPK, but I do not think that 14 mA is caused by the nRF52832 chip alone, that would then have to be with the radio enabled in TX mode with highest output power, or radio and CPU running at the same time. "Baseline current" in my test is the CPU run current.

    Allen said:
    First I need to verify that you used SDK 17.0.2 and S132 7.2.0 for your tests below? That code snippet could not be your main.c, is it?

    The test I did was with nRF5 SDK v17.0.2, but without softdevice. The point was not to duplicate your setup but to show the timing of the DCDC enabling command. Apart from some header-include lines, that was the whole main.c file. I also wanted you to test this approach, to remove any softedevice issues from the case. By writing directly to the DCDCEN register, you could verify if the DCDC regulator works as expected on your board.

    Allen said:
    Note: I discovered that the nRF52832 consumes 3.25mA *more* when running in debug mode. The following graphs are under debug control so we can see each step in the process.

    In debug mode, the CPU and all clock sources are kept running, to handle the debug features. Higher current consumption is expected.

    Allen said:

    I want back to the original code base which was SDK 15.2 and S132 6.0. This operation is very different.

    Not sure what happens in this screenshot, but I think there is no way that the DCDC regulator can reduce the current from ~14 to under 4 uA.

    Allen said:
    About 26 seconds after power on the consumption drops to 1.3mA and stays at that level.

     This sounds like the CPU/chip went into sleep mode (System ON) with some peripheral requiring EasyDMA (UARTE/SAADC/etc) running.

    Allen said:
    As one final test I compiled the ble_app_template project in examples. This is the power consumption.

    I tested this on the nRF52 DK as well, with nRF5 SDK v17.0.2 and s132 v7.2.0:

    No modifications:

    Added sd_power_dcdc_mode_set(NRF_POWER_DCDC_ENABLE) at same line as you showed above:

    This looks just as expected to me, so I do not think there is anything wrong with the softdevice or SDK.

    Did you try to enable DCDC mode as the first thing in main(), by writing the register directly?

    void main()
    {
        NRF_POWER->DCDCEN = 1;
        
        //Your code after here
        
    }

  • Hello Jorgen,

    You were correct, there was something else hardware wise causing the high current draw. There is a NAND chip on the board. Once the code was added to reset/initialize the chip, the current dropped to the 1mA range. I have not connected the PPK to make exact measurements.

    I don't understand why the code to lower power consumption didn't appear to make a difference with the high NAND current draw. You would think you could observe a difference regardless.

    Thank you for your patience.

    Allen

Related