I currently detected, that migrating from NCS 3.1.0 to NCS 3.2.4 the battery voltage stopped to work. That is caused by an change in the “hal”, see nrfx 4.0 migration guide / saadc. To fix it, remove the SAADC_CH_PSELP_PSELP_AnalogInput0 in divider_setup.
battery.c - divider_setup
if (cfg->output_ohm != 0)
{
accp->input_positive = SAADC_CH_PSELP_PSELP_AnalogInput0 + iocp->channel;
}
else
{
accp->input_positive = SAADC_CH_PSELP_PSELP_VDD;
}
to
if (cfg->output_ohm != 0)
{
accp->input_positive = iocp->channel;
}
else
{
accp->input_positive = SAADC_CH_PSELP_PSELP_VDD;
}