STM32 gotchas
220. Voltage of previous ADC channel in sequence may influence next ADC channel's readout

As has been discussed previously, the ADC's sampling capacitor after conversion is charged to a voltage, depending on the internal structure of ADC. However, this voltage depends also on the converted input voltage, i.e. voltage to which the sampling capacitor was charged before conversion.

This program (with #define SINGLE_CHANNEL line commented out) illustrates this effect on an 'F4 Disco: PA3 and PA1 are converted by ADC in a sequence after each other. Pin PA3 is jumpered to both PA0 and PA2, set to GPIO Output, which together with the 220kOhm externalresistor on PA0 allows to set various voltage levels onto PA3.

Pin PA1 is floating, loaded only by capacitance (cca 18pF) of a 1/10 oscilloscope probe. Before the sequence of conversion, this capacitance is discharged to 0V by briefly setting PA1 to GPIO Output at 0 level, and then back to Analog.

After a single PA3-PA1 sequence of conversion, the following voltages were measured on PA1 (for various setting of PA0/PA2, resulting in indicated voltage on PA3):
PA30.00V1.35V2.50V2.90V
PA10.15V0.45V0.68V0.78V
This illustrates how charge from previous conversion on PA3 is transferred to the floating PA1. The effect is more pronounced, if several (100) successive sequences are performed:

PA30.00V1.35V2.50V2.90V
PA10.30V1.14V1.88V2.12V

So, voltage changes on previously converted channel (let's call it A) do have some impact on the next converted channel (B), if the input signal source of channel B has too high impedance. Users may perceive such influence as "crosstalk" from channel A to channel B.