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

Queries on Current measurement & how to reduce the same

Hello,

In addition to previous ticket I have further queries. I have a stringent requirement for reduction of Current consumption.

https://devzone.nordicsemi.com/support/230962

1) In ‘ble_app_blinky’ since SoftDevice is enabled, whether DCDC enabled by default or need to enabled explicitly by calling

                sd_power_dcdc_mode_set(NRF_POWER_DCDC_ENABLE) 

2) As mentioned below do I need to enable DC-DC only during BLE active and disable after BLE inactive.

https://devzone.nordicsemi.com/f/nordic-q-a/4211/nrf51822-power-consumption-when-ble-advertising-connected#post-id-18589

 

3) To my understanding, keeping build in “Release” mode will disable UART.

a) Below are the macros enabled in Release mode & Debug mode. But when I keep in “Release” mode still I am seeing debug prints on Terminal. Then what is the difference between “Release” & “Debug” builds.

"DEBUG; DEBUG_NRF" from solution in Debug configuration

"NDEBUG" from solution in Release configuration

b) As mentioned in below link, at the same time do I need to disable NRF_LOG_ENABLE explicitly do reduce current consumption. Please confirm.

                https://devzone.nordicsemi.com/f/nordic-q-a/35042/current-consumption-in-nrf52

 c) How to disable UART if still I am seeing debug prints on Terminal. Do I need to disable NRFX_UARTE_ENABLED macro or just disconnecting debug cable is good enough during current measurement.

 

4) Do I need to explicitly disable FPU unit. I have floating point calculations. But before going to sleep (System ON or System OFF) do I need to clear FPU as mentioned in below link.

                https://devzone.nordicsemi.com/f/nordic-q-a/15243/high-power-consumption-when-using-fpu

 

5) Before going to System OFF I called nrf_gpio_cfg_default() with all pins expect pin 13 & 14 (Buttons to wake-up the device). This function will configure pullup as NRF_GPIO_PIN_NOPULL. But as per below link, not sure with development kit whether do I need to change to Pullup or Pulldown.

https://devzone.nordicsemi.com/f/nordic-q-a/4505/system-power-off

 

Please let me know your inputs.

Thanks & Regards

Vishnu Beema

Parents
  • Hi Vishnu,

    1) In ‘ble_app_blinky’ since SoftDevice is enabled, whether DCDC enabled by default or need to enabled explicitly by calling

                    sd_power_dcdc_mode_set(NRF_POWER_DCDC_ENABLE) 

    The SDK example does not enable the DC/DC by default, so you should call sd_power_dcdc_mode_set() once during startup (after enabling the SoftDevice).

    2) As mentioned below do I need to enable DC-DC only during BLE active and disable after BLE inactive.

    https://devzone.nordicsemi.com/f/nordic-q-a/4211/nrf51822-power-consumption-when-ble-advertising-connected#post-id-18589

    This old post refers to nRF51. The nRF52 has full automatic control of the DC/DC, so there is never any reason to disable it. Just enable it at startup and forget about it.

    3) To my understanding, keeping build in “Release” mode will disable UART.

     No. That is not the case with the SDK examples. Logging is configured and enabled/disabled in the projects sdk_config.h.

    a) Below are the macros enabled in Release mode & Debug mode. But when I keep in “Release” mode still I am seeing debug prints on Terminal. Then what is the difference between “Release” & “Debug” builds.

    "DEBUG; DEBUG_NRF" from solution in Debug configuration

    "NDEBUG" from solution in Release configuration

    Release builds are built with optimization, and some logging that causes increased flash usage is disabled. Debug builds, on the other hand, is built with:

    • No optimization to simplify debugging
    • More debug information, that causes increased application size, but eases debugging (such as file name and line number information for all APP_ERROR_CHECK's).

    So to get low power consumption and high performance you should select "Release", but you also need to disable logging in sdk_config.h by setting NRF_LOG_ENABLED to 0.

    b) As mentioned in below link, at the same time do I need to disable NRF_LOG_ENABLE explicitly do reduce current consumption. Please confirm.

                    https://devzone.nordicsemi.com/f/nordic-q-a/35042/current-consumption-in-nrf52

    Yes.

     c) How to disable UART if still I am seeing debug prints on Terminal. Do I need to disable NRFX_UARTE_ENABLED macro or just disconnecting debug cable is good enough during current measurement.

    Assuming you only use UART via the logger module, then it is enough to set NRF_LOG_ENABLE to 0.

    4) Do I need to explicitly disable FPU unit. I have floating point calculations. But before going to sleep (System ON or System OFF) do I need to clear FPU as mentioned in below link.

    If (and only if) you use the FPU, you need to make sure to clear FPU interrupts before going to sleep. If you use the Power Management library, this can be done by simply setting NRF_PWR_MGMT_CONFIG_FPU_SUPPORT_ENABLED to 1 in your projects sdk_config.h. If not, then you need to do the same thing yourself before entering sleep (please refer to the implementation of pwr_mgmt_fpu_sleep_prepare() in components\libraries\pwr_mgmt\nrf_pwr_mgmt.c in that case).

    5) Before going to System OFF I called nrf_gpio_cfg_default() with all pins expect pin 13 & 14 (Buttons to wake-up the device). This function will configure pullup as NRF_GPIO_PIN_NOPULL. But as per below link, not sure with development kit whether do I need to change to Pullup or Pulldown.

    Since you call nrf_gpio_cfg_default() you set the pins as disconnected inputs, so the signal is not propagated further. Therefore there is no need for a pull resistor (the pin value doe snot mater anyway, even a floating pin is OK when it is disconnected and not used as an input signal).

    Br,

    Einar 

Reply
  • Hi Vishnu,

    1) In ‘ble_app_blinky’ since SoftDevice is enabled, whether DCDC enabled by default or need to enabled explicitly by calling

                    sd_power_dcdc_mode_set(NRF_POWER_DCDC_ENABLE) 

    The SDK example does not enable the DC/DC by default, so you should call sd_power_dcdc_mode_set() once during startup (after enabling the SoftDevice).

    2) As mentioned below do I need to enable DC-DC only during BLE active and disable after BLE inactive.

    https://devzone.nordicsemi.com/f/nordic-q-a/4211/nrf51822-power-consumption-when-ble-advertising-connected#post-id-18589

    This old post refers to nRF51. The nRF52 has full automatic control of the DC/DC, so there is never any reason to disable it. Just enable it at startup and forget about it.

    3) To my understanding, keeping build in “Release” mode will disable UART.

     No. That is not the case with the SDK examples. Logging is configured and enabled/disabled in the projects sdk_config.h.

    a) Below are the macros enabled in Release mode & Debug mode. But when I keep in “Release” mode still I am seeing debug prints on Terminal. Then what is the difference between “Release” & “Debug” builds.

    "DEBUG; DEBUG_NRF" from solution in Debug configuration

    "NDEBUG" from solution in Release configuration

    Release builds are built with optimization, and some logging that causes increased flash usage is disabled. Debug builds, on the other hand, is built with:

    • No optimization to simplify debugging
    • More debug information, that causes increased application size, but eases debugging (such as file name and line number information for all APP_ERROR_CHECK's).

    So to get low power consumption and high performance you should select "Release", but you also need to disable logging in sdk_config.h by setting NRF_LOG_ENABLED to 0.

    b) As mentioned in below link, at the same time do I need to disable NRF_LOG_ENABLE explicitly do reduce current consumption. Please confirm.

                    https://devzone.nordicsemi.com/f/nordic-q-a/35042/current-consumption-in-nrf52

    Yes.

     c) How to disable UART if still I am seeing debug prints on Terminal. Do I need to disable NRFX_UARTE_ENABLED macro or just disconnecting debug cable is good enough during current measurement.

    Assuming you only use UART via the logger module, then it is enough to set NRF_LOG_ENABLE to 0.

    4) Do I need to explicitly disable FPU unit. I have floating point calculations. But before going to sleep (System ON or System OFF) do I need to clear FPU as mentioned in below link.

    If (and only if) you use the FPU, you need to make sure to clear FPU interrupts before going to sleep. If you use the Power Management library, this can be done by simply setting NRF_PWR_MGMT_CONFIG_FPU_SUPPORT_ENABLED to 1 in your projects sdk_config.h. If not, then you need to do the same thing yourself before entering sleep (please refer to the implementation of pwr_mgmt_fpu_sleep_prepare() in components\libraries\pwr_mgmt\nrf_pwr_mgmt.c in that case).

    5) Before going to System OFF I called nrf_gpio_cfg_default() with all pins expect pin 13 & 14 (Buttons to wake-up the device). This function will configure pullup as NRF_GPIO_PIN_NOPULL. But as per below link, not sure with development kit whether do I need to change to Pullup or Pulldown.

    Since you call nrf_gpio_cfg_default() you set the pins as disconnected inputs, so the signal is not propagated further. Therefore there is no need for a pull resistor (the pin value doe snot mater anyway, even a floating pin is OK when it is disconnected and not used as an input signal).

    Br,

    Einar 

Children
No Data
Related