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.

ADCREFTRIM register

Other Parts Discussed in Thread: TMS320F28030

Hello.

I'm using a TMS320F28030 rev.0 and I need help about the ADCREFTRIM register.

I have configured the ADC to be ratiometric (external reference) but the conversions are not so accurated.

Trying to calibrate the ADC manually, I have seen that BG_COARSE_TRIM bits influence the conversion even if they are declared for the "internal band gap".

Why?

Note that the BG_FINE_TRIM bits are correctly irrelevant.

To understand how calibrate the ADC I need to know how EXTREF_FINE_TRIM and BG_COARSE_TRIM bits work (there is a formula?)

Thank you in advance.

Antonio

  • Antonio-

    Perhaps the BG in the bit field name is misleading, nevertheless it is used as the coarse trim for both internal and external reference modes.

    The devices are trimmed for external reference mode in the factory and should perform to the datasheet limits using this trim.  Are you seeing results outside DS specs or just trying to improve performance beyond those specs?

    If the latter, checkout the following link and see if it helps you perform your own trim.  It is specifically for F2806x but applies to F2803x as well.  BTW I do not recommend modifying the coarse trim.  You should be able to get the results you are looking for using the fine trim register alone.

  • Antonio-  I realized you will not have access to the post.  I'll post the instructions shortly.  Sorry!

  • In order to perform the following self calibration of GAIN for the ADC a few requirements must be met:

    • Device must be using external reference mode for the ADC
    • One ADCIN channel must be tied directly to ADCREFHI

     

    1)      Perform DeviceCal to get initial trim solution

    2)      Perform ADC zero offset calibration per "TMS320x2802x, 2803x Piccolo Analog-to-Digital Converter (ADC) and Comparator"

    3)      Reduce the value in the ADCOFFTRIM by 80 (50h).  This serves a temporary adjustment to account for positive gain error.

    4)      Setup the ADC channel select to the ADCIN which is connected to VREFHI

    5)      Set the EXTREF_FINE_TRIM value in the ADCREFTRIM register to 0 and store the average of multiple  ADC conversions to account for board noise.  Make sure the BG_COARSE_TRIM value is not modified.

    6)      Repeat step five at with each valid EXTREF_FINE_TRIM value, namely 0-30 (0h-1Eh)

    7)      Determine which EXTREF_FINE_TRIM average conversion result was closest to 4015 (0xFAF) which is the max ADC code minus the artificial offset ( 4095-80 ) and write it to EXTREF_FINE_TRIM in the ADCREFTIRM register.

    8)      Restore the ADCOFFTRIM register back to the calibrated value by increasing the register value by 80 (50h).

     

  • Thank you very much, Joe, for your usefull information.

    The device is inside the DS specs, but I need the best precision possible.

    Have a nice day.