[SILICON BUG ?] Why does OPAMP fail to calibrate with internal output routing? (STM32G474)
Hi,
I am using the relatively new STM32G4(74).
I am currently implementing the OPAMP-abstraction and i am having issues with calibration.
The calibration works in general, if the output routing goes to the pin (OPAINTOEN = 0). (n&p is around 15/16)
The calibration does not work (OUTCAL always 0, no matter which trimming values) if the opamp output is routed to the internal connection (OPAINTOEN=1) for e.g. measuring it with the ADC.
Therefore i need to make sure that during calibration OPAINTOEN=0. this->behavior = !documented;
Further i noticed another issue:
When i calibrate (with OPAINTOEN=0), then switch to OPAINTOEN=1 to connect to the ADC, the ADC-Values arent even close to what I expect.
For example, with VREF=3.3V, the OPAMP in FollowerMode, external Voltage=2.413V, i expect a reading of 2995. What I really read is 3060 while the OPAMP is in highspeed-mode and 3420 while the OPAMP is in normal mode. (Sampling time is at maximum, but shorter sampling time does not worsen the behavior)
It seems like the internal connection is straining the OPAMP far beyond its output current capabilities. This would also explain why the reading changes, if high-speed mode is enabled.
And this output strain would also explain why the calibration fails.
I however dont understand why calibration is setting-depended, since the documentation states, that all switches should be opened.
I have tested all OPAMPs 1..6. They are all the same concerning the calibration miss-behavior.
The ADC-value desaster is tested with:
- OPAMP2 connected to ADC2/Ch16 as Follower.
- OPAMP6 connected to ADC4/Ch17 as Follower.
The ADC value seems independend of highspeed mode with
- OPAMP4 connected to ADC5/Ch5 as Follower
- OPAMP3 connected to ADC2/Ch18 as Gain x32
Does anyone know what is wrong here?
It really seems strange, since the OPAMP->ADC connection is a highly advertised/mentioned feature in those chips. Yet, it really sounds like a silicon bug. Specially the calibration dependence on output routing....
