SPRUIZ1B July 2023 – August 2024 TMS320F28P650DH , TMS320F28P650DK , TMS320F28P650SH , TMS320F28P650SK , TMS320F28P659DH-Q1 , TMS320F28P659DK-Q1 , TMS320F28P659SH-Q1
ADC offset error is determined and calibrated during factory testing. However, the user still has the option to perform offset calibration if the end application specifically requires this. This section describes how to perform offset calibration using internal VREFLO connection for single-ended operation, and external channels for differential operation. Refer to the register descriptions for ADCCTL2.OFFTRIMMODE, ADCOFFTRIM, ADCOFFTRIM2 and ADCOFFTRIM3 for proper offset correction parameters. The C2000Ware function ADC_setMode() sets the value of OFFTRIMMODE to 1. In this mode, the ADC selects the appropriate offset calibration values from one of the three ADCOFFTRIMx registers, depending on the signal mode and channel type (odd or even) used.
Zero offset error is defined as the difference from 0 that occurs when converting a voltage at VREFLO (for single-ended operation), or the difference from MAX_CODE/2 when converting ADCINxP = ADCINxN (for differential mode). The zero offset error can be positive or negative. To correct this error, an adjustment of equal magnitude and opposite polarity is written into the ADCOFFTRIMx register. The value contained in this register is applied before the results are available in the ADC result registers. This operation is fully contained within the ADC core, so the timing of the results is not affected, and the full dynamic range of the ADC is maintained for any trim value.
Use the following procedure to re-calibrate the ADC offset in 12-bit single-ended mode:
Use the following procedure to recalibrate the ADC offset in 16-bit or 12-bit differential mode: