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.

I need FEE expert's help!

Other Parts Discussed in Thread: TMS570LS1227, HALCOGEN

Dear TI,

I had studied and test FEE module on TMS570LS1227 about 2 weeks.

Unfortunately, I have a lot of confuse about FEE so far. I will list my questions at this post, please help to clear my question.

1. There are two functions of write data in FEE. Async and Sync. Could you explain what's the difference. 

2. For the sync of write functions, it is synchronized with what? 

3. In FEE of example code of Halcogen, there is a step, Initialize RAM array, before TI_FEE_Init(). What is the effect of Initialize RAM array?

    Which document had describe this step? 

4. As my know, TMS570 also provides POM module. For calibration application, which modules are your recommendation? POM or FEE?

5. What are the effects of TI_FEE_MainFunction() and TI_FEEInternal_FEEMangeger()? Also, what is meaning of the path of the dotted line?

Thanks a lot.

  • Hello:

    We will forward your post to or FEE expert. You'll hear back from us soon.

    Regards,

    Enrique
  • Dear TI,
    I add a question.
    I have a testing that must force an interrupt while writing/reading data through FEE.
    How do I implement it? Did you have any ideas?
  • Hi,

    My answers below:

    1. Synchronous Write API when called will complete the the requested write job before exiting. Asynchronous write will initiate a write job and exists it.TI_Fee_MainFunction() should be called to complete the asynchronous write.

    2. Explained above.

    3. Initialize RAM array is a data array to be written onto FLASH. In normal use case, this would be the data passed by application.

    4. On POM vs FEE, it is application dependent. FEE can be used if an application requires some data to be modified and used during the life of micro. POM an be used where the data does not change during the life of micro.

    5. TI_FEE_MainFunction()  should be called cyclically by application to complete asynchronous Read/Write/InvalidateBlock/EraseImmediateBlock jobs. TI_FEEInternal_FEEManger API will be called by TI_FEE_MainFunction() when no jobs are pending. Manager API will copy the blocks from one sector to other, when the sector is full. It also erases the sector. Dotted line is to indicate that API has to be called periodically.

    On forcing an interrupt during read/write, you can use TI_Fee_GetStatus(0) API. If the API returns BUSY, it means either read/write is ongoing. Also note that this API returns BUSY when invalidateblock/eraseimmediateblocks API's are called. 

     

  • Pardon, Vishwanath.

    I can't full understand your reply.

    1. Synchronous Write API when called will complete the the requested write job before exiting. Asynchronous write will initiate a write job and exists it.TI_Fee_MainFunction() should be called to complete the asynchronous write.

    Synchronous write will complete before exiting. Exit at what? exit main()? ,or?

    Asynchronous write will initial a write job and exists it. What is the meaning of exists it?

    2. Explained above.

    I can't understand above answer, so I can't understand this answer. 

    3.Initialize RAM array is a data array to be written onto FLASH. In normal use case, this would be the data passed by application.

    Are there any documents or datasheet to describe these operation?

    5. TI_FEE_MainFunction()  should be called cyclically by application to complete asynchronous Read/Write/InvalidateBlock/EraseImmediateBlock jobs. TI_FEEInternal_FEEManger API will be called by TI_FEE_MainFunction() when no jobs are pending. Manager API will copy the blocks from one sector to other, when the sector is full. It also erases the sector. Dotted line is to indicate that API has to be called periodically.

    As the describe in datasheet, FEE_MainFunction() is responsible for handling Async operation. What is the meaning of "handle"?]

     

    6.On forcing an interrupt during read/write, you can use TI_Fee_GetStatus(0) API. If the API returns BUSY, it means either read/write is ongoing. Also note that this API returns BUSY when invalidateblock/eraseimmediateblocks API's are called. 

    As this answer, I can use "if  " to implement to force interrupt during write/read data, like as following:

    If( TI_Fee_GetStatus == Busy )

    {

         force interrupt;

    }

    right?

     

     

     

  • Hi,

    My apologies if I confused you. I will explain in detail:

    ->When Synchronous write API is called from application, data is written on to Flash inside the synchronous write API.

    Ex:

    DummyAPI();

    TI_Fee_WriteSync(pass required parameters); //Before this API execution is completed, data is written on to Flash.

    DummyAPI1(); 

    ->When Asynchronous write API is called from application, write job is initiated by FEE driver by setting FEE internal states. Data writing does not happen inside the Asynchronous write API.

    Ex:

    DummyAPI();

    TI_Fee_WriteAsync(pass required parameters); //API exits by setting FEE states. No data is written on to Flash.

    DummyAPI1(); 

    In case of Asynchronous write, application needs to call(either periodically in interrupt or OS) TI_Fee_MainFunction to complete the write job.

    In general, TI_Fee_MainFunction needs to be called either periodically in interrupt or OS.(Calling of TI_Fee_MainFunction periodically is required since this API maintains status of the sectors(Active, Copy, Ready for Erase, Empty) of the FEE bank.)

    ->On initializing RAM array, the code snippet in example is a simple loop filling the array. Not sure what documentation is required here.

    ->When I say TI_Fee_MainFunction handles Asynchronous operations, TI_Fee_MainFunction wirtes the data on to Flash for Asynchronous write job, reads the data from Flash for Asynchronous read job. 

    -> On interrupt, your code snippet is correct.

  • Dear Vishwanath,

    Thanks a lot for your reply. I want to confirm again.

    In your reply, " ....data is written on to Flash...

    Whether is this Flash meaning the area of following picture?


     

  • Hi,

    Yes, you are right. FEE would only access EEPROM bank.

  • Dear Vishwanath,

    I have other questions. Please continue solve my problems, thanks a lot.

    How do I know the effect of each setting in Halcogen FEE page? Is there any document or guideline?

    For example

    1. In Halcogen FEE page,  what is No of EEPS?

    2. In Halcogen, what is data select bits

    etc..

    Best Regards,

    Fan

  • Hi Fan,

    You will find a document named "TI FEE User Guide" at C:\ti\Hercules\HALCoGen\v04.03.00\Docs. You will find description of all the configuration items in the document.

  • Dear Vishwanath,
    I have another question,.
    We used FEE to write and read data.
    However, if we don't enable the FEE, for default setting, where is the place that data is saved in?
  • Hi Fan,

    I couldn't understand your question completely.
    When you say " if we don't enable the FEE", do you mean not enabling the FEE driver in HALCOGen? if yes, then FEE driver is not generated by HALCoGen. Application can use F021 API's for accessing FEE memory bank.
  • Hello Vishwanath,

    Sorry, maybe my question is not good.

    I have another question.

    I enable the FEE driver, and check the .cmd file. Why do the FEE section be pointed to Flash 0 not Flash 7?

    As my know, FEE is used in Bank 7.

    MEMORY
    {
        VECTORS (X)  : origin=0x00000000 length=0x00000020
        FLASH0  (RX) : origin=0x00000020 length=0x0013FFE0
        STACKS  (RW) : origin=0x08000000 length=0x00001500
        RAM     (RW) : origin=0x08001500 length=0x0002EB00
    
    /* USER CODE BEGIN (2) */
    /* USER CODE END */
    }
    
    /* USER CODE BEGIN (3) */
    /* USER CODE END */
    
    
    /*----------------------------------------------------------------------------*/
    /* Section Configuration                                                      */
    
    SECTIONS
    {
        .intvecs : {} > VECTORS
        .text    : {} > FLASH0 
        .const   : {} > FLASH0 
        .cinit   : {} > FLASH0 
        .pinit   : {} > FLASH0 
        .bss     : {} > RAM
        .data    : {} > RAM
        .sysmem  : {} > RAM
        
        FEE_TEXT_SECTION : {} > FLASH0 
        FEE_CONST_SECTION : {} > FLASH0
        FEE_DATA_SECTION : {} > RAM
    
    /* USER CODE BEGIN (4) */
    /* USER CODE END */
    }

  • Hi Fan,

    In linker command file, we tell the linker where to place the code, constants and RAM variables in memory.

    TEXT and CONST sections of the code will be residing in the FLASH0. DATA section is for FEE RAM variables. Code will be fetched from FLASH. Only data will be stored in bank7.

  • Dear Viswanath Reddy,

    Thanks a lot  for your reply.

    I still have other questions, please help to solve my confuse.

    I am studying "FEE guideline", also to mark the content that I feel confused.

    Please have this material.

    Thank you.

    Best Regards,

    Fan

    8156.Question.pptx

  • Dear Vishwanath,

    Excuse me to ask more questions.

    In FEE guideline,  it describes data block header is 24 bytes.

    But why in halcogen setting, the block size only 8 bytes, or data block header is not internal component of data block?

    Please help to solve my confuse.

    Fan

  • Hello Vihwanath,

    Could you continue to solve my questions?
  • Hi Fan,

    Every block has 24 bytes of block header. This information is required by FEE driver to know if the block is valid/invalid. Block header also contains block number, block size, CRC(if enabled), block counter(if enabled), previous address of current block. Block size of 8 bytes highlighted in pic if the useful information application can write. If application wants to write 8 bytes, in FEE bank, space occupied by the block would be 24+8=32 bytes. If block size is 100 bytes, block would occupy 24+100 = 124 bytes FEE bank.

    Regarding your questions in ppt,

    Page 1
    ->Device specific files means the files named Device_TMS570LS12.* which specify FEE bank space.
    ->Code generation tool mean compiler version.
    Page 2
    ->Project configuration has to take care such that size of all the configured blocks will never exceed the size of one virtual sector.
    ->FEE driver takes care of Erasing of sector. It is handled by TI_FeeInternal_FeeManager API.
    Page 3
    ->Same as page 2
    Page 4
    ->DS means data set. Please read FEE spec from Autosar. You will get details on data set usage.
    ->Block 3 is at many places to show that when ever application upodates data for a block, it is always written at next available empty space. The old block is marked as invalid.
    ->Block X and Block n are some random blocks.
    ->Arrows indicate that FEE does not allocate static place for blocks.
    Page 5
    ->This is required to know the erase status of the sector. Assume, you have configured two sectors. One is Active and other is ready for erase. During erase of sector, if there is power off. After power is turned ON, FEE will be able to know that erase status of the sector by checking this status.
    Page 6
    ->Please read FEE spec from Autosar. You will get details on data set usage.
    Page 7
    ->Assume application has written a block 5. Assume it gets written at address 0xF0200060. If application writes the same block 5 again with updated data, it will be written at next available free space. At this time, the block 5 at 0xF0200060 is marked as invalid. Also, address 0xF0200060 will be stored in current block header.
    Page 8
    ->Erase immediate and Invalidate block, both does same functionality.
  • Dear Vishwanath,

    Thanks a lot for your reply.

    Page 5
    ->This is required to know the erase status of the sector. Assume, you have configured two sectors. One is Active and other is ready for erase. During erase of sector, if there is power off. After power is turned ON, FEE will be able to know that erase status of the sector by checking this status. 

    Is this content(erase status) included in virtual sector header? I want to confirm erase status is a component of virtual sector header or not.

    Thanks.