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

Power usage with SAADC

Testing with the NRF52840 dongle and the Power Profiler Kit. I see a reading of ~5uA when sleeping without SAADC enabled. 

I use this code to enable SAADC 

void saadc_init(void)
{
    ret_code_t err_code;
    nrf_saadc_channel_config_t saadc_channel_config = NRF_DRV_SAADC_DEFAULT_CHANNEL_CONFIG_SE(NRF_SAADC_INPUT_AIN0);

    nrf_drv_saadc_config_t nrf_drv_saadc_config = NRF_DRV_SAADC_DEFAULT_CONFIG;
     
    err_code = nrf_drv_saadc_init(&nrf_drv_saadc_config, saadc_callback);
    APP_ERROR_CHECK(err_code);

    err_code = nrf_drv_saadc_channel_init(0, &saadc_channel_config);
    APP_ERROR_CHECK(err_code);

    err_code = nrf_drv_saadc_buffer_convert(m_saadc_samples, SAADC_SAMPLES_IN_BUFFER);
    APP_ERROR_CHECK(err_code);
}

My power usage when sleeping is now 913uA

My final product will sleep for 2 minutes, wake by timer, read the SAADC value, advertising the value, sleeping for another 2 minutes. repeat.

My expectation is that I should uninit the SAADC before I call nrf_pwr_mgmt_run(). And then call saadc_init() when my product wakes. I'm not sure how to uninit the SAADC. 

Related