Analog-to-digital converter (ADC) RM0091
178/742 Doc ID 018940 Rev 1
Figure 26. Stopping an ongoing conversion
12.5 Conversion on external trigger and trigger polarity (EXTSEL,
EXTEN)
A conversion or a sequence of conversion can be triggered either by software or by an
external event (for example timer capture). If the EXTEN[1:0] control bits are not equal to
“0b00”, then external events are able to trigger a conversion with the selected polarity. The
trigger selection is effective once software has set bit ADSTART=1.
Any hardware triggers which occur while a conversion is ongoing are ignored.
If bit ADSTART=0, any hardware triggers which occur are ignored.
Tabl e 32 provides the correspondence between the EXTEN[1:0] values and the trigger
polarity.
Note: The polarity of the external trigger cannot be changed on the fly.
The EXTSEL[2:0] control bits are used to select which of 8 possible events can trigger
conversions.
Tabl e 33 gives the possible external trigger for regular conversion.
Software source trigger events can be generated by setting the ADSTART bit in the
ADC_CR register.
SAMPLING CH(N)
ADC State
RDY
CONVERTING CH(N)
ADC_DR
DATA N-1
RDY
ADSTOP
ADSTART
cleared
by HW
set
by SW
cleared
by HW
set
by SW
Table 32. Configuring the trigger polarity
Source EXTEN[1:0]
Trigger detection disabled 00
Detection on rising edge 01
Detection on falling edge 10
Detection on both rising and falling edges 11
Table 33. External triggers
Name Source EXTSEL[2:0]
TRG0 TIM1_TRGO 000
TRG1 TIM1_CC4 001