Programmable Sampling Time (Smp); Single Conversion Mode (Cont=0) - STMicroelectronics STM32F05 series Reference Manual

Advanced arm-based 32-bit mcus
Table of Contents

Advertisement

RM0091
Temperature sensor, V
The temperature sensor is connected to channel ADC_IN16. The internal voltage reference
V
REFINT
ADC1_IN18.
12.4.6

Programmable sampling time (SMP)

Before starting a conversion, the ADC needs to establish a direct connection between the
voltage source to be measured and the embedded sampling capacitor of the ADC. This
sampling time must be enough for the input voltage source to charge the sample and hold
capacitor to the input voltage level.
Having a programmable sampling time allows to trim the conversion speed according to the
input resistance of the input voltage source.
The ADC samples the input voltage for a number of ADC clock cycles that can be modified
using the SMP[2:0] bits in the ADC_SMPR register.
This programmable sampling time is common to all channels. If required by the application,
the software can change and adapt this sampling time between each conversions.
The total conversion time is calculated as follows:
t
CONV
Example:
With ADC_CLK = 14 MHz and a sampling time of 1.5 ADC clock cycles:
t
CONV
The ADC indicates the end of the sampling phase by setting the EOSMP flag.
12.4.7

Single conversion mode (CONT=0)

In Single conversion mode, the ADC performs a single sequence of conversions, converting
all the channels once. This mode is selected when CONT=0 in the ADC_CFGR1 register.
Conversion is started by either:
Setting the ADSTART bit in the ADC_CR register
Hardware trigger event
Inside the sequence, after each conversion is complete:
The converted data are stored in the 16-bit ADC_DR register
The EOC (end of conversion) flag is set
An interrupt is generated if the EOCIE bit is set
After the sequence of conversions is complete:
The EOSEQ (end of sequence) flag is set
An interrupt is generated if the EOSEQIE bit is set
Then the ADC stops until a new external trigger event occurs or the ADSTART bit is set
again.
Note:
To convert a single channel, program a sequence with a length of 1.
REFINT
is connected to channel ADC1_IN17. The V
= Sampling time + 12.5 x ADC clock cycles
= 1.5 + 12.5 = 14 ADC clock cycles = 1 µs
Doc ID 018940 Rev 1
Analog-to-digital converter (ADC)
and V
internal channels
BAT
BAT
channel is connected to channel
175/742

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the STM32F05 series and is the answer not in the manual?

Subscribe to Our Youtube Channel

Table of Contents