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.

TMS320F280025C-Q1: Potential Bug in ADC_setINLTrim()

Part Number: TMS320F280025C-Q1

Please take a look at this in driverliib adc.c for F28002x (4.00).  The for loop only updates two INL trim values, but the device has three.  Looks like a bug, can you confirm?

-Eric

void
ADC_setINLTrim(uint32_t base)
{
uint16_t i;
uint32_t * inlTrimAddress;

//
// Check the arguments.
//
ASSERT(ADC_isBaseValid(base));

if(TI_OTP_DEV_PRG_KEY == TI_OTP_DEV_KEY)
{
switch(base)
{
case ADCA_BASE:
inlTrimAddress = ADC_getINLTrimOTPLoc(0U);
break;
case ADCC_BASE:
inlTrimAddress = ADC_getINLTrimOTPLoc(1U);
break;
default:
//
// Invalid base address!
//
inlTrimAddress = ADC_getINLTrimOTPLoc(0U);
break;
}

//
// Update INL trim values to ADC trim registers
//
EALLOW;
for(i = 0; i < 4U; i+=2)
{
//
// 32-bit writes are performed since the OTP source is word aligned.
//
HWREG(base + ADC_O_INLTRIM2 + i) = (*inlTrimAddress++);
}
EDIS;
}
}