STM32L486xx HAL User Manual
Defines | Functions
stm32l4xx_hal_adc_ex.c File Reference

This file provides firmware functions to manage the following functionalities of the Analog to Digital Convertor (ADC) peripheral: + Operation functions ++ Start, stop, get result of conversions of ADC group injected, using 2 possible modes: polling, interruption. ++ Calibration +++ ADC automatic self-calibration +++ Calibration factors get or set ++ Multimode feature when available + Control functions ++ Channels configuration on ADC group injected + State functions ++ ADC group injected contexts queue management Other functions (generic functions) are available in file "stm32l4xx_hal_adc.c". More...

#include "stm32l4xx_hal.h"

Go to the source code of this file.

Defines

#define ADC_JSQR_FIELDS
#define ADC_CALIBRATION_TIMEOUT   (296960U)

Functions

HAL_StatusTypeDef HAL_ADCEx_Calibration_Start (ADC_HandleTypeDef *hadc, uint32_t SingleDiff)
 Perform an ADC automatic self-calibration Calibration prerequisite: ADC must be disabled (execute this function before HAL_ADC_Start() or after HAL_ADC_Stop() ).
uint32_t HAL_ADCEx_Calibration_GetValue (ADC_HandleTypeDef *hadc, uint32_t SingleDiff)
 Get the calibration factor.
HAL_StatusTypeDef HAL_ADCEx_Calibration_SetValue (ADC_HandleTypeDef *hadc, uint32_t SingleDiff, uint32_t CalibrationFactor)
 Set the calibration factor to overwrite automatic conversion result.
HAL_StatusTypeDef HAL_ADCEx_InjectedStart (ADC_HandleTypeDef *hadc)
 Enable ADC, start 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)
 Enable ADC, start 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)
 Enable ADC, start MultiMode conversion and transfer regular results through DMA.
HAL_StatusTypeDef HAL_ADCEx_MultiModeStop_DMA (ADC_HandleTypeDef *hadc)
 Stop multimode ADC conversion, disable ADC DMA transfer, disable ADC peripheral.
uint32_t HAL_ADCEx_MultiModeGetValue (ADC_HandleTypeDef *hadc)
 Return the last ADC Master and Slave regular conversions results when in multimode configuration.
uint32_t HAL_ADCEx_InjectedGetValue (ADC_HandleTypeDef *hadc, uint32_t InjectedRank)
 Get ADC injected group conversion result.
__weak void HAL_ADCEx_InjectedConvCpltCallback (ADC_HandleTypeDef *hadc)
 Injected conversion complete callback in non-blocking mode.
__weak void HAL_ADCEx_InjectedQueueOverflowCallback (ADC_HandleTypeDef *hadc)
 Injected context queue overflow callback.
__weak void HAL_ADCEx_LevelOutOfWindow2Callback (ADC_HandleTypeDef *hadc)
 Analog watchdog 2 callback in non-blocking mode.
__weak void HAL_ADCEx_LevelOutOfWindow3Callback (ADC_HandleTypeDef *hadc)
 Analog watchdog 3 callback in non-blocking mode.
__weak void HAL_ADCEx_EndOfSamplingCallback (ADC_HandleTypeDef *hadc)
 End Of Sampling callback in non-blocking mode.
HAL_StatusTypeDef HAL_ADCEx_RegularStop (ADC_HandleTypeDef *hadc)
 Stop ADC conversion of regular group (and injected channels in case of auto_injection mode), disable ADC peripheral if no conversion is on going on injected group.
HAL_StatusTypeDef HAL_ADCEx_RegularStop_IT (ADC_HandleTypeDef *hadc)
 Stop ADC conversion of ADC groups regular and injected, disable interrution of end-of-conversion, disable ADC peripheral if no conversion is on going on injected group.
HAL_StatusTypeDef HAL_ADCEx_RegularStop_DMA (ADC_HandleTypeDef *hadc)
 Stop ADC conversion of regular group (and injected group in case of auto_injection mode), disable ADC DMA transfer, disable ADC peripheral if no conversion is on going on injected group.
HAL_StatusTypeDef HAL_ADCEx_RegularMultiModeStop_DMA (ADC_HandleTypeDef *hadc)
 Stop DMA-based multimode ADC conversion, disable ADC DMA transfer, disable ADC peripheral if no injected conversion is on-going.
HAL_StatusTypeDef HAL_ADCEx_InjectedConfigChannel (ADC_HandleTypeDef *hadc, ADC_InjectionConfTypeDef *sConfigInjected)
 Configure a channel to be assigned to ADC group injected.
HAL_StatusTypeDef HAL_ADCEx_MultiModeConfigChannel (ADC_HandleTypeDef *hadc, ADC_MultiModeTypeDef *multimode)
 Enable ADC multimode and configure multimode parameters.
HAL_StatusTypeDef HAL_ADCEx_EnableInjectedQueue (ADC_HandleTypeDef *hadc)
 Enable Injected Queue.
HAL_StatusTypeDef HAL_ADCEx_DisableInjectedQueue (ADC_HandleTypeDef *hadc)
 Disable Injected Queue.
HAL_StatusTypeDef HAL_ADCEx_DisableVoltageRegulator (ADC_HandleTypeDef *hadc)
 Disable ADC voltage regulator.
HAL_StatusTypeDef HAL_ADCEx_EnterADCDeepPowerDownMode (ADC_HandleTypeDef *hadc)
 Enter ADC deep-power-down mode.

Detailed Description

This file provides firmware functions to manage the following functionalities of the Analog to Digital Convertor (ADC) peripheral: + Operation functions ++ Start, stop, get result of conversions of ADC group injected, using 2 possible modes: polling, interruption. ++ Calibration +++ ADC automatic self-calibration +++ Calibration factors get or set ++ Multimode feature when available + Control functions ++ Channels configuration on ADC group injected + State functions ++ ADC group injected contexts queue management Other functions (generic functions) are available in file "stm32l4xx_hal_adc.c".

Author:
MCD Application Team
  [..] 
  (@) Sections "ADC peripheral features" and "How to use this driver" are
      available in file of generic functions "stm32l4xx_hal_adc.c".
  [..]
  
Attention:

© COPYRIGHT(c) 2017 STMicroelectronics

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of STMicroelectronics nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Definition in file stm32l4xx_hal_adc_ex.c.