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

NRF52832 battery measure - ublox nina B112

Sir,

I finally got success to measure the Coin Battery using a analog INPUT of NRF52832, AIN4

i am using ZEPHYR RTOS

I have to connect the BATTERY VDD to the AIN4.

My question, is there some mode using the saadc that you config to use the ADC to read the internal VDD and not the AIN4 ?

static const struct adc_channel_cfg m_1st_channel_cfg = {
    .gain = ADC_GAIN,
    .reference = ADC_REFERENCE,
    .acquisition_time = ADC_ACQUISITION_TIME,
    .channel_id = ADC_1ST_CHANNEL_ID,
#if defined(CONFIG_ADC_CONFIGURABLE_INPUTS)
    .input_positive = ADC_1ST_CHANNEL_INPUT,
#endif
};

Thanks!

Related