Skip to main content
RMala.2
Associate
January 23, 2023
Solved

X-CUBE-EEPROM Is it possible to remove routine which writes 64bit zeros on every restart of the device? (It writes 64bits of 0 during EE_Init - due to data recovery mechanism).

  • January 23, 2023
  • 3 replies
  • 1971 views

I am using X-CUBE-EEPROM software to emulate EEPROM in flash memory of the MCU.

It is running on STM32G070RB. This MCU has endurance only 1 kcycle.

We would like to store only a few variables (about 10) to the virtual eeprom. I expect that the main application will modify these variables only couple of times.

I found that the zeros (64bits) are written to the emulated eeprom on every restart during EE_Init (due to data recovery mechanism). It doesn't matter if the EE_Init is called with EE_FORCED_ERASE or EE_CONDITIONAL_ERASE. And it doesn't matter if some eeprom variable was modified from the last restart.

Is it possible to remove writing of the zeros on every restart? E.g. If the device didn't modified any eeprom variable from the last restart? It means that there are already zeros from the last restart at the end of the virtual eeprom and they can be used for recovery mechanism if it would needed. Why it is necessary to write additional 64bit zeros?

It can wear the emulated eeprom because too many restarts during lifetime of the device.

This topic has been closed for replies.
Best answer by Peter BENSCH

Welcome, @Roman Malachovský, to the community!

I would like to take this opportunity to draw your attention to the same question that was answered some time ago.

I hope I was able to help a little?

Regards

/Peter

3 replies

Peter BENSCH
Peter BENSCHBest answer
Technical Moderator
January 23, 2023

Welcome, @Roman Malachovský, to the community!

I would like to take this opportunity to draw your attention to the same question that was answered some time ago.

I hope I was able to help a little?

Regards

/Peter

RMala.2
RMala.2Author
Associate
January 23, 2023

Thank you @Peter BENSCH​ ,

I didn't find this topic on community before. That's why I created a new topic.

Thank you for the link to the answer.

I will ask on that thread.

Thank you and best regards,

Roman.

Peter BENSCH
Technical Moderator
January 23, 2023

Great!

If the problem is solved (here), please mark this thread as answered by selecting Select as best, as also explained here. This will help other users find that answer faster.

Good luck!

/Peter