For some STM32 Errata (seen in 'L4, 'L5 and 'G4), the following applies for ADC:
Wrong ADC result if conversion done late after calibration or previous conversion The result of an ADC conversion done more than 1 ms later than the previous ADC conversion or ADC calibration might be incorrect.
This may result in surprisingly incorrect ADC readouts to the unaware. The suggested workaround is, if there's more than 1ms delay, to perform a dummy conversion and discard its result.
In this thread on STM32 forum, ST employee SimonV sheds more light on the minutiae of the underlying problem. The main takeaways are, that
- the problem causes more-than-specified additional offset/gain error in a small portion of chips due to silicon process variations during manufacturing;
- the problem is independent of power supply voltage and measured voltage;
- for the workaround, it is enough to perform a dummy conversion at any channel with any sampling time.