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.

TMS570LS3137, FEE, 写操作,写817次后写入失败,状态BUSY

Other Parts Discussed in Thread: TMS570LS3137

使用的TMS570LS3137的FEE功能时,遇到了一些问题。

现在的现象是:

1、单独测试读功能 TI_Fee_ReadSync(), 返回值一直为E_OK;

2、单独测试写功能 TI_Fee_WriteSync(), 在连续写817次后,该函数会返回E_NOT_OK,然后读取状态为BUSY,间隔一会在读取状态还是为BUSY;

3、在检测状态为BUSY后,重新初始化FEE,就可以接着进行写操作,但是又是再连续写816次后重复现象2。

初始化参考了HCG中的程序,HCG配置如下图所示:

测试的程序如下:

        
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; } }

希望TI工程师能解答探讨一下,谢谢。