This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F280049: Internal ADC seems off

Part Number: TMS320F280049


Hi, 

I am developing on developing on a F280049PZQ Rev B processor and seeing some off values when I use the internal ADC references. When I read ADC pin A2 which has a nominal value of 1.65V, I see the ADC conversion results below depending on the reference options.

Reference Setup

ADC result

Notes

SetVREF(ADC_ADCA, ADC_EXTERNAL, ADC_VREF3P3);

0x0813

Works as expected

SetVREF(ADC_ADCA, ADC_INTERNAL, ADC_VREF3P3);

0x0409

Appears to be half of nominal

SetVREF(ADC_ADCA, ADC_INTERNAL, ADC_VREF2P5);

0x0814

Appears to use 3.3V as the reference

Neither of the internal reference values seem correct here. The main CPU is running at 100 MHz, ADC PRESALE=2, ACQPS=9

Is there an issue when using the internal reference for the ADC? Are there any setting that that would account for the 3.3V internal reference reading half of the expected value that I may not have set correctly?

Thanks, 

Jose

 

 

  • Hi Jose,

    1.65V coming out on the VREFHI pin is expected when the ADC is set to 0 to 3.3V range.  See the "ANAREFCTL" register definition in the TRM:

    Analog reference A 2.5V source select. In internal reference mode,
    this bit selects which voltage the internal reference buffer drives onto
    the VREFHI pin. The buffer can drive either 1.65V onto the pin,
    resulting in a reference range of 0 to 3.3V, or the buffer can drive
    2.5V onto the pin, resulting in a reference range of 0 to 2.5V. 

    Furthermore, the "ANAREFCTL" register also specifies:

    If multiple VREFHI pins are ganged
    together (for lower pin-count packages), then the reference voltage
    select for the ganged pins should always be configured to the same
    setting.

    If you are seeing issues in the conversions, it seems likely that you haven't enabled and configured both references in the case of ganged references.  You can check the pinout for your device to see which references are ganged together (there will be say a VREFHIB/VREFHIC pin instead of separate VREFHIB and VREFHIC pins) or you can just go ahead an make sure that when you call SetVREF(ADC_ADCA, X,X) that you include an identical call for ADC-B and ADC-C.