SPRUHX5I August 2014 – May 2024 TMS320F28374S , TMS320F28375S , TMS320F28375S-Q1 , TMS320F28376S , TMS320F28377S , TMS320F28377S-Q1 , TMS320F28378S , TMS320F28379S
During factory testing, the calibration values for ADC offset (ADCOFFTRIM register) and ADC linearity correction (ADCINLTRIM1-6 registers) are measured per device. The resulting correction values for ADC offset and linearity and the associated functions to populate these into the corresponding ADC registers are stored in the OTP memory. Table 10-10 describes the function call, address pointer locations for the functions, and ADC registers being populated during device boot up sequence call to Device_cal() or any time the function call ADC_setMode() in C2000Ware is invoked. These functions generally must be called before using the ADC peripheral. Following is an example of calibrating the ADC using C2000Ware driverlib functions. The ADC base macros used here come from within driverlib and are available for all ADC module instances.
//
// Calibrates the ADC reference, DAC offset, and internal oscillators
//
Device_cal();
//
// Calibrates the ADC A linearity; it is recommended to call the ADC_setMode function to
// properly calibrate the ADC linearity. The ADC_setINLTrim function will determine which
// linearity calibration function to call based on the ADC base that is passed in
//
ADC_setINLTrim(ADCA_BASE);
//
// Calibrates the offset trim for ADC A; it is recommended to call the ADC_setMode
// function to properly calibrate the ADC offset trim
//
ADC_setOffsetTrim(ADCA_BASE);
Function Name | Pointer Address (OTP) | Description | Registers Populated |
---|---|---|---|
Device_cal() | 0x070282 | Calibration function for ADC reference, DAC offset, and internal oscillators | ANAREFTRIMA, ANAREFTRIMB, ANAREFTRIMC, ANAREFTRIMD, DACA OFFTRIM, DACB OFFTRIM, DACC OFFTRIM |
ADC_calADCAINL() | 0x0703B4 | Calibration function for ADCA linearity; previously called
by:
|
ADCA INLTRIM1-6 |
ADC_calADCBINL() | 0x0703B2 | Calibration function for ADCB linearity; previously called
by:
|
ADCB INLTRIM1-6 |
ADC_calADCCINL() | 0x0703B0 | Calibration function for ADCC linearity; previously called
by:
|
ADCC INLTRIM1-6 |
ADC_calADCDINL() | 0x0703AE | Calibration function for ADCD linearity; previously called
by:
|
ADCD INLTRIM1-6 |
ADC_getOffsetTrim() | 0x0703AC | Calibration function for ADCA-D offset; previously called
by:
|
ADCA-D ADCOFFTRIM |
getTempSenseOffset() | 0x0703B8 | Function to read Temperature Sensor offset programmed at factory | none |
getTempSenseSlope() | 0x0703B6 | Function to read Temperature Sensor slope programmed at factory | none |