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

SAADC

Using one ADC, the current can be reduced to about 40uA after the ADC value is taken.
Using a two-channel ADC, after the ADC value is taken, the current stops at about 0.4 mA and cannot reach about 40 uA.
How can I reduce the current to about 40uA with two ADCs?

Example

void device_adc_init(void)//The current cannot be reduced to about 40uA, and the current is at 0.4mA after obtaining the ADC value.
{
ret_code_t err_code;

nrf_saadc_channel_config_t channel_config = NRF_DRV_SAADC_DEFAULT_CHANNEL_CONFIG_SE(NRF_SAADC_INPUT_AIN0);

nrf_saadc_channel_config_t channe2_config = NRF_DRV_SAADC_DEFAULT_CHANNEL_CONFIG_SE(NRF_SAADC_INPUT_AIN1);

err_code = nrf_drv_saadc_init(NULL, adc_event_handler);

APP_ERROR_CHECK(err_code);

err_code = nrf_drv_saadc_channel_init(0, &channel_config);

APP_ERROR_CHECK(err_code);

err_code = nrf_drv_saadc_channel_init(1, &channe2_config);

APP_ERROR_CHECK(err_code);

err_code = nrf_drv_saadc_buffer_convert(m_buffer_pool[0], SAMPLES_IN_BUFFER);

APP_ERROR_CHECK(err_code);

err_code = nrf_drv_saadc_buffer_convert(m_buffer_pool[1], SAMPLES_IN_BUFFER);

APP_ERROR_CHECK(err_code);

}

void device_adc_init(void)//Current can be reduced to about 40uA
{
ret_code_t err_code;

nrf_saadc_channel_config_t channel_config = NRF_DRV_SAADC_DEFAULT_CHANNEL_CONFIG_SE(NRF_SAADC_INPUT_AIN0);

err_code = nrf_drv_saadc_init(NULL, adc_event_handler);

APP_ERROR_CHECK(err_code);

err_code = nrf_drv_saadc_channel_init(0, &channel_config);

APP_ERROR_CHECK(err_code);
err_code = nrf_drv_saadc_buffer_convert(m_buffer_pool[0], SAMPLES_IN_BUFFER);

APP_ERROR_CHECK(err_code);

err_code = nrf_drv_saadc_buffer_convert(m_buffer_pool[1], SAMPLES_IN_BUFFER);

APP_ERROR_CHECK(err_code);

}

Related