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.

Need a way to delete and reinit the FEE-Module

Hi,

we increased the size of one block of the FEE-Module because the struct which should be written to this block increased. After we did this the controller crashes during TI_Fee_Init().

Now we need a way to completely delete all eeprom-content so we can change the size afterwards and have a "fresh" eeprom to write the new blocks into.

Regards,

Frank

PS: Function-call-trace. (the crash happens in the last line of this)
->TI_Fee_Init()
    ->TI_FeeInternal_UpdateBlockOffsetArray(u8EEPIndex, (boolean)TRUE,TI_Fee_GlobalVariables[u8EEPIndex].Fee_u16ActiveVirtualSector);
      {
        (..)
        u32BlockStartAddress += (((TI_FEE_BLOCK_OVERHEAD >> 2U)-1U) << 2U);        
        /*SAFETYMCUSW 94 S MR:11.1,11.2,11.4 <REVIEWED> "Reason -  Casting is required here."*/
        ppu32ReadHeader = (uint32 **)&u32BlockStartAddress;                                
        u32BlockNumberTemp = **ppu32ReadHeader;

  • Hello Frank,

    I have forwarded your question to our FEE expert and they will respond soon.

  • Hi Frank,

    I assume that the block was already written into Flash and then the configuration has changed the block size.

    Fee driver does not support this.

    What you can do is reconfigure the block with old block size, Invalidate it, change the block size and rewrite the block.

    OR

    Reconfigure the block with old block size and after executing TI_Fee_Init, call TI_Fee_Format to completely erase all the configured sectors. You can then write new blocks.

    Regards,

    Vishwanath Reddy.

    If my reply answers your question please click on the green button "Verify Answer"

  • Hi Frank,

    Please use only second option.

    -Reconfigure the block with old block size.

    -Call TI_FeeInit

    -Call TI_Fee_Format(0xA5A5A5A5U);

    -Now you can reconfigre the new blocks and again flash the software.

    Regards,

    Vishwanath Reddy.

  • Hi Vishwanath,

    directly tried the second option and it worked great. But this option ist very uncomfortable if we want to deliver a firmware update where blocksize changed to our customers later. In this case we would actually have to deliver two firmware updates, one to format the FEE and after this the new firmware.

    Is there any way to format the EEPROM before calling TI_FeeInit?

    Regards,

    Frank

  • Hi Frank,

    As of now, we do not have any such API but we can consider implementing a new API/modifying existing API.

    Also, could you send me the configuration files(old and new) where you got problem?

    Regards,

    Vishwanath Reddy.

    If my reply answers your question please click on the green button "Verify Answer"

     

  • Hi Vishwanath,

    it would be really nice if you could add this feature to the release of the FEE-Driver for RM48. Otherwise we would have to give every customer 2 firmware updates every time we have to changed anything in the EEPROM.

    We didn't change very much but the change which causes the problem were done in ti_fee_Cfg.c. We changed the block size of every block in

    const     Fee_BlockConfigType     Fee_BlockConfiguration[]

    to "sizeof(structWeWantToSave)". Some weeks after we've seen that we forgotten some variables in one of the struct and added them. Afterwards the RM48 crashed while initialization because of the incompatible block size. We tried to change the blocksize to "sizeof(structWeWantToSave)-4" (we added 2 uint16 variables) and the chip started again so we assume that the problem is the changed block size only.

    It would be nice if FEE-Driver would detect a change in a single block size and only delets the changed block(s) without changing the not changed ones.

    Regards,

    Frank

  • Hi Frank,

    Regarding the erasing of the data, we will take it as new requirement.

    Regarding the change in block size, we will have to discuss this internally.

    Regards,

    Vishwanath Reddy.

    If my reply answers your question please click on the green button "Verify Answer"