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.

TMS320F28388D: TMS320F28388D - How to use onboard Flash memory as EEPROM?

Part Number: TMS320F28388D
Other Parts Discussed in Thread: TMS320F28044, , C2000WARE

Tool/software:

I found a way to use onboard flash memory as EEPROM in the document below.

EEPROM Emulation for Gen 2 C2000 Real-Time MCUs (Rev. A)

In the document it is mentioned that it supports only below C2000 devices.

Generation 2 refers to the following C2000 devices: TMS320F281x, TMS320F280x, TMS320F2823x, TMS320F2833x, TMS320F2802x, TMS320F2803x, TMS320F2805x, TMS320F2806x, and TMS320F28044.

1. Don't you support EEPROM emulation on TMS320F28388D?

2. Can we follow below document for EEPROM Emulation? this is for different controllers.

We found the document "FLASH EEPROM Emulation from Simulink® – (F2837x)" from GitHub - mathworks/reference-examples-TIC2000

3. Can we follow the document "FLASH EEPROM Emulation from Simulink® – (F2837x)" from GitHub - mathworks/reference-examples-TIC2000 for EEPROM emulation on the TMS320F28388D?

4. Can we use sector 12 for EEPROM emulation?

In this document (FLASH EEPROM Emulation from Simulink® – (F2837x)), it is mentioned that sector 13 is reserved for EEPROM emulation. However, there is no limitation mentioned in the datasheet preventing the use of sector 12 for EEPROM emulation.

5. Could you please share EEPROM emulation example code for TMS320F28388D controller and the EEPROM specifications (Page, block, etc..)

  • Hi Vikram,

    Please see this document for an explanation of EEPROM Emulation on Gen 3 C2000 MCUs. As of right now, there is no EEPROM Emulation example project for F2838x in C2000Ware, but the document explains the implementation on other Gen 3 C2000 devices and how to port to another device. 

    I am not familiar with the GitHub implementation you are referring to, but if it achieves the results you need then you can use that as a reference.

    Yes, you can emulate EEPROM in sector 12 of flash memory. I believe the document is saying that sector 13 is reserved for EEPROM emulation in that specific project.

    Kind regards,

    Skyler

  • Thank you for your quick response.

    I have read the document you shared in the previous answer. I have a few more queries related to EEPROM emulation.

    As per my understanding, there are two different methods to program EEPROM.

    1. Page Programming

    2. 64-Bit Programming

    To write 3KB (considered this size for demonstration) of data from a RAM buffer to an EEPROM, which method of programming will be more suitable?

    1. 64-Bit Programming

    API - EEPROM_Program_64_Bits(4, Write_Buffer);

    How can we write 3KB of data using the above API?

    Can I use EEPROM_Program_64_Bits(<3KB size>, Write_Buffer) or do I need to write 4 bytes in each loop and iterate the loop until the size reaches 3KB?


    2. Page programming

    API - EEPROM_Write(Write_Buffer);

    Do I need to adjust the page size according to the data to be written to EEPROM in one go so that the next data will be stored on the next page?

    What is the best approach to decide the page size? 

    If I consider a page size where the data does not fit in one page, what will happen?

  • Hi Vikram,

    1. No, you cannot use EEPROM_Program_64_Bits(<3KB size>, Write_Buffer) with the current implementation. The 64-bit programming mode can only program 64-bits at once. So you will have to write 4 bytes in each loop until 3KB has been written.

    2. If the data doesn't fill up a page, the remainder of the page will be filled with all 1's. In general, you should pick a page size that can contain the data you wish each page to represent. If all of the data does not fit in one page, the behavior will depend on how you load the Write_Buffer. 

    Kind regards,

    Skyler