Tool/software: Code Composer Studio
Dear team
My customer is using TMS570LS3137 FEE.
1 Test the read function TI_Fee_ReadSync() separately, the return value is always E_OK;
2 Test the write function TI_Fee_WriteSync() separately.
After 817 consecutive writes, the function will return E_NOT_OK, then the read status is BUSY, and the read status will be BUSY after an interval;
3 After the detection state is BUSY, re-initialize FEE, and then you can proceed with the write operation, but it is repeated after 816 consecutive writes.
Please help.



int main(void)
{
uint16 pos_No = 0;
uint16 read_pos_No = 0; eepromInit();
while (1)
{
sciPrintf("\n->write %d", pos_No);
eepromWrite(2, (uint8 *)&pos_No);
TI_Fee_ReadSync(2, 0, (uint8 *)&read_pos_No, 2);
sciPrintf("\n->read %d", read_pos_No);
delay_ms(300);
pos_No++;
}
}
uint8 eepromWrite(uint16 block, uint8 *data)
{
Std_ReturnType error = E_OK;
TI_FeeModuleStatusType status;
error = TI_Fee_WriteSync(block, data);
if (error != E_OK)
{
status = TI_Fee_GetStatus(0);
printEEPROMStatus(block, status);
eepromInit();
}
return error;
}
void printEEPROMStatus(uint16 block, TI_FeeModuleStatusType status)
{
switch (status)
{
case UNINIT:
sciPrintf("UNINIT");
break;
case IDLE:
sciPrintf("IDLE");
break;
case BUSY:
sciPrintf("BUSY");
break;
case BUSY_INTERNAL:
sciPrintf("BUSY_INTERNAL");
break;
default:
break;
}
}