STM32 ADC readings are saturating, any thoughts?
So we have just gone into production on a new design, a very small part of the circuit monitors the devices battery voltage fed into one of the ADC channels. I am finding that 1 in every 50 boards has developed a failure with the ADC where it just reads 0xFFF for this channel. The battery I am monitoring is divided down with a 1M potential divider, following that there is an unity gain buffer with a low pass filter on the output . The low pass filter is 470R and 100n. The battery is 4.2V to 3V and gets scaled down to 2.1-1.5V via the potential divider. my VREF+ pin is connected to an external 2.5V reference. My VDDA pins are filtered and connected to a regulated 3V and system GND. I can instrument the failed boards and all the signals external to the IC check ok ie VDDA, EXT_REf etc, input looks correct no spikes etc. The issue is solved by replacing the processor with a fresh one and the board works correctly. Any thoughts as to what is going on ?