EasyManuals Logo

STMicroelectronics STM32F05 series User Manual

STMicroelectronics STM32F05 series
742 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #175 background imageLoading...
Page #175 background image
RM0091 Analog-to-digital converter (ADC)
Doc ID 018940 Rev 1 175/742
Temperature sensor, V
REFINT
and V
BAT
internal channels
The temperature sensor is connected to channel ADC_IN16. The internal voltage reference
V
REFINT
is connected to channel ADC1_IN17. The V
BAT
channel is connected to channel
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
= Sampling time + 12.5 x ADC clock cycles
Example:
With ADC_CLK = 14 MHz and a sampling time of 1.5 ADC clock cycles:
t
CONV
= 1.5 + 12.5 = 14 ADC clock cycles = 1 µs
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.

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

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

STMicroelectronics STM32F05 series Specifications

General IconGeneral
BrandSTMicroelectronics
ModelSTM32F05 series
CategoryMicrocontrollers
LanguageEnglish

Related product manuals