Extended OPAMP HAL module driver. This file provides firmware functions to manage the following functionalities of the operational amplifier(s) peripheral: + Extended Initialization and de-initialization functions + Extended Peripheral Control functions.
More...
Extended OPAMP HAL module driver. This file provides firmware functions to manage the following functionalities of the operational amplifier(s) peripheral: + Extended Initialization and de-initialization functions + Extended Peripheral Control functions.
- Author:
- MCD Application Team
******************************************************************************
* @attention
*
* Copyright (c) 2017 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include "stm32l4xx_hal.h"
/** @addtogroup STM32L4xx_HAL_Driver
* @{
*/
/** @defgroup OPAMPEx OPAMPEx
* @brief OPAMP Extended HAL module driver
* @{
*/
#ifdef HAL_OPAMP_MODULE_ENABLED
/* Private typedef -----------------------------------------------------------*/
/* Private define ------------------------------------------------------------*/
/* Private macro -------------------------------------------------------------*/
/* Private variables ---------------------------------------------------------*/
/* Private function prototypes -----------------------------------------------*/
/* Exported functions --------------------------------------------------------*/
/** @defgroup OPAMP_Exported_Functions OPAMP Exported Functions
* @{
*/
#if defined (STM32L471xx) || defined (STM32L475xx) || defined (STM32L476xx) || defined (STM32L485xx) || defined (STM32L486xx) || \
defined (STM32L496xx) || defined (STM32L4A6xx) || \
defined (STM32L4P5xx) || defined (STM32L4Q5xx) || \
defined (STM32L4R5xx) || defined (STM32L4R7xx) || defined (STM32L4R9xx) || defined (STM32L4S5xx) || defined (STM32L4S7xx) || defined (STM32L4S9xx)
/** @addtogroup OPAMPEx_Exported_Functions_Group1
* @brief Extended operation functions
*
@verbatim
===============================================================================
##### Extended IO operation functions #####
===============================================================================
[..]
(+) OPAMP Self calibration.
Definition in file stm32l4xx_hal_opamp_ex.c.
Run the self calibration of the 2 OPAMPs in parallel.
- Note:
- Trimming values (PMOS & NMOS) are updated and user trimming is enabled is calibration is successful.
-
Calibration is performed in the mode specified in OPAMP init structure (mode normal or low-power). To perform calibration for both modes, repeat this function twice after OPAMP init structure accordingly updated.
-
Calibration runs about 10 ms (5 dichotomy steps, repeated for P and N transistors: 10 steps with 1 ms for each step).
- Parameters:
-
hopamp1 | handle |
hopamp2 | handle |
- Return values:
-
Definition at line 88 of file stm32l4xx_hal_opamp_ex.c.
References assert_param, HAL_Delay(), HAL_OPAMP_STATE_READY, __OPAMP_HandleTypeDef::Init, __OPAMP_HandleTypeDef::Instance, IS_OPAMP_POWERMODE, OPAMP_INPUT_NONINVERTING, OPAMP_POWERMODE_LOWPOWER, OPAMP_POWERMODE_NORMALPOWER, OPAMP_STANDALONE_MODE, OPAMP_TRIMMING_DELAY, OPAMP_TRIMMING_USER, OPAMP_InitTypeDef::PowerMode, __OPAMP_HandleTypeDef::State, OPAMP_InitTypeDef::TrimmingValueN, OPAMP_InitTypeDef::TrimmingValueNLowPower, OPAMP_InitTypeDef::TrimmingValueP, OPAMP_InitTypeDef::TrimmingValuePLowPower, and OPAMP_InitTypeDef::UserTrimming.