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.

Flash Emulated EEPROM on TMS570LS3137

Other Parts Discussed in Thread: HALCOGEN

Dear experts

During the implementation I experience now a problem with the Flash Emulated EEPROM-library which is supported since HalCoGen 03.05.02


Here are  3 screenshots and 1 source-file that I will be referring to in my explanation:

  1. WriteAsync Settings.jpg: a bitstream of 104 bytes is written to EEPROM sector 2


  2. WriteAsync Crc.jpg: a bitstream of 4 bytes is written to EEPROM sector 3


  3. Read Settings & Crc.jpg: The Settings are read from EEPROM sector 2, the CRC is read from EEPROM sector 3


  4. settings.c: my source code which interfaces the ti_fee-library
    1263.settings.c

Explanation:

We use the EEPROM to store our configuration in one sector and some other information in another sector. The runtime-execution is as follows:



On startup of the system the function SETT_init is executed which does a TI_Fee_Init and then reads the stored settings using TI_Fee_Read. The bit-stream of the settings is extracted to a runtime-settings-structure with the function extrSetToStruct (no more FEE-interfacing, but I left it in the source-file for clarification).


When receiving a certain message over I2C then the new settings and CRC are written to EEPROM with the function SETT_writeSets. The idea is to store the settings in sector 2 and its CRC in sector 3




I’m having 3 issues:

It only works for the settings if I use it in that state as it is in the attached settings.c: before every write format the entire EEPROM (code: line 72), then write the new settings to its sector. The behaviour is funny though: the settings-bitstream is written correctly (code: line 79, screenshot 1: red 0114FF00 etc.). Also the CRC is written correctly (code: line 92, screenshot 2: red 12345678), added to it is again the configuration (screenshot 2: encircled olive-green).


On startup when the values from EEPROM are read then the settings can be read OK, the CRC is not read at all. I tried to visualize this in screenshot 3 where the variable crc should get the values 12345678 but remains on the initial 000000FF.


If I download settings again without having used TI_Fee_EraseImmediateBlock then the old values don’t get updated (which is good for wear-leveling) but also no new regions are regarded as sector 1 & 2 à the values are not written to EEPROM.




Can you provide me with information of how multiple bitstreams are stored in more than one sector in the Flash Emulated EEPROM? Or preferably: Could you tell me what is wrong with my implementation?









Thanks very much in advance,


Thomas Germann