STM32L486xx HAL User Manual
|
OPAMP HAL module driver. This file provides firmware functions to manage the following functionalities of the operational amplifier(s) peripheral: + OPAMP configuration + OPAMP calibration Thanks to + Initialization and de-initialization functions + IO operation functions + Peripheral Control functions + Peripheral State functions. More...
#include "stm32l4xx_hal.h"
Go to the source code of this file.
Defines | |
#define | OPAMP_CSR_RESET_VALUE ((uint32_t)0x00000000) |
#define | OPAMP_CSR_RESET_BITS |
#define | OPAMP_CSR_INIT_MASK_PGA |
#define | OPAMP_CSR_INIT_MASK_FOLLOWER |
#define | OPAMP_CSR_INIT_MASK_STANDALONE |
Functions | |
HAL_StatusTypeDef | HAL_OPAMP_Init (OPAMP_HandleTypeDef *hopamp) |
Initializes the OPAMP according to the specified parameters in the OPAMP_InitTypeDef and initialize the associated handle. | |
HAL_StatusTypeDef | HAL_OPAMP_DeInit (OPAMP_HandleTypeDef *hopamp) |
DeInitialize the OPAMP peripheral. | |
__weak void | HAL_OPAMP_MspInit (OPAMP_HandleTypeDef *hopamp) |
Initialize the OPAMP MSP. | |
__weak void | HAL_OPAMP_MspDeInit (OPAMP_HandleTypeDef *hopamp) |
DeInitialize OPAMP MSP. | |
HAL_StatusTypeDef | HAL_OPAMP_Start (OPAMP_HandleTypeDef *hopamp) |
Start the OPAMP. | |
HAL_StatusTypeDef | HAL_OPAMP_Stop (OPAMP_HandleTypeDef *hopamp) |
Stop the OPAMP. | |
HAL_StatusTypeDef | HAL_OPAMP_SelfCalibrate (OPAMP_HandleTypeDef *hopamp) |
Run the self calibration of one OPAMP. | |
HAL_StatusTypeDef | HAL_OPAMP_Lock (OPAMP_HandleTypeDef *hopamp) |
Lock the selected OPAMP configuration. | |
HAL_OPAMP_TrimmingValueTypeDef | HAL_OPAMP_GetTrimOffset (OPAMP_HandleTypeDef *hopamp, uint32_t trimmingoffset) |
Return the OPAMP factory trimming value. | |
HAL_OPAMP_StateTypeDef | HAL_OPAMP_GetState (OPAMP_HandleTypeDef *hopamp) |
Return the OPAMP handle state. | |
HAL_StatusTypeDef | HAL_OPAMP_RegisterCallback (OPAMP_HandleTypeDef *hopamp, HAL_OPAMP_CallbackIDTypeDef CallbackID, pOPAMP_CallbackTypeDef pCallback) |
Register a User OPAMP Callback To be used instead of the weak (surcharged) predefined callback. | |
HAL_StatusTypeDef | HAL_OPAMP_UnRegisterCallback (OPAMP_HandleTypeDef *hopamp, HAL_OPAMP_CallbackIDTypeDef CallbackID) |
Unregister a User OPAMP Callback OPAMP Callback is redirected to the weak (surcharged) predefined callback. |
OPAMP HAL module driver. This file provides firmware functions to manage the following functionalities of the operational amplifier(s) peripheral: + OPAMP configuration + OPAMP calibration Thanks to + Initialization and de-initialization functions + IO operation functions + Peripheral Control functions + Peripheral State functions.
Table 1. OPAMPs inverting/non-inverting inputs for the STM32L4 devices: +------------------------------------------------------------------------| | | | OPAMP1 | OPAMP2 | |-----------------|---------|----------------------|---------------------| | Inverting Input | VM_SEL | | | | | | IO0-> PA1 | IO0-> PA7 | | | | LOW LEAKAGE IO (2) | LOW LEAKAGE IO (2) | | | | Not connected | Not connected | | (1) | | PGA mode only | PGA mode only | |-----------------|---------|----------------------|---------------------| | Non Inverting | VP_SEL | | | | | | IO0-> PA0 (GPIO) | IO0-> PA6 (GPIO) | | Input | | DAC1_OUT1 internal | DAC1_OUT2 internal | +------------------------------------------------------------------------| (1): NA in follower mode. (2): Available on some package only (ex. BGA132).
Table 2. OPAMPs outputs for the STM32L4 devices:
+------------------------------------------------------------------------- | | | OPAMP1 | OPAMP2 | |-----------------|--------|-----------------------|---------------------| | Output | VOUT | PA3 | PB0 | | | | & (1) ADC12_IN if | & (1) ADC12_IN if | | | | connected internally | connected internally| |-----------------|--------|-----------------------|---------------------| (1): ADC1 or ADC2 shall select IN15.
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_opamp.c.