2019-12-16 11:56 PM
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:
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):
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:
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!
2019-12-18 01:08 AM
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! :beaming_face_with_smiling_eyes:
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