EasyManuals Logo

ST STM32F31xx User Manual

ST STM32F31xx
584 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 #53 background imageLoading...
Page #53 background image
UM1581
Analog-to-digital converter (ADC)
DocID023800 Rev 1
53/584
3.2.4 Temperature Sensor - Vrefint (Internal Reference Voltage) and VBAT
management functions
This section provides a function allowing to enable/ disable the internal connections
between the ADC and the Vbat/2, Temperature Sensor and the Vrefint source.
A typical configuration to get the Temperature sensor and Vrefint channels voltages is
done following these steps :
1. Enable the internal connection of Vbat/2, Temperature sensor and Vrefint sources
with the ADC channels using:
 ADC_TempSensorCmd()
 ADC_VrefintCmd()
 ADC_VbatCmd()
2. select the ADC_Channel_TempSensor and/or ADC_Channel_Vrefint and/or
ADC_Channel_Vbat using
 ADC_RegularChannelConfig() or
 ADC_InjectedChannelConfig() functions
3. Get the voltage values, using:
 ADC_GetConversionValue() or
 ADC_GetInjectedConversionValue().
ï‚· ADC_TempSensorCmd()
ï‚· ADC_VrefintCmd()
ï‚· ADC_VbatCmd()
3.2.5 Regular Channels Configuration functions
This section provides functions allowing to manage the ADC regular channels.
To configure a regular sequence of channels use:
1. ADC_RegularChannelConfig() this fuction allows:
 Configure the rank in the regular group sequencer for each channel
 Configure the sampling time for each channel
2. ADC_RegularChannelSequencerLengthConfig() to set the length of the regular
sequencer
The regular trigger is configured using the following functions:
1. ADC_SelectExternalTrigger()
2. ADC_ExternalTriggerPolarityConfig()
The start and the stop conversion are controlled by:
1. ADC_StartConversion()
2. ADC_StopConversion()
Please Note that the following features for regular channels are configurated
using the ADC_Init() function : (++) continuous mode activation (++) Resolution
(++) Data Alignement (++) Overrun Mode.
Get the conversion data: This subsection provides an important function in the ADC
peripheral since it returns the converted data of the current regular channel. When the
Conversion value is read, the EOC Flag is automatically cleared.
To configure the discontinous mode, the following functions should be used:

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the ST STM32F31xx and is the answer not in the manual?

ST STM32F31xx Specifications

General IconGeneral
BrandST
ModelSTM32F31xx
CategoryMicrocontrollers
LanguageEnglish

Related product manuals