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

Simple nRF51822 Power Consumption Examples

I am trying to look at power consumption for very basic use cases to understand how often I need to go into SYSTEM OFF state. I have a development board and am measuring current drawn by the board for two very simple examples. I am hoping someone can help me calculate the expected current draw for these cases.

The first is:

int main(void) {
  for(;;) {
    __WFI();
  }
}

In this case, I am seeing the current draw be about 16uA. I have added calls to light an LED after the WFI call and the LED does not light so I'm sure I'm in the wait state. Is 16 micros reasonable for this state? I have the s110 Soft Device loaded on my board but I have not executed any code except for what I have shown above.

The second scenario involves initializing the s110 Soft Device (Version 7.0.0):

void app_error_handler(uint32_t error_code, uint32_t line_num, const uint8_t * p_file_name)
{
    nrf_gpio_cfg_output(2);
    nrf_gpio_pin_write(2, 1);

    // On assert, the system can only recover with a reset.
    NVIC_SystemReset();
}

void assert_nrf_callback(uint16_t line_num, const uint8_t * p_file_name)
{
    nrf_gpio_cfg_output(2);
    nrf_gpio_pin_write(2, 1);

    app_error_handler(0xDEADBEEF, line_num, p_file_name);
}

int main(void) {
  for(;;) {
    SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_SYNTH_250_PPM, false);
    uint32_t err_code = sd_app_evt_wait();
    APP_ERROR_CHECK(err_code);
  }
}

Here I add the code to initialize the soft device and then do it's version of WFI. I have added calls to light an LED in case there's trouble. I have also used those same LED calls to verify that the WFI and sd_app_evt_wait methods are in fact blocking execution.

In this case, I see the current draw jump to 700uA. Again, does this seem correct? I'm assuming that initializing the soft device has enabled some peripherals but can't find a list of what those might be.

I have made sure to reset the board after loaded the image to make sure I am not in debug mode. I am currently running the tests using the following configuration:

Hardware: RFduino Voltage: 1.8V SDK: 6.0.0.43681 Soft Device: 7.0.0

I have also run the same tests on a PCA10001 with the same results. If we can document the expected current here I think it will help a lot of folks going forward.

Thanks!

...Z

Parents
  • Hi

    An appropriate code reference for putting the chip into low power mode without using the softdevice, please look at the powerdown examples on the Nordic's Github, specifically look at the system-on-wakeup-on-gpio example to test the System On low power mode current constumption.

    For measuring the current consumption for the softdevice, you can run the ble_app_hrs for the evaluation kit, which is power optimized, as stated in the documentation for the example. The ble_app_hrs example for the development board is not power optimized, but you can make it power optimized by enabling compiler optimization. This thread describes how to enable compiler optimization and also contains a lot of good hints on how to minimize current consumption of nRF51 devices.

    In our code above, the 700 uA current consumption is normal when using the synthesized low frequency clock, you should instead use a crystal or the internal RC with calibration, see the same thread as I pointed to earlier. For the current consumption without the softdevice, you should measure ~2.6uA, and that is what you should see when trying the low power example I pointed you to earlier for System On low power mode. For System Off low power mode, you should see ~0.6uA with no RAM retention. These current consumption numbers for the different modes are stated in table 27 in the nRF51822 PS v2.0.

    Further information on power consumption and current measurements, including troubleshooting is found on this thread

Reply
  • Hi

    An appropriate code reference for putting the chip into low power mode without using the softdevice, please look at the powerdown examples on the Nordic's Github, specifically look at the system-on-wakeup-on-gpio example to test the System On low power mode current constumption.

    For measuring the current consumption for the softdevice, you can run the ble_app_hrs for the evaluation kit, which is power optimized, as stated in the documentation for the example. The ble_app_hrs example for the development board is not power optimized, but you can make it power optimized by enabling compiler optimization. This thread describes how to enable compiler optimization and also contains a lot of good hints on how to minimize current consumption of nRF51 devices.

    In our code above, the 700 uA current consumption is normal when using the synthesized low frequency clock, you should instead use a crystal or the internal RC with calibration, see the same thread as I pointed to earlier. For the current consumption without the softdevice, you should measure ~2.6uA, and that is what you should see when trying the low power example I pointed you to earlier for System On low power mode. For System Off low power mode, you should see ~0.6uA with no RAM retention. These current consumption numbers for the different modes are stated in table 27 in the nRF51822 PS v2.0.

    Further information on power consumption and current measurements, including troubleshooting is found on this thread

Children
No Data
Related