RM0008 Analog-to-digital converter (ADC)
157/690
Figure 26. Right alignment of data
Figure 27. Left alignment of data
10.6 Channel-by-channel programmable sample time
ADC samples the input voltage for a number of ADC_CLK cycles which can be modified us-
ing the SMP[2:0] bits in the ADC_SMPR1 and ADC_SMPR2 registers. Each channel can be
sampled with a different sample time.
The total conversion time is calculated as follows:
Tconv = Sampling time + 12.5 cycles
Example:
With an ADCCLK = 14 MHz and a sampling time of 1.5 cycles:
Tconv = 1.5 + 12.5 = 14 cycles = 1µs
10.7 Conversion on external trigger
Conversion can be triggered by an external event (e.g. timer capture, EXTI line). If the EXT-
TRIG control bit is set then external events are able to trigger a conversion. The EXT-
SEL[2:0] and JEXTSEL[2:0] control bits allow the application to select decide which out of 8
possible events can trigger conversion for the regular and injected groups.
Note: When an external trigger is selected for ADC regular or injected conversion, only the rising
edge of the signal can start the conversion.
D7D8 D9 D6 D5 D4 D3 D2 D1 D0 D10 D11 SEXT SEXT SEXT SEXT
D7D8 D9 D6 D5 D4 D3 D2 D1 D0 D10 D11
Injected group
Regular group
0000
SEXT D0 D1D11 D10 D9 D8 D7 D6 D5 D2 D3 D4 0 0 0
D0 D1D11 D10 D9 D8 D7 D6 D5 D2 D3 D4 0 0 00
Injected group
Regular group