Skip to main content
glinsky
Associate
November 27, 2020
Solved

AN4207 Single ended zero reference mode

  • November 27, 2020
  • 2 replies
  • 1115 views

Hello.

Reffering to AN4207(Doc ID 023945 Rev 1) Single ended zero reference mode (Page 9):

This mode injects an input common mode of half scale to the ADC thus maintaining the dynamic range the same as in differential mode (-32767 to +32767). In this mode, the injected common mode is dependent on gain variations.

The formula is: Vin = SDADCx_AINyP = (ReadData + 32767) * Vref/(gain x 65535)

I suspect here is a mistake. There should be -32768 (0x8000) instead of -32767 (0x8001).

And the formula should apply offset 32768 to ReadData.

Or how to explan SDADC_GetInjectedConversionValue() returning 0x8000 in case of connecting ADC input to ground?

This topic has been closed for replies.
Best answer by Igor Cesko

Hello.

You are right. The injected value should correspond to full scale negative negative value: -32768 (0x8000). Because this should be the minimum value of final result in this single ended zero reference mode which correspond to zero analog voltage at SDADC input.

Correct formula is:

Vin = SDADCx_AINyP = (ReadData + 32768) * Vref/(gain x 65535)

Regards

Igor

2 replies

Igor Cesko
Igor CeskoBest answer
ST Employee
January 6, 2021

Hello.

You are right. The injected value should correspond to full scale negative negative value: -32768 (0x8000). Because this should be the minimum value of final result in this single ended zero reference mode which correspond to zero analog voltage at SDADC input.

Correct formula is:

Vin = SDADCx_AINyP = (ReadData + 32768) * Vref/(gain x 65535)

Regards

Igor

Amel NASRI
ST Technical Moderator
February 1, 2021

Hi @glinsky​ ,

A new revision of AN4207 is now on the web.

The update you suggested is already there. Please keep us informed if you have any other feedback.

-Amel

To give better visibility on the answered topics, please click on "Best Answer" on the reply which solved your issue or answered your question.