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.

meaning of "0xFFFF != *((Uint16*)GetAdcOffsetTrimOTP)"?

Other Parts Discussed in Thread: TMS320F28335, TMS320F28377S

Example Project "adc_soc_epwm_cpu01"

void AdcSetMode(Uint16 adc, Uint16 resolution, Uint16 signalmode)
{
Uint16 adcOffsetTrimOTPIndex; //index into OTP table of ADC offset trims
Uint16 adcOffsetTrim; //temporary ADC offset trim

CalAdcINL(adc);

if(0xFFFF != *((Uint16*)GetAdcOffsetTrimOTP)) <- meaning of "0xFFFF" ??
{
adcOffsetTrimOTPIndex = 4*adc + 2*resolution + 1*signalmode;
adcOffsetTrim = (*GetAdcOffsetTrimOTP)(adcOffsetTrimOTPIndex);
}
else
{
adcOffsetTrim = 0;
}

and similar codes in CalAdcINL( )

void CalAdcINL(Uint16 adc)
{
switch(adc)
{
case ADC_ADCA:
if(0xFFFF != *((Uint16*)CalAdcaINL)) <- meaning of 0xFFFF?
{
(*CalAdcaINL)(); <- why do (*CalAdcalINL)() recall?
}
else
{
}
break;
~codes~
}
}

  • Hi Choi,

    This is a check if something has been programmed into this OTP location (Flash/OTP memory is all '1's when erased).  This is to avoid loading garbage trims on TMX devices which do not have any trims.  This condition should not be detected on TMS units.

  • thanks~!

    then where do i find a information of locations maps about otp functions? i search both DM and TRM datasheet but don't find informations.
  • Hi Choi,

    These trims are mapped into TI OTP.  I don't think we provide any map of exactly what is in here; we want you to only interact with this memory via TI provided functions like the ADC set mode function.  

  • Thanks for your prompt reply.

    the information that i want to know a otp function map is allocated information. it is helpful to understand tms320f28377. i don't want to know otp func codes and want to know various otp func informations in maps. i study tms320f28377s but DM and TRM don't include one big map sheet , all memory map , all peripherals and memorys. now DM and TRM of 2837x has many divided map informations. it is difficult to understand 2837x intuitively. i like tms320f28335 datasheet. you can search all map ,One sheet about 28335 , pages 159 , tms320f28335 manual. it's easy and simple!