English
Language : 

RM0376 Datasheet, PDF (302/968 Pages) STMicroelectronics – This reference manual targets application developers
Analog-to-digital converter (ADC)
RM0376
14.4.12
Stopping an ongoing conversion (ADSTP)
The software can decide to stop any ongoing conversions by setting ADSTP=1 in the
ADC_CR register.
This will reset the ADC operation and the ADC will be idle, ready for a new operation.
When the ADSTP bit is set by software, any ongoing conversion is aborted and the result is
discarded (ADC_DR register is not updated with the current conversion).
The scan sequence is also aborted and reset (meaning that restarting the ADC would re-
start a new sequence).
Once this procedure is complete, the ADSTP and ADSTART bits are both cleared by
hardware and the software must wait until ADSTART=0 before starting new conversions.
Figure 39. Stopping an ongoing conversion
$'&VWDWH
$'67$57
$'6723
$'&B'5
5'<
VHWE\6:
6$03/,1*&+ 1
&219(57,1*&+ 1
'$7$1
VHWE\6:
5'<
FOHDUHGE\+:
FOHDUHGE\+:
069
14.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.
Table 55 provides the correspondence between the EXTEN[1:0] values and the trigger
polarity.
Table 55. Configuring the trigger polarity
Source
Trigger detection disabled
Detection on rising edge
Detection on falling edge
Detection on both rising and falling edges
EXTEN[1:0]
00
01
10
11
Note:
The polarity of the external trigger can be changed only when the ADC is not converting
(ADSTART= 0).
The EXTSEL[2:0] control bits are used to select which of 8 possible events can trigger
conversions.
302/968
DocID025941 Rev 2