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.

TMS570LC4357: Error Handling in FEE

Part Number: TMS570LC4357

I'm working on accessing FEE of TMS570LC4357. The writing & reading is done in Asynchronous mode using TI_Fee_WriteAsync() & TI_Fee_Read() functions respectively and its working fine. But I need help on doubts given below :

1. In what cases the function TI_Fee_WriteAsync() returns E_NOT_OK & What action is recommended in such cases?

2. In what cases the function TI_Fee_Read() returns E_NOT_OK & What action is recommended in such cases? 

3. As per my understanding the function TI_Fee_GetStatus() will only gives the FEE module state as UNINIT, IDLE or BUSY & doesn't give the success or fail status. Is there any function to detect whether the last write or read operation is succeeded or failed

4. Is it necessary to disable interrupts while using TI_Fee_WriteAsync & TI_Fee_Read() functions ?

5. Is it necessary to disable interrupts while using TI_Fee_WriteSync & TI_Fee_ReadSync() functions ?

  • 1. In what cases the function TI_Fee_WriteAsync() returns E_NOT_OK & What action is recommended in such cases?

    2. In what cases the function TI_Fee_Read() returns E_NOT_OK & What action is recommended in such cases? 

    The write and read operations are not accepted while the FEE is performing data copy and flash erase. 

    When you issue a data write operation (TI_Fee_WriteAsync or TI_Fee_WriteSync), The data is written to the first empty location in the Active Virtual Sector. If there is insufficient space in the current Virtual Sector to update the data, it switches over to the next Virtual Sector and copies all the valid data from the other Data Blocks in the current Virtual Sector . After copying all the valid data, the current Virtual Sector is marked as ready for erase and the new one is marked as Active Virtual Sector. Any new data is now written into the new Active Virtual Sector and the Virtual Sector which is marked as ready for erase will be erased in background.

    3. As per my understanding the function TI_Fee_GetStatus() will only gives the FEE module state as UNINIT, IDLE or BUSY & doesn't give the success or fail status. Is there any function to detect whether the last write or read operation is succeeded or failed

    The TI_Fee_GetStatus() returns the status of the TI FEE module:  UNINIT, IDLE, BUSY, or BUSY_INTERNAL. TI_Fee_GetJobResult() will return if the last job has finished successfully or not: JOB_OK, JOB_FAILED, JOB_CANCELLED, etc.

  • 4. Is it necessary to disable interrupts while using TI_Fee_WriteAsync & TI_Fee_Read() functions ?

    5. Is it necessary to disable interrupts while using TI_Fee_WriteSync & TI_Fee_ReadSync() functions ?

    You don't have to disable the interrupt if the interrupting task does not contain any FEE operations.

  • One more question:

    6. How would I know the data integrity of read data?  Is there any function which will confirm it? When I execute read operation using TI_Fee_Read() and if the return type of function TI_Fee_GetJobResult() is JOB_OK, can I consider it as a confirmation of data integrity of read data? 

    Please help.

  • Hi Harshal,

    The EEPROM is also protected by ECC. JOB_OK means the read operation has completed without any issue, doesn't mean the data read from the block is correct.

  • Hi Sir,

    So for the confirmation of data integrity user have to have its own checksum method, right?

    Or is there is any other way to do so? Please help.

  • Hi Harshal,

    Is the ECC protection not enough? 

    The FEE driver supports checksum. But the checksum is only used for data write rather for data read. If Checksum is enabled, during writing of a block, Checksum of the data to be written is calculated and checked against the Checksum of the same block which is already existing in Flash. If Checksum matches, data is not written. If Checksum is not enabled, then data is compared byte by byte. If data does not match, write will be initiated.

    The checksum is not enabled by default.

  • Thanks Sir.

    Now I have enabled the ECC protection and if I execute read operation using TI_Fee_Read() and if the return type of function TI_Fee_GetJobResult() is JOB_OK, can I consider it as a confirmation of data integrity of read data? 

    Here I only want to know the data integrity of read data.

    Please help.

  • If there is no ecc error (1-bit or 2-bit) when you read the data block, the data you read out from FEE is the same as the data which were written to the flash.