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.

F2812 ADC calibration

Other Parts Discussed in Thread: TMS320F2812, TMS320F2811, TMS320F2810

I am designing the board for my first TMS320F2812 project
and want to extract maximum accuracy from its internal A/D
converter, using its internal voltage reference. I am trying
to get a clear picture of what the data manual calls
'calibration.'  This is not easy.

After studying around 2 dozen reference documents I have
decided only 2 address this topic in any depth:

Doc No  Doc Title
------- ------------------------------------------------
SPRS174 "TMS320F2810, TMS320F2811, TMS320F2812
         TMS320C2810, TMS320C2811, TMS320C2812 Digital
         Signal Processors, Data Manual"

SPRA989 "F2810, F2811, and F2812 ADC Calibration"

SPRS174 (Data Manual)
---------------------

A circuit diagram in section 4.3 (p. 67) shows how to
configure external components to the ADCREFP & ADCREFM pins
when using an internal reference and specifically states
they should be tied to capacitors and no other load.

Footnote 5 in section 6.31.2 (p. 143) directs me to correct
inherent gain & offset errors in the ADC circuit using a
technique described in SPRA989 (ADC Cal).

SPRA989 (ADC Cal)
-----------------

SPRA989 is a straightforward explanation of the effects of
ADC gain and offset errors, and how reading two known input
voltages (suitably separated on the input range) allows the
programmer to correct the errors present in other channels.

Section 3 of this document describes how to perform
calibration on an F2812 device by:
  "feeding two known reference values into two ADC
   channels and calculating a calibration gain and
   offset ..."

Nowhere does this document make any distinction between
designs using internal or external voltage references; nor
does it indicate they should be handled differently. Yet all
the circuit diagrams included therein clearly use external
references only. And feeding the ADCREFP & ADCREFM pins back
into ADC input channels violates the "no other load"
provision in section 4.3 of the data manual.

So what does this mean?
[ ] The gain & offset errors can be corrected for internal
    reference by the same procedure as external reference.
    Just ignore the warning about not driving any loads.
[ ] The gain & offset errors are automagically corrected at
    power up without any programmer intervention.
[ ] The gain & offset errors cannot be corrected if I use
    the internal reference. I am stuck with ± 80 LSB 
    (offset) and ± 200 LSB (gain).
[ ] Other (please specify) ________________________________

Advance thanks for any clarity you can provide.

  • Gary Lynch said:

    So what does this mean?
    [ ] The gain & offset errors can be corrected for internal
        reference by the same procedure as external reference.
        Just ignore the warning about not driving any loads.
    [ ] The gain & offset errors are automagically corrected at
        power up without any programmer intervention.
    [ ] The gain & offset errors cannot be corrected if I use
        the internal reference. I am stuck with ± 80 LSB 
        (offset) and ± 200 LSB (gain).
    [ ] Other (please specify) ________________________________

    Gary,

    [X] Other (please specify) To perform the SW calibration as described in the application note, the user must provide an accurate external reference on the board itself as shown in Fig 5 of the application note.  This external reference is then sampled and used for SW calibration. The external reference in the application note is not ADCREFP/ADCREFM. ADCREFP/ADCREFM must remain unloaded and only connected to the capacitors as shown in the data manual.

    -Lori

  • Hmmm....

    I don't see how that differs from my third bullet:
    >
    > [ ] The gain & offset errors cannot be corrected if I use
    >     the internal reference. I am stuck with ± 80 LSB 
    >     (offset) and ± 200 LSB (gain).
    >

    My decision to use the internal reference was based in part
    on a statement in section 3.4.2.2 of SPRAAS1, "Hardware
    Design Guidelines for TMS320F28xx and TMS320F28xxx DSCs":
        "The only reason for going for external voltage
         source is the temperature stability. The
         temperature coefficient of the internal voltage
         source is 50 PPM/°C."

    If using the internal reference means living with the out-
    of-box gain and offset errors, that is probably sufficient
    cause to switch to external.

  • Gary,

    The application note on calibration is using a SW technique to re-range native output of the ADC to correct for the gain/offset error introduced by the internal reference/circuitry.  As the app note mentions the native saturation ranges will still be impacted(as the native gain/offset are unchanged in the analog domain); but the end result of this calibration is a corrected digital value before your application uses it in your system to within the tolerance mentioned in the app note.

    The "references" mentioned in the app note are DC values that you would supply that are good to some tolerance acceptable to you to input channels of the ADC.  ADC will sample these periodically, and by calculating the difference between measured and ideal create correction coefficients that can then be applied in line to all other channels to correct for the gain/offset error.

    Now, for a mode in which we provide an external reference to be used by the ADC directly; the F281x is a special case in our family of processors.  On this device we provide a method to supply the external REFP/REFM voltages(normally outputs when using the internal reference) from a higher precision source.  The method and support circuitry in which to do this is outlined in the DS for the F281x.  This will bring the native gain error down from +/-200LSBs to +/-50LSBs.  This is independent of any SW calibration methods mentioned in the app note or above.  There is no impact to the native offset error when supplying the ADC's reference externally in this manner.

    Now, both methods can be combined; supplying REFP/REFM to improve the native gain error of the ADC(and as such the temp coefficient of the gain error as well), and using 2 input channels to give SW correction for remaining error in the digital domain.  As mentioned the SW calibration cannot correct for saturation of the ADC output caused by the gain/offset error as mentioned in the app note.

    Please let me know if this addresses your question. 

    Best,

    Matthew

     

     

     

  • I am starting to wonder if I have been sidetracked by the
    term "voltage reference." All my prior A/D experience has
    been with technologies other than the pipeline ADC where the
    ADC block used a single, unipolar reference voltage (vRef
    below), and all output counts expressed the voltage on the
    input channel as a proportion of that voltage.

                                               vRef
                                                 O
                   ________                      |
            ------|        |   _____       ______|_____
            ------|        |  |     |     /            |
            ------| Analog |__| S/H |___/      A/D     |
            ------|  Mux   |  |_____|   \   converter  |
            . . . |        |              \____________|
            ------|________|


    After reading the description TI provided of the ADC inside
    the TMS320F2812, I assumed the ADCREFP and ADCREFM pins
    were the equivalent inputs to the pipeline ADC, only that
    there were now two of them.
                                         adcVRefP adcVRefM
                                            O        O
                   ________                 |        |
            ------|        |   _____       _|________|_
            ------|        |  |     |     /            |
            ------| Analog |__| S/H |___/      A/D     |
            ------|  Mux   |  |_____|   \   converter  |
            . . . |        |              \____________|
            ------|________|

    As I understand it, when the ADC is configured for external
    voltage reference, these pins are input, whereas when
    configured for internal voltage reference, they become
    outputs, and the only purpose in bringing them outside the
    package is to allow application of a large capacitance.

    The calibration procedure described by SPRA989 (ADC Cal)
    calls for bringing "reference inputs" into MUX channels. I
    throught this meant the same "reference voltages" as were
    fed into the "voltage reference" pins:

                                         adcVRefP adcVRefM
                                            O        O
                                            |        |
             +------------------------------+        |
             | +----------------------------|--------+
             | |   ________                 |        |
            -|-|--|        |   _____       _|________|_
            -|-|--|        |  |     |     /            |
    refHigh -+-|--| Analog |__| S/H |___/      A/D     |
    refLow  ---+--|  Mux   |  |_____|   \   converter  |
            . . . |        |              \____________|
            ------|________|

    If there is no connection between them, it would be much
    clearer to call the latter two signals "calibration
    voltages."

                                         adcVRefP adcVRefM
                                            O        O
                   ________                 |        |
            ------|        |   _____       _|________|_
            ------|        |  |     |     /            |
    calHigh ------| Analog |__| S/H |___/      A/D     |
    calLow  ------|  Mux   |  |_____|   \   converter  |
            . . . |        |              \____________|
            ------|________|

    I re-read your response, using this circuit as a basis, and
    now it makes more sense. I should be able to calibrate my
    readings, whether or not I use external voltage references,
    but I must independently supply precision calibration
    voltages (which means I have to add high-cost voltage
    reference parts to the board anyway).

    (Somebody nod a head, please.)

    Thanks.

  • Gary,

    You are correct. 

    I want to make one more comment here wrt to the device and its associated gain/offset errors.  There is a similar device, 28335, that has same speed/resolution/FSR ADC as this one, but the gain and offset errors are significantly reduced to +/-30Bs and +/-15LSBs over temperature respectively.  Offset can also be nulled in the analog domain using VSSA as one of the sampled calibration sources. 

    Not sure if this would get you where you needed to be w/o the external precision sources, but wanted to mention it in case it saved you some time/money.

    Best,

    Matthew