High current consumption during idle_state

nRF52810, sdk 17.0.2, softdevice s112

I am working on a modified ble_app_uart.c example on a custom board that has a motion sensor.

The task is to start advertising for 15 seconds when a movement occurs. The motion sensor sends an interrupt to the nRF when motion is detected.

I am trying to reduce the current consumption during advertising and hope to get any hints on what to check.

To see what draws power I have disabled ad converter, advertising, spi module so I think the nRF is not doing anything at all.

I am OK with the "sleep mode enter()" which call upon "sd_power_system_off();"  which reduces the consumption to < 20uA and the nRF wakes up if an interrupt from the motion sensor is detected. But I would like the "idle_state_handle();"which calls "nrf_pwr_mgmt_run();" to lower the consumption to less than 0.7mA. Anyway it does something good because if "idle_state_handle(); is not executed the currrent consumption is 4.5mA

So, is there a way to lower the current consumption more calling the idle_state_handle() routine? 

for (;;)
{
    if ((!advertising_is_on) && (!BLE_is_connected))
    {
        sleep_mode_enter(); // Lowers current consumption to less than 20uA
    }
   else
   {
        idle_state_handle(); // This lowers the consumption from about 4.5mA to 0.7mA
   }
}

Parents
  • Hello,

    I suggest to check out:
    Optimizing Power on nRF52 Designs

    I suspect that UART is enabled and active in RX mode, this typically will cause the HFCLK to be running, and the current consumption is (if I remember correctly) around the several hundreds of uA up to 1mA in such case. For low power operation with UART you need a way to stop it when there is no incomming data on UART, typically this can be achieved using hardware flow control, where you can stop the UART every time the peer device have no data to send.

    Kenneth

Reply
  • Hello,

    I suggest to check out:
    Optimizing Power on nRF52 Designs

    I suspect that UART is enabled and active in RX mode, this typically will cause the HFCLK to be running, and the current consumption is (if I remember correctly) around the several hundreds of uA up to 1mA in such case. For low power operation with UART you need a way to stop it when there is no incomming data on UART, typically this can be achieved using hardware flow control, where you can stop the UART every time the peer device have no data to send.

    Kenneth

Children
  • But I am not using HW uart, I am using UART over BLE. Will "uart over BLE" be active in RX mode even if the unit is not connected and just advertising?

  • The example is by default setup to forward data between HW UART and "UART" over BLE. So I assume you have commented out for instance uart_init() then?

    Kenneth

  • Is there any way to see what is running/activated  so I can check if something is activated that I don't want to have?

  • Some events may be unexpectedly set and need to be cleared, for example CTS is set even if HW flow control is never enabled; unless bare-metal much of the handling of these is hidden:

    Event:  CLOCK->EVENTS_LFCLKSTARTED      0x40000104 = 1 0x104 (No Enable)
    Event:   EGU0->EVENTS_TRIGGERED[0]      0x40014100 = 1 0x100 (No Enable)
    Event:   PWM0->EVENTS_SEQSTARTED[0]     0x4001C108 = 1 0x108 Enable 0x500=0x1
    Event:   PWM0->EVENTS_SEQEND[0]         0x4001C110 = 1 0x110 Enable 0x500=0x1
    Event:   PWM0->EVENTS_PWMPERIODEND      0x4001C118 = 1 0x118 Enable 0x500=0x1
    Event:   PWM1->EVENTS_STOPPED           0x40021104 = 1 0x104 Enable 0x500=0x1
    Event:   PWM1->EVENTS_SEQSTARTED[0]     0x40021108 = 1 0x108 Enable 0x500=0x1
    Event:   PWM1->EVENTS_SEQEND[0]         0x40021110 = 1 0x110 Enable 0x500=0x1
    Event:   PWM1->EVENTS_PWMPERIODEND      0x40021118 = 1 0x118 Enable 0x500=0x1
    Event:   PWM2->EVENTS_SEQSTARTED[0]     0x40022108 = 1 0x108 Enable 0x500=0x1
    Event:   PWM2->EVENTS_SEQEND[0]         0x40022110 = 1 0x110 Enable 0x500=0x1
    Event:   PWM2->EVENTS_PWMPERIODEND      0x40022118 = 1 0x118 Enable 0x500=0x1
    Event:   PWM3->EVENTS_SEQSTARTED[0]     0x4002D108 = 1 0x108 Enable 0x500=0x1
    Event:   PWM3->EVENTS_SEQEND[0]         0x4002D110 = 1 0x110 Enable 0x500=0x1
    Event:   PWM3->EVENTS_PWMPERIODEND      0x4002D118 = 1 0x118 Enable 0x500=0x1
    Event: UARTE0->EVENTS_CTS               0x40002100 = 1 0x100 Enable 0x500=0x0
    Event: UARTE0->EVENTS_TXDRDY            0x4000211C = 1 0x11C Enable 0x500=0x0

    That list was on nRF52833; another taken on nRF52832:

    Event:  CLOCK->EVENTS_HFCLKSTARTED      0x40000100 = 1 0x100 (No Enable)
    Event:  CLOCK->EVENTS_LFCLKSTARTED      0x40000104 = 1 0x104 (No Enable)
    Event:  POWER->EVENTS_SLEEPENTER        0x40000114 = 1 0x114 (No Enable)
    Event:   PWM1->EVENTS_STOPPED           0x40021104 = 1 0x104 Enable 0x500=0x1
    Event:  UARTE->EVENTS_CTS               0x40002100 = 1 0x100 Enable 0x500=0x0
    Event:  UARTE->EVENTS_TXDRDY            0x4000211C = 1 0x11C Enable 0x500=0x0

Related