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
In total, there are six functions. The first four functions are called directly by the user. The last two functions are called by these functions.
The high-level software flow is shown in Figure 3-1. The device should first go through the initialization code. By calling EEPROM_TypeB_init, it will search active group and check the format of Flash. If active group exists, the global variables are updated to trace the active group and latest data item. If active group does not exist, flash will be initialized.
In the application, user can use EEPROM_TypeB_readDataItem to read the data according to the input identifier. And user can use EEPROM_TypeB_write to write data and identifier. If the group is full, the latest data items are transferred to next group. After transfer, the full group will be marked as Erasing with setting the erase flag. In the flow chart below, EEPROM_TypeB_eraseGroup is called immediately when the erase flag is set. Users can select the appropriate point in time to erase based on the requirement of application.