Analog-to-digital converter (ADC) RM0091
180/742 Doc ID 018940 Rev 1
Lower resolution reduces the conversion time needed for the successive approximation
steps as shown in Ta bl e 3 4.
12.5.3 End of conversion, end of sampling phase (EOC, EOSMP flags)
The ADC indicates each end of conversion (EOC) event.
The ADC sets the EOC flag in the ADC_ISR register as soon as a new conversion data
result is available in the ADC_DR register. An interrupt can be generated if the EOCIE bit is
set in the ADC_IER register. The EOC flag is cleared by software either by writing 1 to it, or
by reading the ADC_DR register.
The ADC also indicates the end of sampling phase by setting the EOSMP flag in the
ADC_ISR register. The EOSMP flag is cleared by software by writing1 to it. An interrupt can
be generated if the EOSMPIE bit is set in the ADC_IER register.
The aim of this interrupt is to allow the processing to be synchronized with the conversions.
Typically, an analog multiplexer can be accessed in hidden time during the conversion
phase, so that the multiplexer is positioned when the next sampling starts.
Note: As there is only a very short time left between the end of the sampling and the end of the
conversion, it is recommenced to use polling or a WFE instruction rather than an interrupt
and a WFI instruction.
12.5.4 End of conversion sequence (EOSEQ flag)
The ADC notifies the application of each end of sequence (EOSEQ) event.
The ADC sets the EOSEQ flag in the ADC_ISR register as soon as the last data result of a
conversion sequence is available in the ADC_DR register. An interrupt can be generated if
the EOSEQIE bit is set in the ADC_IER register. The EOSEQ flag is cleared by software by
writing 1 to it.
Table 34. t
SAR
timings depending on resolution
RES[1:0]
bits
t
SAR
(ADC clock
cycles)
t
SAR
(ns) at
f
ADC
= 14 MHz
t
SMPL (min)
(ADC clock
cycles)
t
ADC
(ADC clock cycles)
(with min. t
SMPL)
t
ADC
(µs) at
f
ADC
= 14 MHz
12 12.5 893 ns 1.5 14 1000 ns
10 11.5 821 ns 1.5 13 928 ns
8 9.5 678 ns 1.5 11 785 ns
6 7.5 535 ns 1.5 9 643 ns