Safest persistent storage against corruption? (EEPROM or Flash?)

I am designing a system which requires persistent storage of a password and am worried about potential corruption.

The 100 000 cycles of the EEPROM is not a limitation, as the product will only need to write a fraction of that amount over its lifetime. However, it will be powered on and off quite often (on the order of 1000 power cycles) and I am worried that this may corrupt the memory. The board (currently the Due, but will likely switch to a different board) is powered through a LM2596 converter from a solar panel.

Is this a realistic problem? Is it safer to write to Flash instead? (For example using a library like this: GitHub - sebnil/DueFlashStorage: DueFlashStorage saves non-volatile data for Arduino Due. The library is made to be similar to the EEPROM library.) Am I unnecessarily worried or is this a potentially huge issue?

Would love to hear any input or advice, and what experiences others have with similar problems.


Either would work. I would suggest keeping several copies of the password in storage, then compare them to check for errors as part of the read process in your code. If you have an error select one of those that match. You could also do this with a checksum. You will have a lot of memory available.

You can opt for a flash/sram hybrid


Non-volatile, and writes almost as fast as RAM