STM32F439xx HAL User Manual
Functions
Extended features functions
ADC Exported Functions

Extended features functions. More...

Functions

HAL_StatusTypeDef HAL_ADCEx_InjectedStart (ADC_HandleTypeDef *hadc)
 Enables the selected ADC software start conversion of the injected channels.
HAL_StatusTypeDef HAL_ADCEx_InjectedStart_IT (ADC_HandleTypeDef *hadc)
 Enables the interrupt and starts ADC conversion of injected channels.
HAL_StatusTypeDef HAL_ADCEx_InjectedStop (ADC_HandleTypeDef *hadc)
 Stop conversion of injected channels.
HAL_StatusTypeDef HAL_ADCEx_InjectedPollForConversion (ADC_HandleTypeDef *hadc, uint32_t Timeout)
 Poll for injected conversion complete.
HAL_StatusTypeDef HAL_ADCEx_InjectedStop_IT (ADC_HandleTypeDef *hadc)
 Stop conversion of injected channels, disable interruption of end-of-conversion.
uint32_t HAL_ADCEx_InjectedGetValue (ADC_HandleTypeDef *hadc, uint32_t InjectedRank)
 Gets the converted value from data register of injected channel.
HAL_StatusTypeDef HAL_ADCEx_MultiModeStart_DMA (ADC_HandleTypeDef *hadc, uint32_t *pData, uint32_t Length)
 Enables ADC DMA request after last transfer (Multi-ADC mode) and enables ADC peripheral.
HAL_StatusTypeDef HAL_ADCEx_MultiModeStop_DMA (ADC_HandleTypeDef *hadc)
 Disables ADC DMA (multi-ADC mode) and disables ADC peripheral.
uint32_t HAL_ADCEx_MultiModeGetValue (ADC_HandleTypeDef *hadc)
 Returns the last ADC1, ADC2 and ADC3 regular conversions results data in the selected multi mode.
__weak void HAL_ADCEx_InjectedConvCpltCallback (ADC_HandleTypeDef *hadc)
 Injected conversion complete callback in non blocking mode.
HAL_StatusTypeDef HAL_ADCEx_InjectedConfigChannel (ADC_HandleTypeDef *hadc, ADC_InjectionConfTypeDef *sConfigInjected)
 Configures for the selected ADC injected channel its corresponding rank in the sequencer and its sample time.
HAL_StatusTypeDef HAL_ADCEx_MultiModeConfigChannel (ADC_HandleTypeDef *hadc, ADC_MultiModeTypeDef *multimode)
 Configures the ADC multi-mode.

Detailed Description

Extended features functions.

 ===============================================================================
                 ##### Extended features functions #####
 ===============================================================================  
    [..]  This section provides functions allowing to:
      (+) Start conversion of injected channel.
      (+) Stop conversion of injected channel.
      (+) Start multimode and enable DMA transfer.
      (+) Stop multimode and disable DMA transfer.
      (+) Get result of injected channel conversion.
      (+) Get result of multimode conversion.
      (+) Configure injected channels.
      (+) Configure multimode.
               

Function Documentation

HAL_StatusTypeDef HAL_ADCEx_InjectedConfigChannel ( ADC_HandleTypeDef hadc,
ADC_InjectionConfTypeDef sConfigInjected 
)

Injected conversion complete callback in non blocking mode.

Parameters:
hadcpointer to a ADC_HandleTypeDef structure that contains the configuration information for the specified ADC.
Return values:
None

Definition at line 798 of file stm32f4xx_hal_adc_ex.c.

Referenced by HAL_ADC_IRQHandler().

uint32_t HAL_ADCEx_InjectedGetValue ( ADC_HandleTypeDef hadc,
uint32_t  InjectedRank 
)

Gets the converted value from data register of injected channel.

Parameters:
hadcpointer to a ADC_HandleTypeDef structure that contains the configuration information for the specified ADC.
InjectedRankthe ADC injected rank. This parameter can be one of the following values:
  • ADC_INJECTED_RANK_1: Injected Channel1 selected
  • ADC_INJECTED_RANK_2: Injected Channel2 selected
  • ADC_INJECTED_RANK_3: Injected Channel3 selected
  • ADC_INJECTED_RANK_4: Injected Channel4 selected
Return values:
None

Definition at line 556 of file stm32f4xx_hal_adc_ex.c.

References __HAL_ADC_CLEAR_FLAG, ADC_FLAG_JEOC, ADC_INJECTED_RANK_1, ADC_INJECTED_RANK_2, ADC_INJECTED_RANK_3, ADC_INJECTED_RANK_4, assert_param, ADC_HandleTypeDef::Instance, and IS_ADC_INJECTED_RANK.

HAL_StatusTypeDef HAL_ADCEx_InjectedPollForConversion ( ADC_HandleTypeDef hadc,
uint32_t  Timeout 
)

Poll for injected conversion complete.

Parameters:
hadcpointer to a ADC_HandleTypeDef structure that contains the configuration information for the specified ADC.
TimeoutTimeout value in millisecond.
Return values:
HALstatus

Definition at line 427 of file stm32f4xx_hal_adc_ex.c.

References __HAL_ADC_CLEAR_FLAG, __HAL_ADC_GET_FLAG, ADC_FLAG_JEOC, ADC_FLAG_JSTRT, ADC_IS_SOFTWARE_START_INJECTED, ADC_IS_SOFTWARE_START_REGULAR, ADC_InitTypeDef::ContinuousConvMode, HAL_ADC_STATE_INJ_BUSY, HAL_ADC_STATE_INJ_EOC, HAL_ADC_STATE_READY, HAL_ADC_STATE_REG_BUSY, HAL_ADC_STATE_TIMEOUT, HAL_GetTick(), ADC_HandleTypeDef::Init, ADC_HandleTypeDef::Instance, and ADC_HandleTypeDef::State.

HAL_StatusTypeDef HAL_ADCEx_InjectedStart ( ADC_HandleTypeDef hadc)

Enables the selected ADC software start conversion of the injected channels.

Parameters:
hadcpointer to a ADC_HandleTypeDef structure that contains the configuration information for the specified ADC.
Return values:
HALstatus

Definition at line 175 of file stm32f4xx_hal_adc_ex.c.

References __HAL_ADC_CLEAR_FLAG, __HAL_ADC_ENABLE, ADC_CLEAR_ERRORCODE, ADC_COMMON_REGISTER, ADC_FLAG_JEOC, ADC_STAB_DELAY_US, ADC_STATE_CLR_SET, HAL_ADC_STATE_INJ_BUSY, HAL_ADC_STATE_INJ_EOC, HAL_ADC_STATE_READY, HAL_ADC_STATE_REG_BUSY, ADC_HandleTypeDef::Instance, and ADC_HandleTypeDef::State.

HAL_StatusTypeDef HAL_ADCEx_InjectedStart_IT ( ADC_HandleTypeDef hadc)

Enables the interrupt and starts ADC conversion of injected channels.

Parameters:
hadcpointer to a ADC_HandleTypeDef structure that contains the configuration information for the specified ADC.
Return values:
HALstatus.

Definition at line 270 of file stm32f4xx_hal_adc_ex.c.

References __HAL_ADC_CLEAR_FLAG, __HAL_ADC_ENABLE, __HAL_ADC_ENABLE_IT, ADC_CLEAR_ERRORCODE, ADC_COMMON_REGISTER, ADC_FLAG_JEOC, ADC_IT_JEOC, ADC_STAB_DELAY_US, ADC_STATE_CLR_SET, HAL_ADC_STATE_INJ_BUSY, HAL_ADC_STATE_INJ_EOC, HAL_ADC_STATE_READY, HAL_ADC_STATE_REG_BUSY, ADC_HandleTypeDef::Instance, and ADC_HandleTypeDef::State.

HAL_StatusTypeDef HAL_ADCEx_InjectedStop ( ADC_HandleTypeDef hadc)

Stop conversion of injected channels.

Disable ADC peripheral if no regular conversion is on going.

Note:
If ADC must be disabled and if conversion is on going on regular group, function HAL_ADC_Stop must be used to stop both injected and regular groups, and disable the ADC.
If injected group mode auto-injection is enabled, function HAL_ADC_Stop must be used.
In case of auto-injection mode, HAL_ADC_Stop must be used.
Parameters:
hadcADC handle
Return values:
None

Definition at line 373 of file stm32f4xx_hal_adc_ex.c.

References __HAL_ADC_DISABLE, ADC_STATE_CLR_SET, assert_param, HAL_ADC_STATE_ERROR_CONFIG, HAL_ADC_STATE_INJ_BUSY, HAL_ADC_STATE_READY, HAL_ADC_STATE_REG_BUSY, ADC_HandleTypeDef::Instance, and ADC_HandleTypeDef::State.

HAL_StatusTypeDef HAL_ADCEx_InjectedStop_IT ( ADC_HandleTypeDef hadc)

Stop conversion of injected channels, disable interruption of end-of-conversion.

Disable ADC peripheral if no regular conversion is on going.

Note:
If ADC must be disabled and if conversion is on going on regular group, function HAL_ADC_Stop must be used to stop both injected and regular groups, and disable the ADC.
If injected group mode auto-injection is enabled, function HAL_ADC_Stop must be used.
Parameters:
hadcADC handle
Return values:
None

Definition at line 494 of file stm32f4xx_hal_adc_ex.c.

References __HAL_ADC_DISABLE, __HAL_ADC_DISABLE_IT, ADC_IT_JEOC, ADC_STATE_CLR_SET, assert_param, HAL_ADC_STATE_ERROR_CONFIG, HAL_ADC_STATE_INJ_BUSY, HAL_ADC_STATE_READY, HAL_ADC_STATE_REG_BUSY, ADC_HandleTypeDef::Instance, and ADC_HandleTypeDef::State.

HAL_StatusTypeDef HAL_ADCEx_MultiModeConfigChannel ( ADC_HandleTypeDef hadc,
ADC_MultiModeTypeDef multimode 
)

Configures the ADC multi-mode.

Parameters:
hadcpointer to a ADC_HandleTypeDef structure that contains the configuration information for the specified ADC.
multimodepointer to an ADC_MultiModeTypeDef structure that contains the configuration information for multimode.
Return values:
HALstatus

Definition at line 979 of file stm32f4xx_hal_adc_ex.c.

References ADC_COMMON_REGISTER, assert_param, ADC_MultiModeTypeDef::DMAAccessMode, IS_ADC_DMA_ACCESS_MODE, IS_ADC_MODE, IS_ADC_SAMPLING_DELAY, ADC_MultiModeTypeDef::Mode, and ADC_MultiModeTypeDef::TwoSamplingDelay.

Returns the last ADC1, ADC2 and ADC3 regular conversions results data in the selected multi mode.

Parameters:
hadcpointer to a ADC_HandleTypeDef structure that contains the configuration information for the specified ADC.
Return values:
Theconverted data value.

Definition at line 779 of file stm32f4xx_hal_adc_ex.c.

References ADC_COMMON_REGISTER.

HAL_StatusTypeDef HAL_ADCEx_MultiModeStart_DMA ( ADC_HandleTypeDef hadc,
uint32_t *  pData,
uint32_t  Length 
)

Enables ADC DMA request after last transfer (Multi-ADC mode) and enables ADC peripheral.

Note:
Caution: This function must be used only with the ADC master.
Parameters:
hadcpointer to a ADC_HandleTypeDef structure that contains the configuration information for the specified ADC.
pDataPointer to buffer in which transferred from ADC peripheral to memory will be stored.
LengthThe length of data to be transferred from ADC peripheral to memory.
Return values:
HALstatus

Definition at line 607 of file stm32f4xx_hal_adc_ex.c.

References __HAL_ADC_CLEAR_FLAG, __HAL_ADC_ENABLE, __HAL_ADC_ENABLE_IT, ADC_CLEAR_ERRORCODE, ADC_COMMON_REGISTER, ADC_FLAG_EOC, ADC_IT_OVR, ADC_MultiModeDMAConvCplt(), ADC_MultiModeDMAError(), ADC_MultiModeDMAHalfConvCplt(), ADC_STAB_DELAY_US, ADC_STATE_CLR_SET, assert_param, ADC_InitTypeDef::ContinuousConvMode, ADC_HandleTypeDef::DMA_Handle, ADC_InitTypeDef::DMAContinuousRequests, ADC_HandleTypeDef::ErrorCode, ADC_InitTypeDef::ExternalTrigConvEdge, HAL_ADC_ERROR_DMA, HAL_ADC_ERROR_OVR, HAL_ADC_STATE_INJ_BUSY, HAL_ADC_STATE_INJ_EOC, HAL_ADC_STATE_READY, HAL_ADC_STATE_REG_BUSY, HAL_ADC_STATE_REG_EOC, HAL_ADC_STATE_REG_OVR, HAL_DMA_Start_IT(), ADC_HandleTypeDef::Init, ADC_HandleTypeDef::Instance, IS_ADC_EXT_TRIG_EDGE, ADC_HandleTypeDef::State, __DMA_HandleTypeDef::XferCpltCallback, __DMA_HandleTypeDef::XferErrorCallback, and __DMA_HandleTypeDef::XferHalfCpltCallback.

HAL_StatusTypeDef HAL_ADCEx_MultiModeStop_DMA ( ADC_HandleTypeDef hadc)

Disables ADC DMA (multi-ADC mode) and disables ADC peripheral.

Parameters:
hadcpointer to a ADC_HandleTypeDef structure that contains the configuration information for the specified ADC.
Return values:
HALstatus

Definition at line 726 of file stm32f4xx_hal_adc_ex.c.

References __HAL_ADC_DISABLE, __HAL_ADC_DISABLE_IT, ADC_COMMON_REGISTER, ADC_IT_OVR, ADC_STATE_CLR_SET, assert_param, ADC_HandleTypeDef::DMA_Handle, HAL_ADC_STATE_INJ_BUSY, HAL_ADC_STATE_READY, HAL_ADC_STATE_REG_BUSY, HAL_DMA_Abort(), ADC_HandleTypeDef::Instance, and ADC_HandleTypeDef::State.