L4 HAL Drivers
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: + Calibration functions ++ Calibration start-up ++ Calibration value reading or setting + Operation functions ++ Start, stop, get result of conversions of injected groups, using 3 possible modes: polling or interruption. ++ Multimode feature when available + Control functions ++ Configure channels on injected group + State functions ++ Injected group queues management. More...
Go to the source code of this file.
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 from automatic conversion result. | |
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, disable ADC peripheral if no regular conversion is on going. | |
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 groups, disable ADC peripheral if no injected conversion is on-going. | |
HAL_StatusTypeDef | HAL_ADCEx_RegularStop_IT (ADC_HandleTypeDef *hadc) |
Stop ADC conversion of regular groups when interruptions are enabled, disable ADC peripheral if no injected conversion is on-going. | |
HAL_StatusTypeDef | HAL_ADCEx_RegularStop_DMA (ADC_HandleTypeDef *hadc) |
Stop ADC conversion of regular groups and disable ADC DMA transfer, disable ADC peripheral if no injected conversion is on-going. | |
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 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. | |
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: + Calibration functions ++ Calibration start-up ++ Calibration value reading or setting + Operation functions ++ Start, stop, get result of conversions of injected groups, using 3 possible modes: polling or interruption. ++ Multimode feature when available + Control functions ++ Configure channels on injected group + State functions ++ Injected group queues management.
- Version:
- V1.1.0
- Date:
- 16-September-2015
============================================================================== ##### ADC specific features ##### ============================================================================== [..] (#) Interrupt generation at the end of injected conversion and in case of injected queues overflow. (#) External trigger (timer or EXTI) with configurable polarity for injected groups. (#) Multimode Dual mode when multimode feature is available. (#) Configurable DMA data storage in Multimode Dual mode. (#) Configurable delay between conversions in Dual interleaved mode. (#) ADC calibration. (#) ADC channels selectable single/differential input. (#) ADC Injected sequencer&channels configuration context queue. (#) ADC offset on injected groups. (#) ADC oversampling. ##### How to use this driver ##### ============================================================================== [..] (#) Configure the ADC parameters (conversion resolution, data alignment, continuous mode, ...) using the HAL_ADC_Init() function. (#) Activate the ADC peripheral using one of the start functions: HAL_ADCEx_InjectedStart(), HAL_ADCEx_InjectedStart_IT() for injected conversions or HAL_ADC_MultiModeStart_DMA() for multimode conversions when multimode feature is available. *** Channels to injected group configuration *** ============================================= [..] (+) To configure the ADC Injected channels group features, use HAL_ADCEx_InjectedConfigChannel() functions. (+) To read the ADC converted values, use the HAL_ADCEx_InjectedGetValue() function. *** Multimode ADCs configuration (when multimode feature is available) *** ======================================================================== [..] (+) Multimode feature is available and applicable to Master and Slave ADCs. (+) Refer to "Channels to regular group configuration" description to configure the Master and Slave regular groups. (+) Select the Multi mode ADC features (dual mode simultaneous, interleaved, ...) and configure the DMA mode using HAL_ADCEx_MultiModeConfigChannel() functions. (+) Read the ADCs converted values using the HAL_ADCEx_MultiModeGetValue() function.
- Attention:
© COPYRIGHT(c) 2015 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.
Generated on Tue Jul 12 2022 10:58:11 by 1.7.2