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.

CCS/TMS570LS3137: How to Store Variable value into EEPROM or Flash memory of TMS570ls3137?

Part Number: TMS570LS3137
Other Parts Discussed in Thread: HALCOGEN

Tool/software: Code Composer Studio

Dear Sir,

I am referring datasheet of TMS570ls3137. I want to store ADC converted valued in EEPROM or Flash Memory. But For that i do not know which header file is available on TI Forum.  If you can provide any example related storing data into EEPROM and Flash memory. Thank you.

  • Hello Krunal,

    The HALCoGen is a nice tool to generate driver for Hercules MCUs. It also generates FEE drivers for EEPROM. HalCoGen also contains an example code of using EEPROM (init, read, write, etc).

  • Thank you sir for your given right direction. But we have older version halcogen  which is haclgoen 03.02.02 Now on TI website it is available version 4.07 and you have given screen short in that also it is like 4.06. So EEPROM Module is not available in the older version of the TI controller. If I have to update halcogen , Should I have to pay money for that? Thank you. 

  • Hello Krunal,

    It is free of charge.
  • Thank you. I update helcogen. Now EEPROM Driver is coming.
  • hi sir,

    Now i am able to see build FEE driver for EEPROM. But in that If i want to give value a=15, Than how can i write? i am not able to understand code. There will be two writing things in EEPROM code. Asynchronous and Synchronous write. Than o-Result will show the reading value. But Writnig into EEPROM Register that I am not able see. so can you help me out for these.

  • Hello Krunal,

    1. The EEPROM Emulation Flash bank is divided into two or more Virtual Sectors. Each Virtual Sector is further partitioned into several Data Blocks. A minimum of two Virtual Sectors are required for Flash EEPROM emulation.

    2. The initialization routine (TI_Fee_Init) identifies which Virtual Sector to be used and marks it as Active. The data is written to the first empty location in the Active Virtual Sector. If there is insufficient space in the current Virtual Sector to update the data, it switches over to the next Virtual Sector and copies all the valid data from the other Data Blocks in the current Virtual Sector to the new one. After copying all the valid data, the current Virtual Sector is marked as ready for erase and the new one is marked as Active Virtual Sector. Any new data is now written into the new Active Virtual Sector and the Virtual Sector which is marked as ready for erase will be erased in background.

    3. The Data Block is used to define where the data within a Virtual Sector is mapped. One or more variables can be within a Data Block based on the user definition. The smallest amount of data that can be stored within the Data Block is 64 bits. If the Data size exceeds 64 bits, the Data Packets are added in 64 bit increments. The Data Block Structure is limited to the size of the Virtual Sector it resides in. The data structure is defined in ti_fee_config.c

    4. Data is written and read by blocknumber. You can use CCS memory browser to view the data (real data + header).