cancel
Showing results for 
Search instead for 
Did you mean: 

Are the STM32G4 OPAMP multiplexer settings properly documented somewhere?

I've read AN5306 and it has many helpful explanations, but it does a poor job of actually listing which selector values are used to configure each of the multiplexers - especially the mysterious undocumented one that seems to bridge around the VMSEL multiplexer based on PGA_GAIN[4:3].

I think the full circuit should be something like this:

0690X00000Bugi1QAB.png

I'm trying to use an inverting configuration where the Zx impedance is completely external rather than including the op-amp's 10K Rg - something like this (sorry for the crummy drawing):0690X00000BugiQQAR.png

Based on my understanding of the various selector values, I feel like this should be a valid (although undocmented) configuration, but when I try to select this configuration I unexpectedly seem to get huge amounts of gain. The following, similar configuration works OK, but I'd like to avoid the 10K resistor in series with my external impedance if at all possible:

0690X00000BugiuQAB.png

It seems like there must be more to the PGA_GAIN[4:3] multiplexer than meets the eye (or else I've just misunderstood the wiring). Thanks for anyone's insights!

1 REPLY 1
Andrea Canepa
Senior

Like all the peripherals included in the STM32 also the OPAMP are very flexible but do not allow you to do everything: they are flexible but not enough! 😁

The negative input (VINM *) is designed to be used as a BIAS, external filters or signal input, therefore the 10 K internal resistance cannot be eliminated.

This is because with a single register (PGA_GAIN) we have to select multiple commutations, so they have been grouped with predefined functions (but which do not cover all the possible combinations). The greatest flexibility could be had if there was a single register for every possible switching.

For example: a register to select the connection point of the 10 K resistor (connected to GND, connected to the external pin, connected to the input - of the OPAMP, not connected). Another register to set the gain, that is the variable resistance in reaction on the OPAMP, with the possibility to also select where to connect the common point with the 10 K resistance (on input - of OPAMP, on output pin, no connection) . And so on.

This gives great flexibility but makes the configuration more complicated but above all makes the device not compatible with the previous STM32 (which from what I understood, this is a feature that they consider important in STM).

I have done numerous tests with OPAMP. It can also be used well as a differential amplifier, properly managing all the possible combinations that are available. We must accept it as it is. Otherwise the only solution is to set "Stand-alone" mode and mount all external passive components.

Regards

Andrea