6  HAL ADC Generic Driver 
6.1  ADC Firmware driver registers structures 
6.1.1  ADC_InitTypeDef 
Data Fields 
  uint32_t ClockPrescaler 
  uint32_t Resolution 
  uint32_t DataAlign 
  uint32_t ScanConvMode 
  uint32_t EOCSelection 
  uint32_t ContinuousConvMode 
  uint32_t NbrOfConversion 
  uint32_t DiscontinuousConvMode 
  uint32_t NbrOfDiscConversion 
  uint32_t ExternalTrigConv 
  uint32_t ExternalTrigConvEdge 
  uint32_t DMAContinuousRequests 
Field Documentation 
  uint32_t ADC_InitTypeDef::ClockPrescaler 
Select ADC clock prescaler. The clock is common for all the ADCs. This parameter 
can be a value of ADC_ClockPrescaler 
  uint32_t ADC_InitTypeDef::Resolution 
Configures the ADC resolution. This parameter can be a value of ADC_Resolution 
  uint32_t ADC_InitTypeDef::DataAlign 
Specifies ADC data alignment to right (MSB on register bit 11 and LSB on register bit 
0) (default setting) or to left (if regular group: MSB on register bit 15 and LSB on 
register bit 4, if injected group (MSB kept as signed value due to potential negative 
value after offset application): MSB on register bit 14 and LSB on register bit 3). This 
parameter can be a value of ADC_Data_align 
  uint32_t ADC_InitTypeDef::ScanConvMode 
Configures the sequencer of regular and injected groups. This parameter can be 
associated to parameter 'DiscontinuousConvMode' to have main sequence subdivided 
in successive parts. If disabled: Conversion is performed in single mode (one channel 
converted, the one defined in rank 1). Parameters 'NbrOfConversion' and 
'InjectedNbrOfConversion' are discarded (equivalent to set to 1). If enabled: 
Conversions are performed in sequence mode (multiple ranks defined by 
'NbrOfConversion'/'InjectedNbrOfConversion' and each channel rank). Scan direction 
is upward: from rank1 to rank 'n'. This parameter can be set to ENABLE or DISABLE  
  uint32_t ADC_InitTypeDef::EOCSelection 
Specifies what EOC (End Of Conversion) flag is used for conversion by polling and 
interruption: end of conversion of each rank or complete sequence. This parameter 
can be a value of ADC_EOCSelection. Note: For injected group, end of conversion 
(flag&IT) is raised only at the end of the sequence. Therefore, if end of conversion is 
set to end of each conversion, injected group should not be used with interruption 
(HAL_ADCEx_InjectedStart_IT) or polling (HAL_ADCEx_InjectedStart and 
HAL_ADCEx_InjectedPollForConversion). By the way, polling is still possible since 
driver will use an estimated timing for end of injected conversion. Note: If overrun 
feature is intended to be used, use ADC in mode 'interruption' (function