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.

RM46L852: FEE driver questions

Part Number: RM46L852
Other Parts Discussed in Thread: HALCOGEN

Hello,

We are using F021 FEE librabry for our project. 

Configuration done in Halcogen,

we do have following queries.

1. How One can change the Virtual Sector run time? We want to write to one virtual sector and for the next write we want to move to next virtual sector and continue this in circular fashion. So that all sector are used evenly.

2. How can we get the write/erase count for each sector?

3. while writing or erasing any sector, if power fail occur then on next restart how can we maintain the last virtual sector?

  • Hi Pramod,

    Copying of data from one virtual sector to another is taken by FEE driver. Projects need to configure the number of sectors to be used. For example, if projects configure 4 virtual sectors, FEE will first use sector 1. Once the sector 1 is full, it moves the latest data to sector 2. Once sector 2 is full, data is copied to sector 3 and then to sector 4. Once sector 4 is full, data is moved to sector 1 and this process continues. This process will take care that all the sectors are evenly used.

    There is no API to return the sector write/erase count. However, we store it as part of sector header.

    FEE driver is designed to recover from any powerloss situations.
  • Thank you Vishwanath for prompt response.

    What happen if Erase count found above 10000? Does TI FEE driver generate an exception?
  • Vishwanath,

    one more query,

    we have used to provide following function to write the configured sector.
    int j;
    int k;
    char SpecialRamBlock[8];
    for(k=0;k<20;k++)
    {
    for(j=0;j<512;j++)
    {
    for(i=0;i<8;i++)
    {
    SpecialRamBlock[i] = rand();
    }
    FEE_WriteSector();
    }
    }

    void FEE_WriteSector(void)
    {
    /* Write the block into EEP Asynchronously. Block size is configured in ti_fee_cfg.c file. Default Block size is
    8 bytes */
    BlockNumber=0x1;
    TI_Fee_WriteAsync(BlockNumber, &SpecialRamBlock[0]);
    do
    {
    TI_Fee_MainFunction();
    delay();
    Status=TI_Fee_GetStatus(0);
    }
    while(Status!=IDLE);
    }

    what we have observed,
    1. FEE driver increment the erase count for each sector on first pass.
    2. but when we write the sector multiple times, FEE driver update the value and increment the Erase count only for sector 1 and 2 and doesn't increment it for other two sector.
  • Another Query,

    I have defined data memory section ( 8 byte)in linker command file and writing that data into bank7 FEE sector during run time on particular event basis. Currently block size is configured as 8 byte in halcogen generated code.

    In future, I would like to increase OR add more different data section in linker command file.

    Does the TI fee driver support to write more than 8 byte ? if Yes, Do we change it easily?

    How one can merge data defined in Different data section into the single memory copy before writing it to FEE using FEE driver?

    Please answer all the questions
  • Hi Pramod,

    Sorry for the delay, I was on vacation last week.

    Below are answers:

    -> Bank 7 has 100000 write/erase cycles. If you using 4 physical sectors as 4 virtual sectors, you would then get 4*100000 W/E cycles.
    When FEE is unable to erase a sector, it will report it through an error Error_EraseVS. Write's will not be accepted but reads will continue to return the data. No exception would be raised from driver.

    ->FEE will increment the sector count only after it has erased and written a sector header. Sector count will not be incremented for every block write. Every block has it's own write counter as part of its header.

    ->FEE driver always writes only 8 bytes for one write request. I did not understand your question on linker command file/merging data defined in different sections.
  • Thanks for reply.

    I agree Control writes only 8 bytes per request because we configured block size 8 byte max in halcogen.

    but if i want write more bytes, can we increase the block size ? For Example, if i want to write the 32bytes into FEE, configured FEE as per below, how program works?

    in future, we might need to increase the block size, does the fee driver support if only block size changed? 

  • Hi,

    Yes, block size can be of any length. Details about the block size are given in user guide. Please look in to "TI FEE User Guide.pdf". This is normally available at C:\ti\Hercules\HALCoGen\v04.06.01\Docs.

    Block size cannot be increased once it's written.