When a power interruption occurs during Em_EEPROM_Write processing, the corresponding Row may be filled with 0xFF. In this state, Em_EEPROM_Init processing might not be returned after PSoC4 is restarted. I can't find any process in Em_EEPROM_Init that causes an infinite loop.
The configuration of EEPROM is as follows.
- Component v2.20
- Size: 64 bytes (actual size: 128 bytes)
- Redundant Copy: No
- Wear Level Factor: No
KBA228069 patch is not applied to the project of PSoC Creator yet. It mentions the FindLastWrittenRow function called in Em_EEPROM_Init. Will adding this patch avoid an infinite loop?
Unstable power supply during Em_EEPROM_Write causes the corruption of not only the row it is writing, other rows may also be effected. So it is required to reprogram the device after flash corruption. Can you also compare the hex file after corruption and before corruption. You can read hex from the device using PSoC Programmer.
Thank you for your reply.
Sorry, but there was an incorrect information of the size. It should be as follows.
- Size: 256 bytes (actual size: 512 bytes)
Em_EEPROM has 4 Rows, one of which is filled with 0xFF (128 bytes: Header(64B) + Data(64B)). It looks like there is no change in the area other than Em_EEPROM in Flash.