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

How optimize high current consumption in sleep mode using nRF52840?

Hello to all,

We have developed our application & the following platform we are using:

  • SDK 15.0, Segger IDE on windows PC
  • Softdevice version is 6.0.0
  • Hardware version nRF52840 SoC.
  • Our product is battery operated, so high power consumption is serious an issue for us.

In our application we have used ble_app_uart example with SAADC because our sensor is analog. We also made custom PCB using nRF52840 and it working well not an issue. But our problem is very too much high current consumption is sleep mode means system OFF mode.

Here is below measured analysis with the help of Nordic Power Profile kit:

  1. The average current consumption while advertising is 962uA - 1.62mA I think this is OK.
  2. The average current consumption when sensor device enter into sleep mode is 562uA (Which is very high)

We have disabled all used peripheral before enter device into sleep mode as like below:

void sleep_mode_enter() {
  uint32_t err_code;
  NRF_LOG_INFO("Sleep mode Enter");
  flash_data_sending = false;
  start_measurement = false;
  nrf_gpio_pin_clear(SENSOR_PIN);  // OFF Sensor
  nrf_gpio_pin_set(GREEN_LED_PIN); // OFF Green LED
  nrf_gpio_pin_set(BLUE_LED_PIN);  // OFF BLUE LED
  stop_adc();
  err_code = app_uart_close();
  APP_ERROR_CHECK(err_code);
  NRF_LOG_INFO("UART close: %d", err_code);
}

void stop_adc() {
  nrf_drv_timer_disable(&m_timer);
  nrf_drv_timer_uninit(&m_timer);
  nrf_drv_ppi_channel_disable(m_ppi_channel);
  nrf_drv_ppi_uninit();
  NRF_SAADC->TASKS_STOP = 1;
  nrf_drv_saadc_uninit();
}

We have tested our hardware and sure this not hardware problem because when our device enter into deep sleep mode system OFF that time the current consumption near about 0.7uA to 1uA. Even when our designed firmware upload into nRF52840 DK and measured consumption using PPK that time got same results.

Questions:

  1. Why this too much very high power consumption getting in sleep mode?
  2. Is any wrong in our sleep mode enter function and disabled module functions?

Will you please suggest any solution, We should need to optimize this consumption to increase battery life because our sensor devices is battery operated.

Looking forward your response..!!

Thanks in advanced..!! 

  • Yes, I just found this issue too. Have you tried implementing the workaround proposed in this post? If not, please try this out, as it should disable the UART properly.

    Best regards,

    Simon

  • Yes, I have tried that workaround but it not work for me. I have tried like this:

    void disabled_Uart(void) {
      uint32_t err_code = app_uart_close();
      APP_ERROR_CHECK(err_code);
      NRF_LOG_INFO("UART close: %d", err_code);
      *(volatile uint32_t *)0x40003FFC = 0;
      *(volatile uint32_t *)0x40003FFC;
      *(volatile uint32_t *)0x40003FFC = 1;
    }

    Is this right that i have call this in after close UART. If i am wrong will you please provide right snippet for do this.

    Thanks... 

  • Sorry my mistake got it for nRF52840 the workaround was:

    void disabled_uart(void) {
      uint32_t err_code = app_uart_close();
      /* Workaround by disabling the UART peripherals due to Nordic SDK15.0 issue */
      *(volatile uint32_t *)0x40002FFC = 0; /* Power down UARTE0 */
      *(volatile uint32_t *)0x40002FFC;     
      *(volatile uint32_t *)0x40002FFC = 1; /* Power on UARTE0 so it is ready for next time */
    }

    The address is changed and it worked. After that When i measured power though PPK Got results:

    In sleep mode current = 38uA

    The current consumption is reduced but still this more in system ON mode. In nRF52840 specification given which near about 1uA to 5 uA. 

    Will you please suggest solution how i can achieve current consumption <5uA?

    Thanks...!!! 

  • Hi Vishal

    Do you at any point actually enter sleep mode in your code?

    As in set WFE(); or similar?

    Best regards,

    Simon

  • Hi,

    I got another problem when disabled UART, In sleep mode with all peripherals disabled the switch is not working. Meaning When sensor device enter into sleep mode and When twice pressed switch not detect. If I comment UART disabled function enter sensor device into sleep mode, That time twice pressed switch working.

    Why this happened only when UART peripheral disabled, Is any GPIO sense also disabled with app_uart_close(); function.

    Thanks....

Related