AN5306 · Application noteOperational Amplifier (OPAMP) usage in STM32G4 Series
Download .pdfOpen in the full document

OPAMP user offset trimming feature

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).

Figure 40. OPAMP user trimming adjustment in follower mode

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.

Conclusion

The STM32G4 Series OPAMP peripheral integrates many functionalities and features to answer a wide range of applications such as motor control, audio, power management. The STM32G4 Series OPAMP is designed to simplify the circuit layout around the MCU and reduce the number of external components needed. However, the application analog signals should be correctly mastered depending on the OPAMP configuration and datasheet parameters to optimize the performance for the application.

The OPAMP is often the conditioning stage between the sensing stage (sensor) and the processing stage (software algorithm) which requires a good understanding of the sensor specifications and maybe an electrical simulation or a mathematical verification to ensure a correct application behavior in all conditions: environment variations (temperature, conducted or radiated electrical interference), component tolerances, power supply variations, start-up and shut-down conditions, stabilizing of the sensor in timing.

Finally, the STM32G4 Series OPAMP also optimizes the application design and reduces the number of platform variations. The integrated OPAMP circuit allows the management of various signal levels through application firmware and a minimum number of additional external components.

Revision history

Table 2. Document revision history
DateVersionChanges
10-May-20191Initial release.