Functions
Initialization and Configuration functions

Initialization and Configuration functions. More...

Collaboration diagram for Initialization and Configuration functions:

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_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

Initialization and Configuration functions.

 ===============================================================================
             ##### Initialization and Configuration functions #####
 ===============================================================================  

Function Documentation

void OPAMP_Cmd ( uint32_t  OPAMP_Selection,
FunctionalState  NewState 
)

Enable or disable the OPAMP peripheral.

Note
If the selected OPAMP is locked, enable/disable can't be performed. To unlock the configuration, perform a system reset.
Parameters
OPAMP_Selectionthe selected OPAMP. This parameter can be OPAMP_Selection_OPAMPx where x can be 1 to 4 to select the OPAMP peripheral.
NewStatenew state of the OPAMP peripheral. This parameter can be: ENABLE or DISABLE.
Return values
None

Definition at line 393 of file stm32f30x_opamp.c.

void OPAMP_DeInit ( uint32_t  OPAMP_Selection)

Deinitializes OPAMP peripheral registers to their default reset values.

Note
Deinitialization can't be performed if the OPAMP configuration is locked. To unlock the configuration, perform a system reset.
Parameters
OPAMP_Selectionthe selected OPAMP. This parameter can be OPAMP_Selection_OPAMPx where x can be 1 to 4 to select the OPAMP peripheral.
None
Return values
None

< Set OPAMP_CSR register to reset value

Definition at line 144 of file stm32f30x_opamp.c.

uint32_t OPAMP_GetOutputLevel ( uint32_t  OPAMP_Selection)

Return the output level (high or low) during calibration of the selected OPAMP.

Parameters
OPAMP_Selectionthe selected OPAMP. This parameter can be OPAMP_Selection_OPAMPx where x can be 1 to 4 to select the OPAMP peripheral.
  • OPAMP output is low when the non-inverting input is at a lower voltage than the inverting input
  • OPAMP output is high when the non-inverting input is at a higher voltage than the inverting input
Note
OPAMP ouput level is provided only during calibration phase.
Return values
Returnsthe selected OPAMP output level: low or high.

Definition at line 424 of file stm32f30x_opamp.c.

void OPAMP_Init ( uint32_t  OPAMP_Selection,
OPAMP_InitTypeDef OPAMP_InitStruct 
)

Initializes the OPAMP peripheral according to the specified parameters in OPAMP_InitStruct.

Note
If the selected OPAMP is locked, initialization can't be performed. To unlock the configuration, perform a system reset.
Parameters
OPAMP_Selectionthe selected OPAMP. This parameter can be OPAMP_Selection_OPAMPx where x can be 1 to 4 to select the OPAMP peripheral.
OPAMP_InitStructpointer to an OPAMP_InitTypeDef structure that contains the configuration information for the specified OPAMP peripheral.
  • OPAMP_InvertingInput specifies the inverting input of OPAMP
  • OPAMP_NonInvertingInput specifies the non inverting input of OPAMP
Return values
None

< Get the OPAMPx_CSR register value

< Clear the inverting and non inverting bits selection bits

< Configure OPAMP: inverting and non inverting inputs

< Write to OPAMPx_CSR register

Definition at line 164 of file stm32f30x_opamp.c.

void OPAMP_OffsetTrimConfig ( uint32_t  OPAMP_Selection,
uint32_t  OPAMP_Input,
uint32_t  OPAMP_TrimValue 
)

Configure the trimming value of the OPAMP.

Parameters
OPAMP_Selectionthe selected OPAMP. This parameter can be OPAMP_Selection_OPAMPx where x can be 1 to 4 to select the OPAMP peripheral.
OPAMP_Inputthe selected OPAMP input. This parameter can be one of the following values:
  • OPAMP_Input_Inverting: Inverting input is selected to configure the trimming value
  • OPAMP_Input_NonInverting: Non inverting input is selected to configure the trimming value
OPAMP_TrimValuethe trimming value. This parameter can be any value lower or equal to 0x0000001F.
Return values
None

< Get the OPAMPx_CSR register value

< Clear the trimming bits

< Configure the new trimming value

< Write to OPAMPx_CSR register

Definition at line 484 of file stm32f30x_opamp.c.

void OPAMP_OffsetTrimModeSelect ( uint32_t  OPAMP_Selection,
uint32_t  OPAMP_Trimming 
)

Select the trimming mode.

Parameters
OffsetTrimmingthe selected offset trimming mode. This parameter can be one of the following values:
  • OPAMP_Trimming_Factory: factory trimming values are used for offset calibration
  • OPAMP_Trimming_User: user trimming values are used for offset calibration
Note
When OffsetTrimming_User is selected, use OPAMP_OffsetTrimConfig() function or OPAMP_OffsetTrimLowPowerConfig() function to adjust trimming value.
Return values
None

Definition at line 458 of file stm32f30x_opamp.c.

void OPAMP_PGAConfig ( uint32_t  OPAMP_Selection,
uint32_t  OPAMP_PGAGain,
uint32_t  OPAMP_PGAConnect 
)

Configure the feedback resistor gain.

Note
If the selected OPAMP is locked, gain configuration can't be performed. To unlock the configuration, perform a system reset.
Parameters
OPAMP_Selectionthe selected OPAMP. This parameter can be OPAMP_Selection_OPAMPx where x can be 1 to 4 to select the OPAMP peripheral.
NewStatenew state of the OPAMP peripheral. This parameter can be: ENABLE or DISABLE.
Return values
None

Definition at line 209 of file stm32f30x_opamp.c.

void OPAMP_StartCalibration ( uint32_t  OPAMP_Selection,
FunctionalState  NewState 
)

Start or stop the calibration of selected OPAMP peripheral.

Note
If the selected OPAMP is locked, start/stop can't be performed. To unlock the configuration, perform a system reset.
Parameters
OPAMP_Selectionthe selected OPAMP. This parameter can be OPAMP_Selection_OPAMPx where x can be 1 to 4 to select the OPAMP peripheral.
NewStatenew state of the OPAMP peripheral. This parameter can be: ENABLE or DISABLE.
Return values
None

Definition at line 517 of file stm32f30x_opamp.c.

void OPAMP_StructInit ( OPAMP_InitTypeDef OPAMP_InitStruct)

Fills each OPAMP_InitStruct member with its default value.

Parameters
OPAMP_InitStructpointer to an OPAMP_InitTypeDef structure which will be initialized.
Return values
None

Definition at line 192 of file stm32f30x_opamp.c.

void OPAMP_TimerControlledMuxCmd ( uint32_t  OPAMP_Selection,
FunctionalState  NewState 
)

Enable or disable the timer-controlled mux mode.

Note
If the selected OPAMP is locked, enable/disable can't be performed. To unlock the configuration, perform a system reset.
Parameters
OPAMP_Selectionthe selected OPAMP. This parameter can be OPAMP_Selection_OPAMPx where x can be 1 to 4 to select the OPAMP peripheral.
NewStatenew state of the OPAMP peripheral. This parameter can be: ENABLE or DISABLE.
Return values
None

Definition at line 364 of file stm32f30x_opamp.c.

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.

Note
If the selected OPAMP is locked, timer-controlled mux configuration can't be performed. To unlock the configuration, perform a system reset.
Parameters
OPAMP_Selectionthe selected OPAMP. This parameter can be OPAMP_Selection_OPAMPx where x can be 1 to 4 to select the OPAMP peripheral.
OPAMP_InitStructpointer to an OPAMP_InitTypeDef structure that contains the configuration information for the specified OPAMP peripheral.
  • OPAMP_InvertingInput specifies the inverting input of OPAMP
  • OPAMP_NonInvertingInput specifies the non inverting input of OPAMP
Note
PGA and Vout can't be selected as seconadry inverting input.
Return values
None

< Get the OPAMPx_CSR register value

< Clear the secondary inverting bit, secondary non inverting bit and TCMEN bits

< Configure OPAMP: secondary inverting and non inverting inputs

< Write to OPAMPx_CSR register

Definition at line 331 of file stm32f30x_opamp.c.

void OPAMP_VrefConfig ( uint32_t  OPAMP_Selection,
uint32_t  OPAMP_Vref 
)

Configure the OPAMP's internal reference.

Note
This feature is used when calibration enabled or OPAMP's reference connected to the non inverting input.
If the selected OPAMP is locked, Vref configuration can't be performed. To unlock the configuration, perform a system reset.
Parameters
OPAMP_Selectionthe selected OPAMP. This parameter can be OPAMP_Selection_OPAMPx where x can be 1 to 4 to select the OPAMP peripheral.
OPAMP_VrefThis parameter can be: OPAMP_Vref_3VDDA: OPMAP Vref = 3.3% VDDA OPAMP_Vref_10VDDA: OPMAP Vref = 10% VDDA OPAMP_Vref_50VDDA: OPMAP Vref = 50% VDDA OPAMP_Vref_90VDDA: OPMAP Vref = 90% VDDA
Return values
None

< Get the OPAMPx_CSR register value

< Clear the CALSEL bits

< Configure OPAMP reference

< Write to OPAMPx_CSR register

Definition at line 239 of file stm32f30x_opamp.c.

void OPAMP_VrefConnectADCCmd ( uint32_t  OPAMP_Selection,
FunctionalState  NewState 
)

Enables or disables connecting the OPAMP's internal reference to ADC.

Note
If the selected OPAMP is locked, Vref connection can't be performed. To unlock the configuration, perform a system reset.
Parameters
NewStatenew state of the Vrefint output. This parameter can be: ENABLE or DISABLE.
Return values
None

Definition at line 297 of file stm32f30x_opamp.c.

void OPAMP_VrefConnectNonInvertingInput ( uint32_t  OPAMP_Selection,
FunctionalState  NewState 
)

Connnect the internal reference to the OPAMP's non inverting input.

Note
If the selected OPAMP is locked, Vref configuration can't be performed. To unlock the configuration, perform a system reset.
Parameters
OPAMP_Selectionthe selected OPAMP. This parameter can be OPAMP_Selection_OPAMPx where x can be 1 to 4 to select the OPAMP peripheral.
NewStatenew state of the OPAMP peripheral. This parameter can be: ENABLE or DISABLE.
Return values
None

Definition at line 271 of file stm32f30x_opamp.c.



rosflight_firmware
Author(s): Daniel Koch , James Jackson
autogenerated on Fri Jul 24 2020 03:20:14