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.

F28M36P63C2: Problem using external ADC reference

Part Number: F28M36P63C2
Other Parts Discussed in Thread: CONTROLSUITE

I am having some problems when I try to use an external reference to the ADC.

I have the following voltages to the microcontroller (measured with a Keysight 34465A):

VDDIO = 3.353 V
VDDA = 3.296 V
VREFHI = 3.298 V

Note: It says in the datasheet (SPRS825E, revised december 2017) that VREFHI<=VDDA. The difference in my design is due to the voltage drop in a ferrite bead. The problem description below is however valid also for the case when I short circuited the bead so VDDA became 3.298 V, i.e. equal to VREFHI

On ADC channels ADCINA4 and ADCINB4 I have applied a voltage of 3.292 V.

Now if I measure with the internal or external reference (by changing the ADCREFSEL register bit) I read the following result when doing around 300 measurements in each case.

Measured with ADCREFSEL = 0                                                  4069-4072
Measured with ADCREFSEL = 1                                                  4059-4062

Note: The results did not change when I changed register bit VREFLOCONV between 0 and 1

Using the formulas in §10.3.10 in the reference manual (SPRUHE8D, revised November 2016) my interpretation is that I ideally should read:

Ideal theoretical result ADCREFSEL = 0                                       4086
Ideal theoretical result ADCREFSEL = 1                                       4087

According to the datasheet page 74 the figure there indicates a maximum error of around 12 LSB at 30 degrees. The microcontroller should be around this temperature when I do these tests. 

Have I missed something more that needs to be changed in some register when using an external reference?

Best Regards
John

 

  • John,

    The figure that you referenced from Page 74 is poorly drawn. The intent was to show that the total ADC error can drift in different directions across temperature, thus it is impossible to compensate for temperature-induced error by using a static coefficient. The error profile also varies between devices -- a characteristic that is completely missed in the figure. I would characterize the figure as very misleading and I will request that it be removed from the datasheet entirely.

    You can expect the ADC error to be bounded by the datasheet specifications across supported operating conditions. The TRM has an ADC Calibration section that describes methods of reducing ADC error in the system.

    -Tommy

  • Hi again,

    The question is how to do this calibration. I will personally not try to dig into this problem any more but have explained to the SW/System people in the project that it does not work very well, or at all, with this TI circuit to use an external reference.

    One of the SW persons in the project asked me if I had routed the external reference also to one of the ADC inputs but I said that this should of course not be necessary since I have already routed it to the VREFHI pin.

    He, the SW guy, had been reading in this post when asking me the question above
    e2e.ti.com/.../541432

    Regards
    John
  • John,

    There are controlSUITE software examples of the calibration procedures described in the TRM. InitSysCtrl (F28M36x_SysCtrl.c) and Adc1OffsetSelfCal (F28M36x_Adc.c) would be the most applicable snippets from \controlSUITE\device_support\f28m36x\v220\F28M36x_common\source

    For in-system gain calibration when using external reference, there is this related thread: https://e2e.ti.com/support/microcontrollers/c2000/f/171/p/777819/2875188

    I hope these help to demonstrate how calibration is executed.

    -Tommy