X-CUBE-EEPROM software package, fills in zeros into emulated EEPROM on every reset.
I am using STM32L476, and I downloaded X-CUBE-EEPROM software package, included it into my project and it works fine. But I am noticing that after every reset it writes dummy word of all 0. CRC + Vaddress +Data... all 32 bits are zeros.
That write is issued from EE_Init() Step 8. Here is code snippet.
/*********************************************************************/
/* Step 8: Perform dummy write '0' to get rid of potential */
/* instability of line value 0xFFFFFFFF consecutive to a */
/* reset during write here */
/* Only needed if recovery transfer did not occured */
/*********************************************************************/
if (recoverytransfer == 0U)
{
status = VerifyPagesFullWriteVariable(0U, 0U);
/* The dummy write can be skipped in case pages are full
because in this case potential instability can not happen */
if ((status != EE_OK) && (status != EE_PAGE_FULL))
{
return EE_WRITE_ERROR;
}
}Function VerifyPagesFullWriteVariable(0U, 0U); writes dummy 0’s.
Why is this done every reset? It slowly fills up my EEPROM with 0. It happens even if page is still in Active mode and there is a plenty of space to store new data in. There was no need for transfer.
This is how my EEPROM memory looks. I have some data with data zero values in first two locations, and next two locations are all zeros. And it keeps adding all zeros after every reset.

