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 #51 background imageLoading...
Page #51 background image
UM1581
Analog-to-digital converter (ADC)
DocID023800 Rev 1
51/584
ï‚· uint32_t ADC_TypeDef::RESERVED9
 Reserved, 0x0AC
ï‚· __IO uint32_t ADC_TypeDef::DIFSEL
 ADC Differential Mode Selection Register, Address offset: 0xB0
ï‚· __IO uint32_t ADC_TypeDef::CALFACT
 ADC Calibration Factors, Address offset: 0xB4
3.2 ADC Firmware driver API description
The following section lists the various functions of the ADC library.
3.2.1 How to use this driver
1. select the ADC clock using the function RCC_ADCCLKConfig()
2. Enable the ADC interface clock using RCC_AHBPeriphClockCmd();
3. ADC pins configuration
 Enable the clock for the ADC GPIOs using the following function:
RCC_AHBPeriphClockCmd(RCC_AHBPeriph_GPIOx, ENABLE);
 Configure these ADC pins in analog mode using GPIO_Init();
4. Configure the ADC conversion resolution, data alignment, external trigger and edge,
sequencer lenght and Enable/Disable the continuous mode using the ADC_Init()
function.
5. Activate the ADC peripheral using ADC_Cmd() function.
ADC channels group configuration
ï‚· To configure the ADC channels features, use ADC_Init(), ADC_InjectedInit() and
ADC_RegularChannelConfig() functions or/and ADC_InjectedChannelConfig()
ï‚· To activate the continuous mode, use the ADC_ContinuousModeCmd() function.
ï‚· To activate the Discontinuous mode, use the ADC_DiscModeCmd() functions.
ï‚· To activate the overrun mode, use the ADC_OverrunModeCmd() functions.
ï‚· To activate the calibration mode, use the ADC_StartCalibration() functions.
ï‚· To read the ADC converted values, use the ADC_GetConversionValue() function.
DMA for ADC channels features configuration
ï‚· To enable the DMA mode for ADC channels group, use the ADC_DMACmd()
function.
ï‚· To configure the DMA transfer request, use ADC_DMAConfig() function.
3.2.2 Initialization and Configuration functions
This section provides functions allowing to:
1. Initialize and configure the ADC injected and/or regular channels and dual mode.
2. Management of the calibration process
3. ADC Power-on Power-off

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