SLAAEN3A February   2025  – August 2025 MSPM0C1103 , MSPM0C1103-Q1 , MSPM0C1104 , MSPM0C1104-Q1 , MSPM0C1105 , MSPM0C1106 , MSPM0C1106-Q1 , MSPM0G1105 , MSPM0G1106 , MSPM0G1107 , MSPM0G1505 , MSPM0G1506 , MSPM0G1507 , MSPM0G1518 , MSPM0G1519 , MSPM0G3105 , MSPM0G3105-Q1 , MSPM0G3106 , MSPM0G3106-Q1 , MSPM0G3107 , MSPM0G3107-Q1 , MSPM0G3505 , MSPM0G3505-Q1 , MSPM0G3506 , MSPM0G3506-Q1 , MSPM0G3507 , MSPM0G3507-Q1 , MSPM0G3518 , MSPM0G3518-Q1 , MSPM0G3519 , MSPM0G3519-Q1 , MSPM0H3216 , MSPM0H3216-Q1 , MSPM0L1105 , MSPM0L1106 , MSPM0L1116 , MSPM0L1117 , MSPM0L1227 , MSPM0L1227-Q1 , MSPM0L1228 , MSPM0L1228-Q1 , MSPM0L1303 , MSPM0L1304 , MSPM0L1304-Q1 , MSPM0L1305 , MSPM0L1305-Q1 , MSPM0L1306 , MSPM0L1306-Q1 , MSPM0L1343 , MSPM0L1344 , MSPM0L1345 , MSPM0L1346 , MSPM0L2227 , MSPM0L2227-Q1 , MSPM0L2228 , MSPM0L2228-Q1

 

  1.   1
  2. 1Description
  3. 2Required Peripherals
  4. 3Design Steps
  5. 4Design Considerations
  6. 5Software Flow Chart
  7. 6Application Code
  8. 7Additional Resources
  9. 8Revision History
  10.   Trademarks

Design Considerations

  1. There are three user-configurable parameters in eeprom_emulation_type_b.h. These parameters can be configured accordingly, depending on the requirements of the application. To set appropriate parameters, see the application aspects section in the EEPROM Emulation Type B Design application note.
    1. Number of groups: at least 2
    2. Number of sectors in one group: at least 1
    3. Sector address
  2. The number of data items is directly related to the number of sectors in the group.
    Equation 1. Number of data items = Sector size Data item size × Number of sectors in one group - 1

    Choosing the correct number of data items is critical. The point is to choose based on how many variables the application needs to store. If the number of variables is close to the number of data items, the transfer occurs frequently when updating the values of those variables. If the number of variables is much less than the number of data items, this means that the size of the group is relatively large, and additional time is spent in operations such as transfer, erasure, and search.

    The recommended number of identifiers is one-half to one-third of the maximum number of data items.

  3. To evaluate the Flash usage and cycling capability, see the application aspects section in the EEPROM Emulation Type B Design application note.
  4. Data corruption is possible in case of a power loss during EEPROM_TypeB_write or EEPROM_TypeB_eraseGroup.

    To detect and recover from the corruption, implement EEPROM_TypeB_init. Call EEPROM_TypeB_init immediately after power up. EEPROM_TypeB_init checks the header of all the groups to confirm whether data storage of EEPROM emulation is correct.

    In the structure of EEPROM emulation, headers show the status of corresponding groups. There are four states in total. The changes between the four states are described in detail in Section 3.