Power consumption increased after DFU implementation

Hello,

we have a zephyr application on nRF52832 DK with nRF Connect for vscode 

Before we added DFU support, we had a power consumption of 28 uA

After adding DFU support, power consumption increased to 8.9 mA

We want to reduce power consumption. What can we do for it?

Best regards

Parents Reply Children
  • Hello,

    I measure on multimeter. I enable UART peripheral to use DFU support in my app. I'm measuring 3.2 mA when the uart peripheral is active

    When I will not use the DFU support in the application, I turn off the UART peripheral in runtime with the following code and thus reduce the power consumption to 1.7 mA.

    void enable_uart(void)
    {
        NRF_UARTE0->ENABLE = 8;
       
        NRF_UARTE0->TASKS_STARTRX = 1;
        NRF_UARTE0->TASKS_STARTTX = 1;
    }

     

    void disable_uart(void)
    {
        NRF_UARTE0->TASKS_STOPTX = 1;
        NRF_UARTE0->TASKS_STOPRX = 1;

     

        NRF_UARTE0->ENABLE = 0;
    }
    my app will run on custom board and should work for many years on coin cell battery. For this, I am trying to reduce the power consumption to the lowest possible level. What would you recommend to reduce power consumption?
    Best regards
  • So it doesn't relate to DFU really? Is it only the UART that is enabled that causes the higher current consumption?

    And are you saying that you first see a current consumption of 28µA, then you enable the UART, and the current consumption rises to 3mA, and when you disable it it lowers to 1.7mA, but not back to 28µA? Or did I misunderstand something here?

    BR,

    Edvin

  • I was measuring 28 uA on the custom board before adding dfu support. I turned on the UART peripheral for DFU support to work. After doing these, the current value I measured on the custom board came out as 3.2 mA. When I'm not going to use the dfu support, I also disable the UART peripheral at runtime, so I'm measuring 1.7 mA. I need less power consumption in my application. Can I stop dfu support at runtime when I don't need it for that? Or do you have a suggestion for less power consumption?

    Best Regards,

  • I suspect that the issue may be that the pins on the UART is not disconnected properly. Can you try to put the GPIOs in a disconnected input state (the default power on reset state) after you disable the UART? 

    To test it (quick and dirty), try to just write directly to the register:

    https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/gpio.html?cp=4_2_0_19_2#topic

    Assuming you used pins P0.05-P0.08, you can try to add the following:

    NRF_GPIO->PIN_CNF[5] = 0x00000002;
    NRF_GPIO->PIN_CNF[6] = 0x00000002;
    NRF_GPIO->PIN_CNF[7] = 0x00000002;
    NRF_GPIO->PIN_CNF[8] = 0x00000002;

    See if it affects the current consumption.

    If that doesn't work, you can try to add the lines from the initial post in this ticket.

    Just the line turning it off:

     *(volatile uint32_t *)0x40002FFC = 0;

    Best regards,

    Edvin

Related