Macros | Functions
stm32f30x_opamp.c File Reference

This file provides firmware functions to manage the following functionalities of the operational amplifiers (OPAMP1,...OPAMP4) peripheral: More...

#include "stm32f30x_opamp.h"
Include dependency graph for stm32f30x_opamp.c:

Go to the source code of this file.

Macros

#define OPAMP_CSR_DEFAULT_MASK   ((uint32_t)0xFFFFFF93)
 
#define OPAMP_CSR_TIMERMUX_MASK   ((uint32_t)0xFFFFF8FF)
 
#define OPAMP_CSR_TRIMMING_MASK   ((uint32_t)0x0000001F)
 

Functions

void OPAMP_Cmd (uint32_t OPAMP_Selection, FunctionalState NewState)
 Enable or disable the OPAMP peripheral. More...
 
void OPAMP_DeInit (uint32_t OPAMP_Selection)
 Deinitializes OPAMP peripheral registers to their default reset values. More...
 
uint32_t OPAMP_GetOutputLevel (uint32_t OPAMP_Selection)
 Return the output level (high or low) during calibration of the selected OPAMP. More...
 
void OPAMP_Init (uint32_t OPAMP_Selection, OPAMP_InitTypeDef *OPAMP_InitStruct)
 Initializes the OPAMP peripheral according to the specified parameters in OPAMP_InitStruct. More...
 
void OPAMP_LockConfig (uint32_t OPAMP_Selection)
 Lock the selected OPAMP configuration. More...
 
void OPAMP_OffsetTrimConfig (uint32_t OPAMP_Selection, uint32_t OPAMP_Input, uint32_t OPAMP_TrimValue)
 Configure the trimming value of the OPAMP. More...
 
void OPAMP_OffsetTrimModeSelect (uint32_t OPAMP_Selection, uint32_t OPAMP_Trimming)
 Select the trimming mode. More...
 
void OPAMP_PGAConfig (uint32_t OPAMP_Selection, uint32_t OPAMP_PGAGain, uint32_t OPAMP_PGAConnect)
 Configure the feedback resistor gain. More...
 
void OPAMP_StartCalibration (uint32_t OPAMP_Selection, FunctionalState NewState)
 Start or stop the calibration of selected OPAMP peripheral. More...
 
void OPAMP_StructInit (OPAMP_InitTypeDef *OPAMP_InitStruct)
 Fills each OPAMP_InitStruct member with its default value. More...
 
void OPAMP_TimerControlledMuxCmd (uint32_t OPAMP_Selection, FunctionalState NewState)
 Enable or disable the timer-controlled mux mode. More...
 
void OPAMP_TimerControlledMuxConfig (uint32_t OPAMP_Selection, OPAMP_InitTypeDef *OPAMP_InitStruct)
 Configure the OPAMP peripheral (secondary inputs) for timer-controlled mux mode according to the specified parameters in OPAMP_InitStruct. More...
 
void OPAMP_VrefConfig (uint32_t OPAMP_Selection, uint32_t OPAMP_Vref)
 Configure the OPAMP's internal reference. More...
 
void OPAMP_VrefConnectADCCmd (uint32_t OPAMP_Selection, FunctionalState NewState)
 Enables or disables connecting the OPAMP's internal reference to ADC. More...
 
void OPAMP_VrefConnectNonInvertingInput (uint32_t OPAMP_Selection, FunctionalState NewState)
 Connnect the internal reference to the OPAMP's non inverting input. More...
 

Detailed Description

This file provides firmware functions to manage the following functionalities of the operational amplifiers (OPAMP1,...OPAMP4) peripheral:

Author
MCD Application Team
Version
V1.1.1
Date
04-April-2014
  • OPAMP Configuration
  • OPAMP calibration
==============================================================================
                      ##### OPAMP Peripheral Features #####
==============================================================================
                 
[..]
    The device integrates 4 operational amplifiers OPAMP1, OPAMP2, OPAMP3 and OPAMP4:
            
    (+) The OPAMPs non inverting input can be selected among the list shown by
        table below.

    (+) The OPAMPs inverting input can be selected among the list shown by
        table below.

    (+) The OPAMPs outputs can be internally connected to the inverting input 
        (follower mode)
    (+) The OPAMPs outputs can be internally connected to resistor feedback
        output (Programmable Gain Amplifier mode)

    (+) The OPAMPs outputs can be internally connected to ADC

    (+) The OPAMPs can be calibrated to compensate the offset compensation

    (+) Timer-controlled Mux for automatic switch of inverting and
        non-inverting input

OPAMPs inverting/non-inverting inputs:
  +--------------------------------------------------------------+     
  |                 |        | OPAMP1 | OPAMP2 | OPAMP3 | OPAMP4 |
  |-----------------|--------|--------|--------|--------|--------|
  |                 | PGA    |  OK    |  OK    |  OK    |  OK    |
  | Inverting Input | Vout   |  OK    |  OK    |  OK    |  OK    |
  |                 | IO1    |  PC5   |  PC5   |  PB10  |  PB10  |
  |                 | IO2    |  PA3   |  PA5   |  PB2   |  PD8   |
  |-----------------|--------|--------|--------|--------|--------|
  |                 | IO1    |  PA7   |  PD14  |  PB13  |  PD11  |
  |  Non Inverting  | IO2    |  PA5   |  PB14  |  PA5   |  PB11  |
  |    Input        | IO3    |  PA3   |  PB0   |  PA1   |  PA4   |
  |                 | IO4    |  PA1   |  PA7   |  PB0   |  PB13  |
  +--------------------------------------------------------------+  

                      ##### How to use this driver #####
==============================================================================
[..]
This driver provides functions to configure and program the OPAMP 
of all STM32F30x devices.

To use the OPAMP, perform the following steps:

(#) Enable the SYSCFG APB clock to get write access to OPAMP
    register using RCC_APB2PeriphClockCmd(RCC_APB2Periph_SYSCFG, ENABLE);

(#) Configure the OPAMP input in analog mode using GPIO_Init()

(#) Configure the OPAMP using OPAMP_Init() function:
    (++) Select the inverting input
    (++) Select the non-inverting inverting input
  
(#) Enable the OPAMP using OPAMP_Cmd() function
Attention

© COPYRIGHT 2014 STMicroelectronics

Licensed under MCD-ST Liberty SW License Agreement V2, (the "License"); You may not use this file except in compliance with the License. You may obtain a copy of the License at:

   http://www.st.com/software_license_agreement_liberty_v2

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Definition in file stm32f30x_opamp.c.



rosflight_firmware
Author(s): Daniel Koch , James Jackson
autogenerated on Thu Apr 15 2021 05:07:52