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: Use of TI_Fee_MainFunction to access FEE.

Part Number: TMS570LC4357

With reference to the following thread,

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1093649/tms570lc4357-sample-code-to-verify-the-write-read-functionality-of-fee-of-tms570lc4357/4051411?tisearch=e2e-sitesearch&keymatch=%20user%3A516661#4051411 

In the shared example code, below part is used repeatedly before writing into FEE Synchronously/ Asynchronously.

do
{
  TI_Fee_MainFunction();
  delay();
  Status=TI_Fee_GetStatus(0);
}
while(Status!=IDLE);

Could you please brief me about the use of TI_Fee_MainFunction and where it should be called?

Is it necessary to check the IDLE state of FEE every time before reading the FEE Synchronously/ Asynchronously?

Please help!

  • Hi Harshal,

    TI_Fee_MainFunction handles the Write/Read/Erase/Invalidate asynchronous jobs initiated by  TI_Fee_WriteAsync() / TI_Fee_Read() / TI_Fee_EraseBlock() / TI_Fee_InvalidateBlock() functions. This function should be called at regular intervals by a scheduler. TI_Fee_MainFunction internally calls another function TI_FeeInternal_FeeManager whenever there is no other job pending (“IDLE” State). TI_FeeInternal_FeeManager function handles all the background tasks/internal operations to manage the TI FEE module:

    1. Determine whether a Virtual Sector Copy operation is in progress. If so, it should identify all the Valid Data Blocks in the old Virtual Sector and copy them to the new Virtual Sector.
    2. Determine if any of the Virtual Sector needs to be erased. If so, it should erase that particular Virtual Sector.
    3. This function is only called when the Fee module is in IDLE state. It should set the Fee module to BUSY_INTERNAL state.

    For synchronous FEE operation, you don't need to call FEE_MainFunction().