STM32G030 ADC channels and VREFINT read 4095 only when battery is connected on 2 boards out of 10
I am using an STM32G030C8T6.
I have 10 boards built from the same PCB design and BOM. All boards use the same firmware.
8 boards work correctly, but 2 boards show abnormal ADC readings.
ADC channels used:
-
PA1 = ADC_IN1
-
PA5 = ADC_IN5
-
PA6 = ADC_IN6
-
PB0 = ADC_IN8
-
PB1 = ADC_IN9
-
PB2 = ADC_IN10
-
VREFINT
ADC configuration:
-
12-bit resolution
-
Continuous conversion enabled
-
Scan conversion enabled
-
DMA circular mode
-
Sampling time = 160.5 cycles
-
VREFINT included in the scan sequence
Problem:
On the failing boards, when the battery is connected, some ADC channels become 4095.
Example:
LOAD_I_ADC = 4095
PV_A_ADC = 4095
BAT_A_ADC = 4095
VREFINT_ADC = 4095
Other channels still show valid values.
Measured VDDA:
-
Battery disconnected: 3.32V
-
Battery connected: 3.33V
To isolate the issue, I created a separate test project using only the following:
-
ADC_IN9 (PB1)
-
VREFINT
Results with battery disconnected:
adcBuf[0] = 1415
adcBuf[1] = 1518
These values appear normal.
I then created another test project using only VREFINT with a single ADC conversion to determine whether the issue is related to channel interaction or an external analog circuit.
My questions:
-
Can ADC sample-and-hold capacitor effects or source impedance issues cause VREFINT to read 4095?
-
Can an external analog input force VREFINT conversions to become saturated?
-
Has anyone seen ADC channels and VREFINT become 4095 only when a battery is connected while VDDA remains stable at 3.33 V?
-
What additional measurements or tests would you recommend?
Any suggestions would be appreciated.
