2026-01-22 8:50 AM
Dear ST members,
My application is using the EEPROM emulated library (X-CUBE-EEPROM) with an STM32WB microcontroller. I noticed that, when I update a variable, the page can be padded with random zeros. Attached are screenshots of the page before and after two variables were updated.
I initially thought this could be unused variables, since we need to define the NB_OF_VARIABLES. Even reducing its value to match the number of variables I am using, the random zeros are still added to the page. The AN4894 says there is a wear levelling algorithm but this is the worst I have ever seen on an emulated EEPROM implementation. This makes it difficult to calculate the erase cycles I will need for my application.
Can you clarify where these random zeros are coming from and if I can get rid of them?
Regards