STM32F103xB HAL User Manual
Data Structures | Defines | Functions
stm32f1xx_hal_adc_ex.h File Reference

Header file of ADC HAL extension module. More...

#include "stm32f1xx_hal_def.h"

Go to the source code of this file.

Data Structures

struct  ADC_InjectionConfTypeDef
 ADC Configuration injected Channel structure definition. More...
struct  ADC_MultiModeTypeDef
 Structure definition of ADC multimode. More...

Defines

#define ADC_INJECTED_RANK_1   0x00000001U
#define ADC_INJECTED_RANK_2   0x00000002U
#define ADC_INJECTED_RANK_3   0x00000003U
#define ADC_INJECTED_RANK_4   0x00000004U
#define ADC_EXTERNALTRIGINJECCONV_EDGE_NONE   0x00000000U
#define ADC_EXTERNALTRIGINJECCONV_EDGE_RISING   ((uint32_t)ADC_CR2_JEXTTRIG)
#define ADC_EXTERNALTRIGCONV_T1_CC1   ADC1_2_EXTERNALTRIG_T1_CC1
#define ADC_EXTERNALTRIGCONV_T1_CC2   ADC1_2_EXTERNALTRIG_T1_CC2
#define ADC_EXTERNALTRIGCONV_T2_CC2   ADC1_2_EXTERNALTRIG_T2_CC2
#define ADC_EXTERNALTRIGCONV_T3_TRGO   ADC1_2_EXTERNALTRIG_T3_TRGO
#define ADC_EXTERNALTRIGCONV_T4_CC4   ADC1_2_EXTERNALTRIG_T4_CC4
#define ADC_EXTERNALTRIGCONV_EXT_IT11   ADC1_2_EXTERNALTRIG_EXT_IT11
#define ADC_EXTERNALTRIGCONV_T1_CC3   ADC1_2_3_EXTERNALTRIG_T1_CC3
#define ADC_SOFTWARE_START   ADC1_2_3_SWSTART
#define ADC_EXTERNALTRIGINJECCONV_T2_TRGO   ADC1_2_EXTERNALTRIGINJEC_T2_TRGO
#define ADC_EXTERNALTRIGINJECCONV_T2_CC1   ADC1_2_EXTERNALTRIGINJEC_T2_CC1
#define ADC_EXTERNALTRIGINJECCONV_T3_CC4   ADC1_2_EXTERNALTRIGINJEC_T3_CC4
#define ADC_EXTERNALTRIGINJECCONV_T4_TRGO   ADC1_2_EXTERNALTRIGINJEC_T4_TRGO
#define ADC_EXTERNALTRIGINJECCONV_EXT_IT15   ADC1_2_EXTERNALTRIGINJEC_EXT_IT15
#define ADC_EXTERNALTRIGINJECCONV_T1_CC4   ADC1_2_3_EXTERNALTRIGINJEC_T1_CC4
#define ADC_EXTERNALTRIGINJECCONV_T1_TRGO   ADC1_2_3_EXTERNALTRIGINJEC_T1_TRGO
#define ADC_INJECTED_SOFTWARE_START   ADC1_2_3_JSWSTART
#define ADC_MODE_INDEPENDENT   0x00000000U
#define ADC_DUALMODE_REGSIMULT_INJECSIMULT   ((uint32_t)( ADC_CR1_DUALMOD_0))
#define ADC_DUALMODE_REGSIMULT_ALTERTRIG   ((uint32_t)( ADC_CR1_DUALMOD_1 ))
#define ADC_DUALMODE_INJECSIMULT_INTERLFAST   ((uint32_t)( ADC_CR1_DUALMOD_1 | ADC_CR1_DUALMOD_0))
#define ADC_DUALMODE_INJECSIMULT_INTERLSLOW   ((uint32_t)( ADC_CR1_DUALMOD_2 ))
#define ADC_DUALMODE_INJECSIMULT   ((uint32_t)( ADC_CR1_DUALMOD_2 | ADC_CR1_DUALMOD_0))
#define ADC_DUALMODE_REGSIMULT   ((uint32_t)( ADC_CR1_DUALMOD_2 | ADC_CR1_DUALMOD_1 ))
#define ADC_DUALMODE_INTERLFAST   ((uint32_t)( ADC_CR1_DUALMOD_2 | ADC_CR1_DUALMOD_1 | ADC_CR1_DUALMOD_0))
#define ADC_DUALMODE_INTERLSLOW   ((uint32_t)(ADC_CR1_DUALMOD_3 ))
#define ADC_DUALMODE_ALTERTRIG   ((uint32_t)(ADC_CR1_DUALMOD_3 | ADC_CR1_DUALMOD_0))
#define ADC1_2_EXTERNALTRIG_T1_CC1   0x00000000U
#define ADC1_2_EXTERNALTRIG_T1_CC2   ((uint32_t)( ADC_CR2_EXTSEL_0))
#define ADC1_2_EXTERNALTRIG_T2_CC2   ((uint32_t)( ADC_CR2_EXTSEL_1 | ADC_CR2_EXTSEL_0))
#define ADC1_2_EXTERNALTRIG_T3_TRGO   ((uint32_t)(ADC_CR2_EXTSEL_2 ))
#define ADC1_2_EXTERNALTRIG_T4_CC4   ((uint32_t)(ADC_CR2_EXTSEL_2 | ADC_CR2_EXTSEL_0))
#define ADC1_2_EXTERNALTRIG_EXT_IT11   ((uint32_t)(ADC_CR2_EXTSEL_2 | ADC_CR2_EXTSEL_1 ))
#define ADC1_2_3_EXTERNALTRIG_T1_CC3   ((uint32_t)( ADC_CR2_EXTSEL_1 ))
#define ADC1_2_3_SWSTART   ((uint32_t)(ADC_CR2_EXTSEL_2 | ADC_CR2_EXTSEL_1 | ADC_CR2_EXTSEL_0))
#define ADC1_2_EXTERNALTRIGINJEC_T2_TRGO   ((uint32_t)( ADC_CR2_JEXTSEL_1 ))
#define ADC1_2_EXTERNALTRIGINJEC_T2_CC1   ((uint32_t)( ADC_CR2_JEXTSEL_1 | ADC_CR2_JEXTSEL_0))
#define ADC1_2_EXTERNALTRIGINJEC_T3_CC4   ((uint32_t)(ADC_CR2_JEXTSEL_2 ))
#define ADC1_2_EXTERNALTRIGINJEC_T4_TRGO   ((uint32_t)(ADC_CR2_JEXTSEL_2 | ADC_CR2_JEXTSEL_0))
#define ADC1_2_EXTERNALTRIGINJEC_EXT_IT15   ((uint32_t)(ADC_CR2_JEXTSEL_2 | ADC_CR2_JEXTSEL_1 ))
#define ADC1_2_3_EXTERNALTRIGINJEC_T1_TRGO   0x00000000U
#define ADC1_2_3_EXTERNALTRIGINJEC_T1_CC4   ((uint32_t)( ADC_CR2_JEXTSEL_0))
#define ADC1_2_3_JSWSTART   ((uint32_t)(ADC_CR2_JEXTSEL_2 | ADC_CR2_JEXTSEL_1 | ADC_CR2_JEXTSEL_0))
#define ADC_CFGR_EXTSEL(__HANDLE__, __EXT_TRIG_CONV__)   (__EXT_TRIG_CONV__)
 For devices with 3 ADCs: Defines the external trigger source for regular group according to ADC into common group ADC1&ADC2 or ADC3 (some triggers with same source have different value to be programmed into ADC EXTSEL bits of CR2 register).
#define ADC_CFGR_JEXTSEL(__HANDLE__, __EXT_TRIG_INJECTCONV__)   (__EXT_TRIG_INJECTCONV__)
 For devices with 3 ADCs: Defines the external trigger source for injected group according to ADC into common group ADC1&ADC2 or ADC3 (some triggers with same source have different value to be programmed into ADC JEXTSEL bits of CR2 register).
#define ADC_MULTIMODE_IS_ENABLE(__HANDLE__)
 Verification if multimode is enabled for the selected ADC (multimode ADC master or ADC slave) (applicable for devices with several ADCs)
#define ADC_NONMULTIMODE_OR_MULTIMODEMASTER(__HANDLE__)
 Verification of condition for ADC start conversion: ADC must be in non-multimode, or multimode with handle of ADC master (applicable for devices with several ADCs)
#define ADC_MULTIMODE_AUTO_INJECTED(__HANDLE__)
 Check ADC multimode setting: In case of multimode, check whether ADC master of the selected ADC has feature auto-injection enabled (applicable for devices with several ADCs)
#define ADC_COMMON_ADC_OTHER(__HANDLE__, __HANDLE_OTHER_ADC__)   ((__HANDLE_OTHER_ADC__)->Instance = ADC2)
 Set handle of the other ADC sharing the common multimode settings.
#define ADC_MULTI_SLAVE(__HANDLE_MASTER__, __HANDLE_SLAVE__)   ((__HANDLE_SLAVE__)->Instance = ADC2)
 Set handle of the ADC slave associated to the ADC master On STM32F1 devices, ADC slave is always ADC2 (this can be different on other STM32 devices)
#define IS_ADC_INJECTED_RANK(CHANNEL)
#define IS_ADC_EXTTRIGINJEC_EDGE(EDGE)
#define IS_ADC_INJECTED_NB_CONV(LENGTH)   (((LENGTH) >= 1U) && ((LENGTH) <= 4U))
#define IS_ADC_EXTTRIG(REGTRIG)
#define IS_ADC_EXTTRIGINJEC(REGTRIG)
#define IS_ADC_MODE(MODE)

Functions

HAL_StatusTypeDef HAL_ADCEx_Calibration_Start (ADC_HandleTypeDef *hadc)
 Perform an ADC automatic self-calibration Calibration prerequisite: ADC must be disabled (execute this function before HAL_ADC_Start() or after HAL_ADC_Stop() ).
HAL_StatusTypeDef HAL_ADCEx_InjectedStart (ADC_HandleTypeDef *hadc)
 Enables ADC, starts conversion of injected group.
HAL_StatusTypeDef HAL_ADCEx_InjectedStop (ADC_HandleTypeDef *hadc)
 Stop conversion of injected channels.
HAL_StatusTypeDef HAL_ADCEx_InjectedPollForConversion (ADC_HandleTypeDef *hadc, uint32_t Timeout)
 Wait for injected group conversion to be completed.
HAL_StatusTypeDef HAL_ADCEx_InjectedStart_IT (ADC_HandleTypeDef *hadc)
 Enables ADC, starts conversion of injected group with interruption.
HAL_StatusTypeDef HAL_ADCEx_InjectedStop_IT (ADC_HandleTypeDef *hadc)
 Stop conversion of injected channels, disable interruption of end-of-conversion.
HAL_StatusTypeDef HAL_ADCEx_MultiModeStart_DMA (ADC_HandleTypeDef *hadc, uint32_t *pData, uint32_t Length)
 Enables ADC, starts conversion of regular group and transfers result through DMA.
HAL_StatusTypeDef HAL_ADCEx_MultiModeStop_DMA (ADC_HandleTypeDef *hadc)
 Stop ADC conversion of regular group (and injected channels in case of auto_injection mode), disable ADC DMA transfer, disable ADC peripheral.
uint32_t HAL_ADCEx_InjectedGetValue (ADC_HandleTypeDef *hadc, uint32_t InjectedRank)
 Get ADC injected group conversion result.
uint32_t HAL_ADCEx_MultiModeGetValue (ADC_HandleTypeDef *hadc)
 Returns the last ADC Master&Slave 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 the ADC injected group and the selected channel to be linked to the injected group.
HAL_StatusTypeDef HAL_ADCEx_MultiModeConfigChannel (ADC_HandleTypeDef *hadc, ADC_MultiModeTypeDef *multimode)
 Enable ADC multimode and configure multimode parameters.

Detailed Description

Header file of ADC HAL extension module.

Author:
MCD Application Team
Attention:

© Copyright (c) 2016 STMicroelectronics. All rights reserved.

This software component is licensed by ST under BSD 3-Clause license, the "License"; You may not use this file except in compliance with the License. You may obtain a copy of the License at: opensource.org/licenses/BSD-3-Clause

Definition in file stm32f1xx_hal_adc_ex.h.