cancel
Showing results for 
Search instead for 
Did you mean: 

AN4207 Single ended zero reference mode

glinsky
Associate

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?

1 ACCEPTED SOLUTION

Accepted Solutions
Igor Cesko
ST Employee

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

View solution in original post

2 REPLIES 2
Igor Cesko
ST Employee

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 Employee

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 Accept as Solution on the reply which solved your issue or answered your question.