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.

Permanent data storage for high access rates (F021 alternatives)

Other Parts Discussed in Thread: RM46L852

Hey,

I am using a RM46L852 for a Battery Management System. In order to calculate the state of charge of the battery I need to store the integrated value of the battery current. This has to be updated every 500ms and needs to be stored even if the system is powered off.

I currently use the EEPROM emulation with the F021 API. But as I have to do erase/write operations every 500ms I will soon reach the maximum erase/write cycles of the flash memory. What would be the best method to save the data?


Thanks in advance,

Timm

  • Hello Timm,

    Do you have a deterministic shut down sequence for RM46 ? In that case we recommend you store the last calculated value in EEPROM prior to powering down the part, so that on every fresh boot you can use the reference value to start with and use the RAM for storing all the intermediate integrated values every 500ms.

     

  • Hi Karthik,

    thanks for your answer! Unfortunately the shut down sequence is non deterministic and not predictable. The device may power down at any time during code execution without prior notice.

    Greetings,

    Timm

  • There are a number of external devices that could fit the bill here, accessible over SPI and/or I2C.  External EEPROMs might fit the bill, TI's own FRAM is available (Cyprus Semiconductor makes the chips though I believe) with practically unlimited rewrite cycles... if a Flash based system is doable perhaps an external SD card accessed over SPI would work?

  • Hi Timm,

    What is the size of the data you are writing each time?

  • Hey guys,


    one external solution would be an external SD card that is connected to another Microcontroller that is connected to the RM46 via SCI. But as this is a long communication chain, not very fast and error prone I would first like to check if there is another (internal) solution. There are no other external components available to store data.


    The data is only one sint64 variable.

    Greetings,

    Timm

  • Hi Timm,

    The number of write/erase cycles specified in the datasheet is influenced more by the erases.  If you used a simple progressive write algorithm, I think you can get more than enough writes to support your data needs.

    Example:

                    Address              data

    1st write 0xF0200000    0x01234567

    2nd write 0xF0200008    0x89ABCDEF

    etc.


    So on the RM46L852, Bank 7 is 4 - 16k byte sectors which would allow you to write 8192 time before any sector needs to be erased.  Therefore with that bank specified to 100K w/e cycles, that gives you 819,200,000 writes before you start to exceed the datasheet spec.  Without accounting for erase overhead,etc, I roughly figure you can write continuously every 500ms for at least the next 12 years.

  • Hi John,

    I haven't thought of that. Excellent idea, I will try this!


    Thanks,

    Timm