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.

Piccolo ADC reference

Other Parts Discussed in Thread: TMS320F28035, TMDSDOCK28035, TMDSCNCD28035, CONTROLSUITE

customer said:

The function Device_cal() sets the default values for the ADCOFFTRIM and ADCREFTRIM registers to provide default calibration to offset and gain respectively. However, the default values for the ADCREFTRIM register are not optimal and the device shows significant full scale gain error. I have been manually adjusting the latter register in debug mode achieving better results and could program a routine to provide calibration to this register. My concern in this regards is that the ADC manual says in page 56, section 1.8.3 that “this register should not be modified after the Device_cal() function is called.” Could you please, further explain the reasons behind this recommendation?

 

  • Which device is this?

    For TMS devices, the REFTRIM is chosen to give best results over full temperature range. 

    For TMX devices, the REFTRIM may not be optimal.

    We don't suggest that the customer change the REFTRIM (hence the ADC manual comment) and we don't provide documentation on how to change this.  To calibrate for gain error on the fly, we typically recommend the customer post-process the ADC results.  

  • This is the TMS320F28035

  • Jason,

    Can you also clarify how much gain error the customer is seeing, at what temperature, using what reference (internal or external), and using what board (TI or other development board, or customer's application board)?

  • Hi Devin and Jason,

      Thanks for the information so far. The gain error we see is of 0.5% (the ADC reads 4072 with 3.3V input). This is using TI development board, at room temperature, with internal reference.

  • Hi Lucas,

    Technically, this is well within the gain error spec in the datasheet, but if you want to calibrate out the gain error in your system, you can do the following:

    Connect a reference voltage IC to one of the ADC inputs.  A voltage nearer to the top of the FSR is preferred (but must be below FSR). 3.0V would be a good choice, but 2.5V is also often chosen because of the availability of voltage reference ICs.

    Sample that ADC input periodically.  Calculate the gain error assuming that input was ideal.  Post-process the other ADC conversions to account for this gain error (multiply them by some factor to correct for gain error).  

    This method is limited by the accuracy of the external reference IC, INL, offset error, ch-to-ch offset error, and ch-to-ch gain error and then scaled by (3.3V / reference IC voltage).  Typically you would add the error powers, not the magnitudes directly to get: gain error after calibration = sqrt(ref error^2 + INL^2 + offset^2....)*(3.3V / reference voltage). Since the above is dependent on offset error, you will also want to run the offset self-calibration procedure (which uses an internal connection to VREFLO, so no additional hardware needed).  

  • Hi Lucas,

      Just to piggy-back on something Devin said about offset self-cal.  Please note this is a requirement at least once in the user application to meet any datasheet offset specs (even on a TI development board).

      Please make sure the offset is being calibrated after DeviceCal() else the 23LSB error you quote may include an offset error that can be reduced.

    Regards,

    Joe

  • Thanks Devin, this is good information. I will try to implement it once I have a chance. 

    In any case, taking into account your past statement about full scale gain trim (i.e. "For TMS devices, the REFTRIM is chosen to give best results over full temperature range."), this will be addressed at a later time.

    Cheers,

    Lucas

  • Thank you Joe, we are aware of this.

    Lucas

  • I am on site with the customer.  We are investigating if the problem is caused by either of these errata.

    This is the hardware they are using.

    TMDSDOCK28035
    including TMDSCNCD28035 (revision 0)

    Reference: TMS320F28030/28031/28032/28033/28034/28035 Piccolo MCU Silicon Errata
    Find, "ADC: Initial Conversion"
    Find, "ADC: Offset Self-Recalibration Requirement"

    To test if we are seeing the initial conversion erratum, we will measure the difference between TMDSCNCD28035 (revision 0) and TMDSCNCD28035 (revision A).

  • Devin,

    Here is what you will need to do in order to replicate the problem seen here.

    Hardware:
    TMDSDOCK28035
    including TMDSCNCD28035 (revision A) with the following modifications:
    - connect all ADC A inputs to Vcc (3.3 V)
    - connect all ADC B inputs to ground

    Firmware:
    1. Remove the contents of this folder (or move it to some other spot on your PC as backup to restore later)
    C:\TI\controlSUITE\device_support\f2803x\v127\DSP2803x_examples_ccsv5\adc_soc
    2. In the empty adc_soc folder unzip the contents of this file attached.

    0878.adc_soc.zip

    3. Open Code Composer Studio
    4. Import the project to CCS

    .

    .

    5. Build the project.