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 Reply Children
No Data
Related