TUKS MCU Introductory course / TUKS-COURSE-2-LED
Embed: (wiki syntax)

« Back to documentation index

Configuration and operation of OPAMP trimming

Configuration and operation of OPAMP trimming
[OPAMP Exported Functions]

Functions

__STATIC_INLINE void LL_OPAMP_SetTrimmingMode (OPAMP_TypeDef *OPAMPx, uint32_t TrimmingMode)
 Set OPAMP trimming mode.
__STATIC_INLINE uint32_t LL_OPAMP_GetTrimmingMode (OPAMP_TypeDef *OPAMPx)
 Get OPAMP trimming mode.
__STATIC_INLINE void LL_OPAMP_SetCalibrationSelection (OPAMP_TypeDef *OPAMPx, uint32_t TransistorsDiffPair)
 Set OPAMP offset to calibrate the selected transistors differential pair NMOS or PMOS.
__STATIC_INLINE uint32_t LL_OPAMP_GetCalibrationSelection (OPAMP_TypeDef *OPAMPx)
 Get OPAMP offset to calibrate the selected transistors differential pair NMOS or PMOS.
__STATIC_INLINE uint32_t LL_OPAMP_IsCalibrationOutputSet (OPAMP_TypeDef *OPAMPx)
 Get OPAMP calibration result of toggling output.
__STATIC_INLINE void LL_OPAMP_SetTrimmingValue (OPAMP_TypeDef *OPAMPx, uint32_t PowerMode, uint32_t TransistorsDiffPair, uint32_t TrimmingValue)
 Set OPAMP trimming factor for the selected transistors differential pair NMOS or PMOS, corresponding to the selected power mode.
__STATIC_INLINE uint32_t LL_OPAMP_GetTrimmingValue (OPAMP_TypeDef *OPAMPx, uint32_t PowerMode, uint32_t TransistorsDiffPair)
 Get OPAMP trimming factor for the selected transistors differential pair NMOS or PMOS, corresponding to the selected power mode.

Function Documentation

__STATIC_INLINE uint32_t LL_OPAMP_GetCalibrationSelection ( OPAMP_TypeDef *  OPAMPx )

Get OPAMP offset to calibrate the selected transistors differential pair NMOS or PMOS.

Note:
Preliminarily, OPAMP must be set in mode calibration using function LL_OPAMP_SetMode(). CSR CALSEL LL_OPAMP_GetCalibrationSelection
Parameters:
OPAMPxOPAMP instance
Return values:
Returnedvalue can be one of the following values:

  • LL_OPAMP_TRIMMING_NMOS
  • LL_OPAMP_TRIMMING_PMOS

Definition at line 694 of file stm32l4xx_ll_opamp.h.

__STATIC_INLINE uint32_t LL_OPAMP_GetTrimmingMode ( OPAMP_TypeDef *  OPAMPx )

Get OPAMP trimming mode.

CSR USERTRIM LL_OPAMP_GetTrimmingMode

Parameters:
OPAMPxOPAMP instance
Return values:
Returnedvalue can be one of the following values:

  • LL_OPAMP_TRIMMING_FACTORY
  • LL_OPAMP_TRIMMING_USER

Definition at line 659 of file stm32l4xx_ll_opamp.h.

__STATIC_INLINE uint32_t LL_OPAMP_GetTrimmingValue ( OPAMP_TypeDef *  OPAMPx,
uint32_t  PowerMode,
uint32_t  TransistorsDiffPair 
)

Get OPAMP trimming factor for the selected transistors differential pair NMOS or PMOS, corresponding to the selected power mode.

OTR TRIMOFFSETN LL_OPAMP_SetTrimmingValue
OTR TRIMOFFSETP LL_OPAMP_SetTrimmingValue
LPOTR TRIMLPOFFSETN LL_OPAMP_SetTrimmingValue
LPOTR TRIMLPOFFSETP LL_OPAMP_SetTrimmingValue

Parameters:
OPAMPxOPAMP instance
PowerModeThis parameter can be one of the following values:

  • LL_OPAMP_POWERMODE_NORMAL
  • LL_OPAMP_POWERMODE_LOWPOWER
TransistorsDiffPairThis parameter can be one of the following values:

  • LL_OPAMP_TRIMMING_NMOS
  • LL_OPAMP_TRIMMING_PMOS
Return values:
0x0...0x1F

Definition at line 764 of file stm32l4xx_ll_opamp.h.

__STATIC_INLINE uint32_t LL_OPAMP_IsCalibrationOutputSet ( OPAMP_TypeDef *  OPAMPx )

Get OPAMP calibration result of toggling output.

Note:
This functions returns: 0 if OPAMP calibration output is reset 1 if OPAMP calibration output is set CSR CALOUT LL_OPAMP_IsCalibrationOutputSet
Parameters:
OPAMPxOPAMP instance
Return values:
Stateof bit (1 or 0).

Definition at line 711 of file stm32l4xx_ll_opamp.h.

__STATIC_INLINE void LL_OPAMP_SetCalibrationSelection ( OPAMP_TypeDef *  OPAMPx,
uint32_t  TransistorsDiffPair 
)

Set OPAMP offset to calibrate the selected transistors differential pair NMOS or PMOS.

Note:
Preliminarily, OPAMP must be set in mode calibration using function LL_OPAMP_SetMode(). CSR CALSEL LL_OPAMP_SetCalibrationSelection
Parameters:
OPAMPxOPAMP instance
TransistorsDiffPairThis parameter can be one of the following values:

  • LL_OPAMP_TRIMMING_NMOS
  • LL_OPAMP_TRIMMING_PMOS
Return values:
None

Definition at line 676 of file stm32l4xx_ll_opamp.h.

__STATIC_INLINE void LL_OPAMP_SetTrimmingMode ( OPAMP_TypeDef *  OPAMPx,
uint32_t  TrimmingMode 
)

Set OPAMP trimming mode.

CSR USERTRIM LL_OPAMP_SetTrimmingMode

Parameters:
OPAMPxOPAMP instance
TrimmingModeThis parameter can be one of the following values:

  • LL_OPAMP_TRIMMING_FACTORY
  • LL_OPAMP_TRIMMING_USER
Return values:
None

Definition at line 646 of file stm32l4xx_ll_opamp.h.

__STATIC_INLINE void LL_OPAMP_SetTrimmingValue ( OPAMP_TypeDef *  OPAMPx,
uint32_t  PowerMode,
uint32_t  TransistorsDiffPair,
uint32_t  TrimmingValue 
)

Set OPAMP trimming factor for the selected transistors differential pair NMOS or PMOS, corresponding to the selected power mode.

OTR TRIMOFFSETN LL_OPAMP_SetTrimmingValue
OTR TRIMOFFSETP LL_OPAMP_SetTrimmingValue
LPOTR TRIMLPOFFSETN LL_OPAMP_SetTrimmingValue
LPOTR TRIMLPOFFSETP LL_OPAMP_SetTrimmingValue

Parameters:
OPAMPxOPAMP instance
PowerModeThis parameter can be one of the following values:

  • LL_OPAMP_POWERMODE_NORMAL
  • LL_OPAMP_POWERMODE_LOWPOWER
TransistorsDiffPairThis parameter can be one of the following values:

  • LL_OPAMP_TRIMMING_NMOS
  • LL_OPAMP_TRIMMING_PMOS
TrimmingValue0x00...0x1F
Return values:
None

Definition at line 734 of file stm32l4xx_ll_opamp.h.