STM32 gotchas
309. ADC and comparator at the same pin may result in comparator->EXTI to get triggered

The ADC in STM32 at the beginning of sampling phase connects the nominally 6-8pF sampling capacitor to the input pin. This capacitor is charged to a voltage dependent - but in an undocumented way - on the previously converted voltage. For all practical purposes, it's wise to assume, that the initial voltage of the sampling capacitor may be any between 0V and VDDA (or perhaps VREF+).

At this moment, the initial current from signal source to this capacitor causes a "dip" in the input signal. The polarity and amplitude of this dip depends on the input signal, the sampling capacitor's exact value and voltage; but, most importantly, on the impedance of the signal source.

If the same signal is used also as input to comparator, this dip may generate a pulse at the comparator's output, even if nominally the input signal did not cross the threshold given by voltage on the other input of the comparator. If such comparator is connected to EXTI, an event in both polarities will be generated, resulting in surprising interrupt, if enabled.

This is just a special case of the generic ADC sampling results in signal dip issue.