Skip to main content
ADesp.1
Associate II
July 11, 2025
Solved

STM32H7 ADC differential mode, using Vref/2 as INN ?

  • July 11, 2025
  • 1 reply
  • 450 views

Hello, 
Just a quick question as I need confirmation :
Using a STM32H7 ADC in a differential input mode, does this circuit work ? 

ADesp1_1-1752243111385.png

 

The output of the op-amp is Vout = G * (Vin[+] - Vin[-]) + 1.65 .
Then the ADC output should be between :

  • [0 - INT16_MAX] when op-amp output is between 1.65V and 3.3V.
  • [INT16_MIN - 0] when op-amp output is between GND and 1.65V.

But from the datasheet it says that CMV (average between INP and INN) should be around Vref+/2. I'm not sure that's true here.
So can you confirm this wont work and I should do single-ended and substract 1.65V from the result ?

Regards, Adrien

 

Best answer by waclawek.jan

Is the "opamp" in the above schematics a gain-block, i.e. an amplifier with a built-in feedback set to a fixed gain?

> can you confirm this wont work

ST won't guarantee ADC parameters if the common-mode voltage is outside the datasheet-prescribed range (i.e. close to VREF+/2). 

> should do single-ended and substract 1.65V from the result ?

Yes.

But you always can connect the nominally 1.65V node to another input of ADC, perform two single-ended conversions and subtract them in software. This compensates for the possibility that voltage at that 1.65V node is not exactly 1.65V, e.g. due to tolerances of parts used.

JW

1 reply

waclawek.jan
waclawek.janBest answer
Super User
July 11, 2025

Is the "opamp" in the above schematics a gain-block, i.e. an amplifier with a built-in feedback set to a fixed gain?

> can you confirm this wont work

ST won't guarantee ADC parameters if the common-mode voltage is outside the datasheet-prescribed range (i.e. close to VREF+/2). 

> should do single-ended and substract 1.65V from the result ?

Yes.

But you always can connect the nominally 1.65V node to another input of ADC, perform two single-ended conversions and subtract them in software. This compensates for the possibility that voltage at that 1.65V node is not exactly 1.65V, e.g. due to tolerances of parts used.

JW

TDK
Super User
July 11, 2025

> [0 - INT16_MAX] when op-amp output is between 1.65V and 3.3V.

> [INT16_MIN - 0] when op-amp output is between GND and 1.65V.

In differential mode, this won't be the case. It'll only be 0 when signal is 0 and INN is 3.3V. If INN if fixed, you lose half of the output range. Output is an unsigned integer, not signed.

 

I've used differential mode when the common mode is not fixed at VREF+/2 and have not noticed any degradation in performance, but as you saw it doesn't match the datasheet. Up to you if you're willing to live with the uncertainty.

 

Using single ended mode here to capture both and subtract makes the most sense.

"If you feel a post has answered your question, please click ""Accept as Solution""."
ADesp.1
ADesp.1Author
Associate II
July 11, 2025

Ok thanks for the precision. I didn't understood the differential mode correctly then, I thought you could have signed output.