SLAAEB4 april 2023 MSPM0G1105 , MSPM0G1106 , MSPM0G1107 , MSPM0G1505 , MSPM0G1506 , MSPM0G1507 , MSPM0G3105 , MSPM0G3106 , MSPM0G3107 , MSPM0G3505 , MSPM0G3506 , MSPM0G3507 , MSPM0L1105 , MSPM0L1106 , MSPM0L1303 , MSPM0L1304 , MSPM0L1304-Q1 , MSPM0L1305-Q1 , MSPM0L1306 , MSPM0L1306-Q1 , MSPM0L1343 , MSPM0L1344 , MSPM0L1345 , MSPM0L1346
The function is used to initialize the EEPROM emulation. It should be done once before using EEPROM emulation, for example after the device is powered up. This ensures that the relevant Flash area is properly formatted and global variables are correctly assigned.
The software flow is shown in Figure 3-7. Firstly, it searches the active group and checks the format by iterating over all group headers. If active group exists, it will erase other groups and transfer the active group. If active group does not exist, all groups are erased.
Figure 3-8 and Figure 3-9 shows different cases for EEPROM_TypeB_init. A is a normal case. B is the initialization after power down during transfer. C is a case where Erasing groups is not erased. D is case where all groups are empty. E is the case with invalid data.
The output of the function is the operation states. Besides, gActiveGroupNum and gActiveDataItemNum are updated to trace the active group.