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.

Is there any way to save persistent data on the TMS570's memory?



Hi all, 

I wondered if exist any driver or file system library available for the TMS570 that can be used for open, read and write a  text file in a non volatile memory region, where the created file wont be erased after a hard reset.

I need to persist some data during run time and read it after a soft/hard reset.

Btw: I'm running a baremetal application, with the drivers generated by HalCodeGenerator.

Thank in advance.

Regards!

Sebastian

  • Sebastin,

    We do have F021 API's which can be used to program the Flash which gets retained after a hard reset.

    Pls find the relevant documentation in this link.

    There are some restrictions on how much times the Flash could be erased and programmed, if this is going to be frequent and the data stored is small, then we recommend using Bank-7 EEPROM emulation, drivers are available for the same as well for TI FEE.

    Hope this helps.

  • Hi!

    I do know how to flash the device, actually, I'm using Code Composer Studio to achieve this, and I don't need to reprogram it while running.

    As I mentioned before, I need that the program on the TMS570 can write and read TEXT files in a non volatile memory region, let say, like a log file.

    The F021 Flash Application Programming Interface (API) provides a software library of functions to program, erase, and verify F021 on-chip Flash memory

  • Hi Sebastian,

    I think the point that Karthik is making is that the only non-volatile memory on the TMS570 is flash memory so yes, it appears that you do need to reprogram it whilst running. The F021 flash API provides the low level functionality to write to flash and I agree with Karthik that the emulated EEPROM area is the best section to use if it is big enough (64 Kbytes). However you will need to manage the erasing of segments and the writing of data.

    If you want to add external hardware there are other ways of storing data for example using an SPI Flash device or FRAM.

    Whichever way you go, I suspect you will need to write your own driver.

    Regards,
    Richard

  • Sebastin,

    I believe you are looking for drivers to support file handling which would in turn use Non-Volatile memory. On quickly checking with folks from Flash library team, we do not have support for file handling drivers.

    As mentioned in my earlier post, yes F021 API helps you to erase/program the Flash(which is the only non-volatile memory inside the device). Bank-7 is split in to multiple regions to support EEPROM emulation which in turn is dedicated to store data on to non-volatile memory in parallel while code execution is happening on the main banks. Using FEE drivers help in reducing the number of erase cycles on a single sector extending the life time of the part.

    Thanks Richard for helping out.