Analog-to-digital converter (ADC)
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