OPAMP user offset trimming feature
The STM32G4 Series OPAMP integrates the user offset trimming feature which allows the user to switch from ‘factory’ values to ‘user’ trimmed values using the USERTRIM bit in the OPAMPx_CSR register. TRIMOFFSETP and TRIMOFFSETN values can be adjusted to address an application requirement where the OPAMP input is connected to an external circuitry which includes a residual offset of a few millivolts. TRIMOFFSETP parameter adjusts the OPAMP P differential pairs in the OPAMP low voltage range (<VDDA/2) while the TRIMOFFSETN parameter adjusts the OPAMP P differential pairs in the OPAMP high voltage range (>VDDA/2). Figure 40 OPAMP user trimming adjustment in follower mode shows the OPAMP VOUT offset variation in follower mode versus input level (100 mV to 3000 mV) with VDDA=3.3 V. Both TRIMOFFSETP and TRIMOFFSETN are set to the same value (0x00,0x10 and 0x1F).

The user trimming feature compensates an external offset from the acquisition path. When the application requires the maximum amplitude from the OPAMP output, the user trimming allows the DC value of VOUT to be adjusted and remove the output signal from the OPAMP voltage saturation area which will create signal distortion.