Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to efficiently use the ADC on the nRF51822 SDK8.1

I am trying to use the ADC to take power measurements on an interval.  I found an example to read the values out online:

void ADC_IRQHandler() {
    nrf_adc_conversion_event_clean();

    adc_sample = nrf_adc_result_get();

    // trigger next ADC conversion
    nrf_adc_start();
}

The problem I have with this method is it appears to be using a bunch of power even when there is no reason to be running the ADC.  For example I have the ADC_IRQHandler called at the end of a 1 minute timer.  I noticed that when looping the program the power consumption is constant throughout the entire run time.  Then I commented out the ADC_IRQHandler() and noticed that the power consumption dropped dramatically.

This confuses me because it seems like including the ADC_IRQHandler() is consuming a great deal of power even during the time interval it isn't being called.  How can I go about reducing this power consumption and still using the ADC on a timer?

Parents Reply Children
No Data
Related