STM32 gotchas
286. ADC can't be triggered by TIM Capture

In some STM32, ADC can be triggered not only by TRGO output of timers, but also directly from individual channels.

While in many RM this option is correctly marked in External triggers table of ADC chapter as TIMx_OCx (standing for Output Compare), unfortunately, in some other STM32 families' RM it's marked as TIMx_CCx. This gives the impression, that any Capture-Compare event (i.e. even which sets the respective TIMx_SR.CCxF bit) can be source of ADC trigger - namely, that also Input Capture can be used to trigger ADC (effectively making it a trigger by a truly external 1 signal input on a pin).

However, this is not the case. As ADC is triggered by the same signal which is output to GPIO, only Compare can be used for this purpose.


1. ST uses a confusing terminology when it comes to ADC triggers (similarly to e.g. interrupts): by external they mean external to the given (ADC) module, i.e. not generated internally within the module. Thus, naming the setting, where ADC is triggered directly from a pin (which is in fact in most STM32 possible for certain pins multiplexed via the EXTI multiplexor), gets somewhat tricky...