STM32F439xx HAL User Manual
Functions
Initialization and de-initialization functions
ADC Exported Functions

Functions

ErrorStatus LL_ADC_CommonDeInit (ADC_Common_TypeDef *ADCxy_COMMON)
 De-initialize registers of all ADC instances belonging to the same ADC common instance to their default reset values.
ErrorStatus LL_ADC_CommonInit (ADC_Common_TypeDef *ADCxy_COMMON, LL_ADC_CommonInitTypeDef *ADC_CommonInitStruct)
 Initialize some features of ADC common parameters (all ADC instances belonging to the same ADC common instance) and multimode (for devices with several ADC instances available).
void LL_ADC_CommonStructInit (LL_ADC_CommonInitTypeDef *ADC_CommonInitStruct)
 Set each LL_ADC_CommonInitTypeDef field to default value.
ErrorStatus LL_ADC_DeInit (ADC_TypeDef *ADCx)
 De-initialize registers of the selected ADC instance to their default reset values.
ErrorStatus LL_ADC_Init (ADC_TypeDef *ADCx, LL_ADC_InitTypeDef *ADC_InitStruct)
 Initialize some features of ADC instance.
void LL_ADC_StructInit (LL_ADC_InitTypeDef *ADC_InitStruct)
 Set each LL_ADC_InitTypeDef field to default value.
ErrorStatus LL_ADC_REG_Init (ADC_TypeDef *ADCx, LL_ADC_REG_InitTypeDef *ADC_REG_InitStruct)
 Initialize some features of ADC group regular.
void LL_ADC_REG_StructInit (LL_ADC_REG_InitTypeDef *ADC_REG_InitStruct)
 Set each LL_ADC_REG_InitTypeDef field to default value.
ErrorStatus LL_ADC_INJ_Init (ADC_TypeDef *ADCx, LL_ADC_INJ_InitTypeDef *ADC_INJ_InitStruct)
 Initialize some features of ADC group injected.
void LL_ADC_INJ_StructInit (LL_ADC_INJ_InitTypeDef *ADC_INJ_InitStruct)
 Set each LL_ADC_INJ_InitTypeDef field to default value.

Function Documentation

ErrorStatus LL_ADC_CommonDeInit ( ADC_Common_TypeDef *  ADCxy_COMMON)

De-initialize registers of all ADC instances belonging to the same ADC common instance to their default reset values.

Parameters:
ADCxy_COMMONADC common instance (can be set directly from CMSIS definition or by using helper macro __LL_ADC_COMMON_INSTANCE() )
Return values:
AnErrorStatus enumeration value:
  • SUCCESS: ADC common registers are de-initialized
  • ERROR: not applicable

Definition at line 306 of file stm32f4xx_ll_adc.c.

References assert_param, LL_APB2_GRP1_ForceReset(), LL_APB2_GRP1_PERIPH_ADC, and LL_APB2_GRP1_ReleaseReset().

ErrorStatus LL_ADC_CommonInit ( ADC_Common_TypeDef *  ADCxy_COMMON,
LL_ADC_CommonInitTypeDef ADC_CommonInitStruct 
)

Initialize some features of ADC common parameters (all ADC instances belonging to the same ADC common instance) and multimode (for devices with several ADC instances available).

Note:
The setting of ADC common parameters is conditioned to ADC instances state: All ADC instances belonging to the same ADC common instance must be disabled.
Parameters:
ADCxy_COMMONADC common instance (can be set directly from CMSIS definition or by using helper macro __LL_ADC_COMMON_INSTANCE() )
ADC_CommonInitStructPointer to a LL_ADC_CommonInitTypeDef structure
Return values:
AnErrorStatus enumeration value:
  • SUCCESS: ADC common registers are initialized
  • ERROR: ADC common registers are not initialized

Definition at line 336 of file stm32f4xx_ll_adc.c.

References __LL_ADC_IS_ENABLED_ALL_COMMON_INSTANCE, assert_param, LL_ADC_CommonInitTypeDef::CommonClock, IS_LL_ADC_COMMON_CLOCK, IS_LL_ADC_MULTI_DMA_TRANSFER, IS_LL_ADC_MULTI_MODE, IS_LL_ADC_MULTI_TWOSMP_DELAY, LL_ADC_MULTI_INDEPENDENT, LL_ADC_SetCommonClock(), LL_ADC_CommonInitTypeDef::MultiDMATransfer, LL_ADC_CommonInitTypeDef::Multimode, and LL_ADC_CommonInitTypeDef::MultiTwoSamplingDelay.

void LL_ADC_CommonStructInit ( LL_ADC_CommonInitTypeDef ADC_CommonInitStruct)
ErrorStatus LL_ADC_DeInit ( ADC_TypeDef *  ADCx)

De-initialize registers of the selected ADC instance to their default reset values.

Note:
To reset all ADC instances quickly (perform a hard reset), use function LL_ADC_CommonDeInit().
Parameters:
ADCxADC instance
Return values:
AnErrorStatus enumeration value:
  • SUCCESS: ADC registers are de-initialized
  • ERROR: ADC registers are not de-initialized

Definition at line 443 of file stm32f4xx_ll_adc.c.

References assert_param, LL_ADC_Disable(), LL_ADC_FLAG_AWD1, LL_ADC_FLAG_EOCS, LL_ADC_FLAG_JEOS, LL_ADC_FLAG_JSTRT, LL_ADC_FLAG_OVR, LL_ADC_FLAG_STRT, LL_ADC_INJ_SetTriggerSource(), LL_ADC_INJ_TRIG_SOFTWARE, LL_ADC_IsEnabled(), LL_ADC_REG_SetTriggerSource(), and LL_ADC_REG_TRIG_SOFTWARE.

ErrorStatus LL_ADC_Init ( ADC_TypeDef *  ADCx,
LL_ADC_InitTypeDef ADC_InitStruct 
)

Initialize some features of ADC instance.

Note:
These parameters have an impact on ADC scope: ADC instance. Affects both group regular and group injected (availability of ADC group injected depends on STM32 families). Refer to corresponding unitary functions into Configuration of ADC hierarchical scope: ADC instance .
The setting of these parameters by function LL_ADC_Init() is conditioned to ADC state: ADC instance must be disabled. This condition is applied to all ADC features, for efficiency and compatibility over all STM32 families. However, the different features can be set under different ADC state conditions (setting possible with ADC enabled without conversion on going, ADC enabled with conversion on going, ...) Each feature can be updated afterwards with a unitary function and potentially with ADC in a different state than disabled, refer to description of each function for setting conditioned to ADC state.
After using this function, some other features must be configured using LL unitary functions. The minimum configuration remaining to be done is:
Parameters:
ADCxADC instance
ADC_InitStructPointer to a LL_ADC_REG_InitTypeDef structure
Return values:
AnErrorStatus enumeration value:
  • SUCCESS: ADC registers are initialized
  • ERROR: ADC registers are not initialized

Definition at line 597 of file stm32f4xx_ll_adc.c.

References assert_param, LL_ADC_InitTypeDef::DataAlignment, IS_LL_ADC_DATA_ALIGN, IS_LL_ADC_RESOLUTION, IS_LL_ADC_SCAN_SELECTION, LL_ADC_IsEnabled(), LL_ADC_InitTypeDef::Resolution, and LL_ADC_InitTypeDef::SequencersScanMode.

ErrorStatus LL_ADC_INJ_Init ( ADC_TypeDef *  ADCx,
LL_ADC_INJ_InitTypeDef ADC_INJ_InitStruct 
)

Initialize some features of ADC group injected.

Note:
These parameters have an impact on ADC scope: ADC group injected. Refer to corresponding unitary functions into Configuration of ADC hierarchical scope: group regular (functions with prefix "INJ").
The setting of these parameters by function LL_ADC_Init() is conditioned to ADC state: ADC instance must be disabled. This condition is applied to all ADC features, for efficiency and compatibility over all STM32 families. However, the different features can be set under different ADC state conditions (setting possible with ADC enabled without conversion on going, ADC enabled with conversion on going, ...) Each feature can be updated afterwards with a unitary function and potentially with ADC in a different state than disabled, refer to description of each function for setting conditioned to ADC state.
After using this function, other features must be configured using LL unitary functions. The minimum configuration remaining to be done is:
Parameters:
ADCxADC instance
ADC_INJ_InitStructPointer to a LL_ADC_INJ_InitTypeDef structure
Return values:
AnErrorStatus enumeration value:
  • SUCCESS: ADC registers are initialized
  • ERROR: ADC registers are not initialized

Definition at line 824 of file stm32f4xx_ll_adc.c.

References assert_param, IS_LL_ADC_INJ_SEQ_SCAN_DISCONT_MODE, IS_LL_ADC_INJ_SEQ_SCAN_LENGTH, IS_LL_ADC_INJ_TRIG_AUTO, IS_LL_ADC_INJ_TRIG_SOURCE, LL_ADC_INJ_SEQ_SCAN_DISABLE, LL_ADC_INJ_SetSequencerLength(), LL_ADC_IsEnabled(), LL_ADC_REG_SEQ_DISCONT_DISABLE, LL_ADC_REG_SEQ_SCAN_DISABLE, LL_ADC_INJ_InitTypeDef::SequencerDiscont, LL_ADC_INJ_InitTypeDef::SequencerLength, LL_ADC_INJ_InitTypeDef::TrigAuto, and LL_ADC_INJ_InitTypeDef::TriggerSource.

void LL_ADC_INJ_StructInit ( LL_ADC_INJ_InitTypeDef ADC_INJ_InitStruct)

Set each LL_ADC_INJ_InitTypeDef field to default value.

Parameters:
ADC_INJ_InitStructPointer to a LL_ADC_INJ_InitTypeDef structure whose fields will be set to default values.
Return values:
None

Definition at line 902 of file stm32f4xx_ll_adc.c.

References LL_ADC_INJ_SEQ_DISCONT_DISABLE, LL_ADC_INJ_SEQ_SCAN_DISABLE, LL_ADC_INJ_TRIG_INDEPENDENT, LL_ADC_INJ_TRIG_SOFTWARE, LL_ADC_INJ_InitTypeDef::SequencerDiscont, LL_ADC_INJ_InitTypeDef::SequencerLength, LL_ADC_INJ_InitTypeDef::TrigAuto, and LL_ADC_INJ_InitTypeDef::TriggerSource.

ErrorStatus LL_ADC_REG_Init ( ADC_TypeDef *  ADCx,
LL_ADC_REG_InitTypeDef ADC_REG_InitStruct 
)

Initialize some features of ADC group regular.

Note:
These parameters have an impact on ADC scope: ADC group regular. Refer to corresponding unitary functions into Configuration of ADC hierarchical scope: group regular (functions with prefix "REG").
The setting of these parameters by function LL_ADC_Init() is conditioned to ADC state: ADC instance must be disabled. This condition is applied to all ADC features, for efficiency and compatibility over all STM32 families. However, the different features can be set under different ADC state conditions (setting possible with ADC enabled without conversion on going, ADC enabled with conversion on going, ...) Each feature can be updated afterwards with a unitary function and potentially with ADC in a different state than disabled, refer to description of each function for setting conditioned to ADC state.
After using this function, other features must be configured using LL unitary functions. The minimum configuration remaining to be done is:
Parameters:
ADCxADC instance
ADC_REG_InitStructPointer to a LL_ADC_REG_InitTypeDef structure
Return values:
AnErrorStatus enumeration value:
  • SUCCESS: ADC registers are initialized
  • ERROR: ADC registers are not initialized

Definition at line 692 of file stm32f4xx_ll_adc.c.

References assert_param, LL_ADC_REG_InitTypeDef::ContinuousMode, LL_ADC_REG_InitTypeDef::DMATransfer, IS_LL_ADC_REG_CONTINUOUS_MODE, IS_LL_ADC_REG_DMA_TRANSFER, IS_LL_ADC_REG_SEQ_SCAN_DISCONT_MODE, IS_LL_ADC_REG_SEQ_SCAN_LENGTH, IS_LL_ADC_REG_TRIG_SOURCE, LL_ADC_IsEnabled(), LL_ADC_REG_SEQ_DISCONT_DISABLE, LL_ADC_REG_SEQ_SCAN_DISABLE, LL_ADC_REG_SetSequencerLength(), LL_ADC_REG_InitTypeDef::SequencerDiscont, LL_ADC_REG_InitTypeDef::SequencerLength, and LL_ADC_REG_InitTypeDef::TriggerSource.

void LL_ADC_REG_StructInit ( LL_ADC_REG_InitTypeDef ADC_REG_InitStruct)
void LL_ADC_StructInit ( LL_ADC_InitTypeDef ADC_InitStruct)

Set each LL_ADC_InitTypeDef field to default value.

Parameters:
ADC_InitStructPointer to a LL_ADC_InitTypeDef structure whose fields will be set to default values.
Return values:
None

Definition at line 645 of file stm32f4xx_ll_adc.c.

References LL_ADC_InitTypeDef::DataAlignment, LL_ADC_DATA_ALIGN_RIGHT, LL_ADC_RESOLUTION_12B, LL_ADC_SEQ_SCAN_ENABLE, LL_ADC_InitTypeDef::Resolution, and LL_ADC_InitTypeDef::SequencersScanMode.