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.

CCS/TMS320F28375D: TMS320F28375D

Part Number: TMS320F28375D

Tool/software: Code Composer Studio

What is  the meaning of below instructions ?

1.#define Device_cal (void   (*)(void))0X070282

2.#define GetAdcOffsetTrimOTP (Unit16   (*) (Unit16  OTPoffset ) )0X0703AC

  • Katuri,

    These instructions are used for ADC Calibration and ADC Zero Offset Calibration. During the fabrication and test process, TI calibrates the gain, offset, and linearity of the ADCs and the offset of the buffered DACs. These trim settings are embedded into TI reserved OTP memory as part of C-callable functions. Details about this can be found in the F2837xD Technical Reference Manual (SPRUHM8G) starting on page 1407. Please see "10.1.12 ADC Calibration" and "10.1.12.1 ADC Zero Offset Calibration". I hope this answers your question, and if so please click the green "Verified Answer" button.

    - Ken
  • Dear Sir,
    Thanks for your reply.Whatever you mentioned I know.I have already studied.My question is related to pre-processor directive.How to understand the that #define.It involves function call,pointer,Address location in OTP
  • Hi Katuri,

    The device calibration function definition is just a call to a pointer to a function with no parameters and no return values. The function is burned into TI OTP during the TI factory test and calibration procedure. You shouldn't need to call this unless you intentionally reset the ADC/analog modules (the boot ROM will populate everything for you on startup).

    The get offset function is similar, but it takes a parameter to know which offset to get (which ADC and ADC mode) and returns an offset trim value. The function and the data it is retrieving is again burned into TI OTP at the TI factory. You should not call this function directly; instead this is taken care of when you use the SetMode() function to change the ADC signalmode and resolution.