ST STM32G4 Series Reference Manual page 754

Advanced arm-based 32-bit mcus
Hide thumbs Also See for STM32G4 Series:
Table of Contents

Advertisement

Operational amplifiers (OPAMP)
Calibration procedure
Here are the steps to perform a full calibration of either one of the operational amplifiers:
1.
Set the OPAEN bit in OPAMPx_CSR to 1 to enable the operational amplifier.
2.
Set the USERTRIM bit in the OPAMPx_CSR register to 1.
3.
Choose a calibration mode (refer to
steps 3 to 4 will have to be repeated 4 times. For the first iteration select
The above calibration mode correspond to OPAHSM=0 and CALSEL=11 in the
OPAMPx_CSR register.
4.
Increment TRIMOFFSETN[4:0] in OPAMPx_OTR starting from 00000b until CALOUT
changes to 0 in OPAMPx_CSR.
Note:
Between the write to the TRIMOFFSETP and TRIMOFFSETN bits and the read of the
CALOUT value, make sure to wait for the t
characteristics section of the datasheet, to get the correct CALOUT value.
The commutation means that the is correctly compensated and that the corresponding trim
code must be saved in the TRIMOFFSETP and TRIMOFFSETN bits.
Repeat steps 3 to 4 for:
Normal_mode and P differential pair, CALSEL=01
High-speed mode and N differential pair
High-speed mode and P differential pair
If a mode is not used, it is not necessary to perform the corresponding calibration.
All operational amplifier can be calibrated at the same time.
Note:
During the whole calibration phase the external connection of the operational amplifier
output must not pull up or down currents higher than TBD µA.
24.3.8
Timer controlled Multiplexer mode
The selection of the OPAMP inverting and non inverting inputs can be done automatically. In
this case, the switch from one input to another is done automatically. This automatic switch
is triggered by the TIM1 CC6 or TIM8 CC6 or TIM20 CC6 output arriving on the OPAMP
input multiplexers.
This is useful for dual motor control with a need to measure the currents on the 3 phases
simultaneously on a first motor and then on the second motor.
The automatic switch is enabled by setting the TxCMEN bit, x = 1,8,20, in the OPAMP
switch control register. The inverting and non inverting inputs selection is performed using
the VPS_SEL and VMS_SEL bit fields in the OPAMP switch control register. If the TxCMEN
bit is cleared, the selection is done using the VP_SEL and VM_SEL bit fields in the OPAMP
control/status register.
754/2083
Normal mode and N differential pair
Table 194: Operating modes and
max delay specified in the electrical
OFFTRIM
RM0440 Rev 1
RM0440
calibration). The

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the STM32G4 Series and is the answer not in the manual?

Table of Contents

Save PDF