Hi,
I am using nrf52832_AA, SDK 15.0.0, s132.
I am using an ADC and it does not seem to be measured correctly.
The value is shaken.
The AIN2 pin is used, and when the voltage is measured by the multimeter, a constant voltage of 3.5 V is input.
However, the value of ADC is not constant.
void saadc_init(void)
{
ret_code_t err_code;
/* Battery ADC */
nrf_saadc_channel_config_t channel_config =
NRF_DRV_SAADC_DEFAULT_CHANNEL_CONFIG_SE(NRF_SAADC_INPUT_AIN2);
err_code = nrf_drv_saadc_init(NULL, NULL);
APP_ERROR_CHECK(err_code);
/* Battery ADC */
err_code = nrf_drv_saadc_channel_init(0, &channel_config);
APP_ERROR_CHECK(err_code);
}
In main, nrf_drv_saadc_sample_convert (0, & adc_value); It is used by calling a function.
I could see that the value was shaking when reading the adc_value value.
What did I do wrong?
Thank you.