STM32F4xx HAL Documentation
Hardware Abstraction Layer for STM32F4 familiy
Loading...
Searching...
No Matches
Extended features functions

Extended features functions. More...

Collaboration diagram for Extended features functions:

Functions

HAL_StatusTypeDef HAL_ADCEx_InjectedStart (ADC_HandleTypeDef *hadc)
 Enables the selected ADC software start conversion of the injected channels.
 
HAL_StatusTypeDef HAL_ADCEx_InjectedStop (ADC_HandleTypeDef *hadc)
 Stop conversion of injected channels. Disable ADC peripheral if no regular conversion is on going.
 
HAL_StatusTypeDef HAL_ADCEx_InjectedPollForConversion (ADC_HandleTypeDef *hadc, uint32_t Timeout)
 Poll for injected conversion complete.
 
HAL_StatusTypeDef HAL_ADCEx_InjectedStart_IT (ADC_HandleTypeDef *hadc)
 Enables the interrupt and starts ADC conversion of injected channels.
 
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.
 
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.
 
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_ADCEx_InjectedStart()

HAL_StatusTypeDef HAL_ADCEx_InjectedStart ( ADC_HandleTypeDef * hadc)

#include <stm32f4xx_hal_adc_ex.h>

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 146 of file stm32f4xx_hal_adc_ex.c.

References __HAL_ADC_CLEAR_FLAG, __HAL_ADC_ENABLE, __HAL_LOCK, __HAL_UNLOCK, ADC_CLEAR_ERRORCODE, ADC_COMMON_REGISTER, ADC_FLAG_JEOC, ADC_STAB_DELAY_US, ADC_STATE_CLR_SET, ADC_HandleTypeDef::ErrorCode, HAL_ADC_ERROR_INTERNAL, HAL_ADC_STATE_ERROR_INTERNAL, HAL_ADC_STATE_INJ_BUSY, HAL_ADC_STATE_INJ_EOC, HAL_ADC_STATE_READY, HAL_ADC_STATE_REG_BUSY, HAL_IS_BIT_CLR, HAL_IS_BIT_SET, HAL_OK, ADC_HandleTypeDef::Instance, and ADC_HandleTypeDef::State.

◆ HAL_ADCEx_InjectedStop()

HAL_StatusTypeDef HAL_ADCEx_InjectedStop ( ADC_HandleTypeDef * hadc)

#include <stm32f4xx_hal_adc_ex.h>

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 360 of file stm32f4xx_hal_adc_ex.c.

References __HAL_ADC_DISABLE, __HAL_LOCK, __HAL_UNLOCK, 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, HAL_ERROR, HAL_IS_BIT_CLR, HAL_OK, ADC_HandleTypeDef::Instance, and ADC_HandleTypeDef::State.

◆ HAL_ADCEx_InjectedPollForConversion()

HAL_StatusTypeDef HAL_ADCEx_InjectedPollForConversion ( ADC_HandleTypeDef * hadc,
uint32_t Timeout )

◆ HAL_ADCEx_InjectedStart_IT()

◆ HAL_ADCEx_InjectedStop_IT()

HAL_StatusTypeDef HAL_ADCEx_InjectedStop_IT ( ADC_HandleTypeDef * hadc)

#include <stm32f4xx_hal_adc_ex.h>

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 485 of file stm32f4xx_hal_adc_ex.c.

References __HAL_ADC_DISABLE, __HAL_ADC_DISABLE_IT, __HAL_LOCK, __HAL_UNLOCK, 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, HAL_ERROR, HAL_IS_BIT_CLR, HAL_OK, ADC_HandleTypeDef::Instance, and ADC_HandleTypeDef::State.

◆ HAL_ADCEx_InjectedGetValue()

uint32_t HAL_ADCEx_InjectedGetValue ( ADC_HandleTypeDef * hadc,
uint32_t InjectedRank )

#include <stm32f4xx_hal_adc_ex.h>

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 547 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_ADCEx_MultiModeStart_DMA()

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

#include <stm32f4xx_hal_adc_ex.h>

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 598 of file stm32f4xx_hal_adc_ex.c.

References __HAL_ADC_CLEAR_FLAG, __HAL_ADC_ENABLE, __HAL_ADC_ENABLE_IT, __HAL_LOCK, __HAL_UNLOCK, 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_INTERNAL, HAL_ADC_ERROR_OVR, HAL_ADC_STATE_ERROR_INTERNAL, 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(), HAL_IS_BIT_SET, HAL_OK, 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_ADCEx_MultiModeStop_DMA()

HAL_StatusTypeDef HAL_ADCEx_MultiModeStop_DMA ( ADC_HandleTypeDef * hadc)

#include <stm32f4xx_hal_adc_ex.h>

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 725 of file stm32f4xx_hal_adc_ex.c.

References __HAL_ADC_DISABLE, __HAL_ADC_DISABLE_IT, __HAL_LOCK, __HAL_UNLOCK, 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(), HAL_IS_BIT_CLR, HAL_OK, ADC_HandleTypeDef::Instance, and ADC_HandleTypeDef::State.

◆ HAL_ADCEx_MultiModeGetValue()

uint32_t HAL_ADCEx_MultiModeGetValue ( ADC_HandleTypeDef * hadc)

#include <stm32f4xx_hal_adc_ex.h>

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 778 of file stm32f4xx_hal_adc_ex.c.

References ADC_COMMON_REGISTER, and UNUSED.

◆ HAL_ADCEx_InjectedConvCpltCallback()

__weak void HAL_ADCEx_InjectedConvCpltCallback ( ADC_HandleTypeDef * hadc)

#include <stm32f4xx_hal_adc_ex.h>

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 800 of file stm32f4xx_hal_adc_ex.c.

References UNUSED.

Referenced by HAL_ADC_Init(), and HAL_ADC_IRQHandler().

◆ HAL_ADCEx_InjectedConfigChannel()

◆ HAL_ADCEx_MultiModeConfigChannel()

HAL_StatusTypeDef HAL_ADCEx_MultiModeConfigChannel ( ADC_HandleTypeDef * hadc,
ADC_MultiModeTypeDef * multimode )

#include <stm32f4xx_hal_adc_ex.h>

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 981 of file stm32f4xx_hal_adc_ex.c.

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