Why does my Opamp PGA seem to be 10, not 16?
Hi,
I have a board, with STM32f303. It generally works fine, but I am using the opamps and they are causing me trouble. I have set them up to have PGA of 16, and be internally connected to the ADC, and have test points on my board where I can measure the opamp output voltage. I can read the input voltage on the resistor-capacitor feeding it.
I observe that the opamp has almost exactly 100mV in (actually 102mV generated from a 4k7 pullup to 3v3 and 150ohm to ground, but only 1V out. It seems to be quite poorly defined on output, going between 0.8V and 1.35V. Obviously I expect 1.633V from 100mV*16 gain.
Registers are set as below, read out from the chip by the debugger while running; i.e. the actual values.
The opamp is actually being used to amplify the current on a 1mohm shunt. If I pass current through the shunt (driving a motor in open loop...), I can see the value change, but the opamp out is centred on ~1V
What is wrong? Is the chip just toasted?
I have tried setting calibration values, to no avail, manually setting TRIMOFFSETP and TRIMOFFSETN to the extreme values, but it doesn't get anywhere near central.
I also ran :
hopamp1.Init.Mode = OPAMP_STANDALONE_MODE ;
HAL_OPAMP_Init(&hopamp1);
HAL_OPAMP_SelfCalibrate(&hopamp1);
HAL_Delay(50);
hopamp1.Init.Mode = OPAMP_PGA_MODE;
HAL_OPAMP_Init(&hopamp1);in the startup bit of main, and this generated different trim values, but still stayed near 1V.
My last resort will be to desolder and replace the chip... but I really can't think what I've done that could be nuking it. The analogue inputs are pretty gently loaded. The behaviour is the same on all 3 opamps I'm using, and given the rest of the chip works, I am disinclined to think static.

Thanks to everyone!
