MSPM33-SDK: EEPROM emulated management and addresses

Part Number: MSPM33-SDK
Other Parts Discussed in Thread: MSPM33C321A,

Hello,

My question is about the µc MSPM33C321A.

I have a misunderstanding concerning EEPROM emulated management with accessing addresses.

The EEPROM emulated memory is stored in Data flash at start address : 0x80000000 with length of 32KB.

in linker file, this memory is defined like this:

DATA            (R)   : origin = 0x80000000, length = 0x00007FFF
 
But the access must not be done directly to these addresses but to addresses 0x00002000.
That means, when the SW writes at address 0x80000000, it shall writes at address 0x00002000, and after the µc "copy" to address 0x80000000, right ?
 
But if the SW read at address 0x80000000, it should read at this address or should read at 0x00002000 (or both are possible) ?
 
Thanks
  • Hi 

    I will reply this question tomorrow

  • Hi Sebastien Le Diouri

    No, the software does not directly write to or copy data between those addresses yourself; instead, the MSPM33-SDK EEPROM Emulation library abstracts all of this underlying physical memory management for you. https://software-dl.ti.com/msp430/esd/MSPM0-SDK/latest/docs/english/middleware/eeprom/api_guide/html/index.html
    Here is exactly how the interaction between your RAM buffer (0x00002000) and the physical Data Flash (0x80000000) functions during reads and writes:
    1. How Writing Works
    You do not manually write to 0x80000000 or expect the microcontroller to copy it later.
    • The Process: When you modify a variable or data structure in your code, you update it within its assigned RAM location (which, based on your linker context, sits within the RAM region starting around 0x00002000).
    • The Flash Save: To permanently store this data into the high-endurance Data Flash, you call an SDK library function, such as EEPROM_TypeA_save(). The library will then handle the underlying hardware requirements, process any headers/wear-leveling routines, and physically commit the variables to the Data Flash space starting at 0x80000000. https://www.ti.com/lit/pdf/slaae58 
    •  MSPM0G3519: EEPROM emulation in DATA bank 
    2. How Reading Works (Where to read from?)
    When the system is running, your software should read the data directly from the RAM address (0x00002000 area). www.ti.com/.../slaae58
    • Why? Flash memory is slow to access directly during complex operations and has limited write/erase cycles. Reading from RAM is significantly faster and more power-efficient. https://www.ti.com/lit/pdf/slaaeb4
    • When do you read from Flash (0x80000000)? The only time the software reads directly from the physical Data Flash region is during system startup (boot-up). Upon boot, your initialization routine calls EEPROM_TypeA_init(), which scans the Data Flash region (0x80000000), locates the most recent valid record, and copies it back into your working RAM buffer at 0x00002000. After initialization completes, your application ignores the 0x80000000 address space and interacts purely with RAM.  

    Thanks

  • Hello Xiaodong,

    thanks for these details, so for reading, we have to read at address 0x00002000.

    Thanks