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

Current consumption during DFU

In my application I have a current consumption of ~20µA. When I enter bootloader to perform DFU I initialize my peripherals the same way as in my application and I have added nrf_pwr_mgmt_run() to the loop_forever() function in the bootloader.

static void loop_forever(void)
{
    while (true)
    {
        //feed the watchdog if enabled.
        nrf_bootloader_wdt_feed();

        app_sched_execute();

        if (!NRF_LOG_PROCESS())
        {
            nrf_pwr_mgmt_run();
            // wait_for_event();
        }
    }
}

I also run nrf_pwr_mgmt_init() and it is initiated without error. I still see a current consumption of 2.49mA in between BLE transactions when I should be in sleep during DFU. The connection interval is set to 100ms.

Is there anything special needed to be albe to go to sleep during DFU in the bootloader? I thought that would be default behaviour but as I saw such a high current consumption I added pwr_mgmt to the bootloader but it didn't change anything.

  • Hi,

    You should not see this high current consumption in any case. The example should not have high current consumption in itself. I have some questions in order to know more:

    • Which SDK version are you using?
    • Which modification shave you done to the bootloader?
    • What HW are you testing with? Do you see the same if testing on a DK? (Could it be that for instance, you configure GPIO's in an unfortunate way in the bootloader or similar?)

    I also want to note that there is no point in using nrf_pwr_mgmt_run(). The wait_for_event() does all you need to enter low power mode, which is to call sd_app_evt_wait(), and this is essentially what nrf_pwr_mgmt_run() does as well.

Related