STM32G0 ADC issue on Zephyr
Problem: ADC reading a battery voltage jump by twice as much when the battery voltage goes from just under 3.55V to anything above (jump is about 1000 in raw adc reading at 12 bits).
Background:
We have a custom board with STM32G0B1CB on which we are trying to measure the battery voltage.
VREF+ pin is tied to VDD which is fed by a DCDC at 3.5V
The battery can go from 2.75 to 4.5V and is fed to channel 1 (PA1) through a 100K : 100K resistor divider giving a max voltage on PA1 of 2.25V.
The battery voltage is currently fed from voltage supply that is changed from 2.75V to 4.5V. As mentioned earlier, at around 3.55V the adc reading has a big jump of close to a 1000 raw value at 12 bit which is just baffling. I am trying to get a curve of adc raw value vs. battery voltage and this jump just breaks the pattern.

Here is the zephyr overlay file:
zephyr currently only supports ADC_GAIN_1 and ADC_REF_INTERNAL.
What change (hardware or firmware) do i need to make to get a reliable continuous output from the adc?
