Skip to main content

Subsection 6.3.1 Inside the Converter

A conversion takes a fixed number of ADC clock cycles, and this is where they go. Figure 6.3.1 puts the sampling window and the twelve comparisons side by side, with the flags the hardware sets at each end of them.
Figure 6.3.1. Conversion timing (RM0490, Analog to digital conversion time). Setting ADSTART starts sampling; sampling takes 1.5 ADC clock cycles and the successive approximation itself 12.5 (the 1.5 is the reset value of SMP1[2:0] in ADC_SMPR, which this chapter leaves alone), so a 12-bit conversion is 14 cycles in all, about 1.17 µs at the default 12 MHz ADC clock. EOC is then set and the result is in ADC_DR. ADSTART stays set for the whole conversion and is cleared by hardware at the end. While it reads 1, the converter is busy.