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.

RM44L920: Fee driver configuration with two EEPs

Part Number: RM44L920

Dear Community,

we implemented the fee driver software version 1.19.4 (fee version 3.0.2) in our project for RM44L920 and configured it as follows:

We want to use two EEPs and for each EEP we have only one block (block size 97 and 128). The first EEP should use 14 out of 16 virtual sectors. The second EEP should use only the last 2 virtual sectors. Each virtual sector is mapped to one flash sector.

Question 1: Why do I have to select flash bank 1 for virtual sector 5?

It seems like the fee driver is not using 14 but just 2 virtual sectors for both EEPs. While debugging, I stepped over this code sequence found in several places:

if(0U == u8EEPIndex)
{
    u16Index=0U;
    u16Index1= (uint16)(TI_FEE_NUMBER_OF_VIRTUAL_SECTORS - TI_FEE_NUMBER_OF_VIRTUAL_SECTORS_EEP1);  
}
else
{
    u16Index = TI_FEE_NUMBER_OF_VIRTUAL_SECTORS_EEP1;
    u16Index1 = TI_FEE_NUMBER_OF_VIRTUAL_SECTORS;
}

while(u16Index < u16Index1)
{ /* do stuff */ }

Question 2: How should I configure the fee driver to get the desired behaviour?

  • Hi Samantha,

    I started working on your issue and will provide you an update ASAP.

    --
    Thanks & regards,
    Jagadish.

  • Hi Samantha,

    I configured as you mentioned:

    I could see proper values only for "TI_FEE_NUMBER_OF_VIRTUAL_SECTORS" and "TI_FEE_NUMBER_OF_VIRTUAL_SECTORS_EEP1".

    And we recently tested with 4 virtual sectors for one EEP.

    (+) TMS570LS1224: FEE specific questions - Arm-based microcontrollers forum - Arm-based microcontrollers - TI E2E support forums

    And we noticed one bug in the FEE driver on using more than two virtual sectors, that is on first iteration it is utilizing all the virtual sectors but after first iteration it is only using first two sectors only. So, please consider this.

    --
    Thanks & regards,
    Jagadish.

  • Hi Jagadish,

    thank you for your quick response!

    I can also see the proper values in the ti_fee_cfg.h file but if I check the variable TI_Global_Variables after calling TI_Fee_Init(), I can see that not all virtual sectors for first EEP have been assigned (see red arrows in picture):

    Additionally, I tested the behaviour and wrote several blocks to force a switch to the next virtual sector.
    In the first step, it switched from virtual sector 0 to virtual sector 1. After virtual sector 1 was written completely, it switched back to virtual sector 0 (see picture, sector 0 is active sector (0x04) and sector 1 is ready for erase (0x05)).

    Could you please check this behaviour on your side and answer question 1 from my initial post?

    Thank you very much in advance!

  • Hi Samantha,

    I don't have this board to test it but i discussed with my colleague, he is saying it will work for till 4 virtual sectors. But at the same time, it will work only for first iteration only and again it will end up with the issue i mentioned in below thread:

    TMS570LS1224: FEE specific questions - Arm-based microcontrollers forum - Arm-based microcontrollers - TI E2E support forums

    If you want the 4 virtual sector code i tested, then you can verify from below:

    FEE_TEST_WITH_FULL_LOAD_RM46.zip

    --
    Thanks & regards,
    Jagadish.

  • Hi Jagadish,

    Thank you very much for your support!

    Unfortunately, I think the issue in the thread you mentioned is not the one I try to point out.


    I erased the device with TI_Fee_Format(0x5A5A5A5AU) and initialized the driver with the configuration mentioned in my initial post. If I understand the other thread correctly, the first iteration through all virtual sectors should work. With my configuration, the driver should loop through VS1 -> VS2 -> VS3 -> VS4 -> ... -> VS14 for the first EEP.
    But I discovered the following behaviour with a clean device: VS1 -> VS2 -> VS1 -> VS2 -> VS1 -> ...

    After reading the code of the driver, I found the code section from my initial post. I believe that the driver is not using the parameters TI_FEE_NUMBER_OF_VIRTUAL_SECTORS and TI_FEE_NUMBER_OF_VIRTUAL_SECTORS_EEP1, correctly. My intention was to split the EEPROM in two EEPs but with uneven ratio. The first EEP should have more virtual sectors (and physical flash sectors) than the second EEP. We want this ratio because some blocks are updated more often than other blocks.

    But if I set TI_FEE_NUMBER_OF_VIRTUAL_SECTORS = 16 and TI_FEE_NUMBER_OF_VIRTUAL_SECTORS_EEP1 = 14 and if I read the loop from my initial post correctly, the while loop will be executed exactly twice for the first EEP (u16Index = 0, u16Index1 = 2) and the second EEP (u16Index = 14, u16Index1 = 16). Am I wrong?

    I found this code sequence in several place. For example in TI_Fee_Init() where the driver will not search for active virtual sectors in VS3 till VS14.

    Do you know if there's an update of the driver planned for any of these discoveries?

  • Hi Samantha,

    First of all, apologies for the delay in our response, it is because of we are on vacation.

    With my configuration, the driver should loop through VS1 -> VS2 -> VS3 -> VS4 -> ... -> VS14 for the first EEP.
    But I discovered the following behaviour with a clean device: VS1 -> VS2 -> VS1 -> VS2 -> VS1 -> ...

    Actually, in the thread i am pointing we tested with only one EEP and not with two EEP's. And i don't have this board to test it. Can you please test with only one EEP instead of two and see whether the first iteration is working properly or not for the single EEP.

    --
    Thanks & regards,
    Jagadish.

  • Hi Jagadish,

    Thank you again for your reply. I was on vacation myself.

    I tested as you suggested. For that I changed the following parameters and created a big block to fill the virtual sectors quickly:

    #define TI_FEE_NUMBER_OF_EEPS                                 1U       // before 2U

    #define TI_FEE_NUMBER_OF_VIRTUAL_SECTORS_EEP1               0U       // before 14U

    With this configuration I can see that all virtual sectors are used in the first run. Therefore, the first iteration is working properly. Afterwards, the behaviour as mentioned in the other thread is visible.

    Best regards,

    Samantha Schadwinkel

  • Hi Samantha Schadwinkel,

    So, it could be due to having multiple EEPS. 

    I will note this issue for future correction, is it possible for your application to use single EEP with two virtual sectors like as most of the customers use case.

    --
    Thanks & regards,
    Jagadish.