Using Flash as EEPROM

I've found 2 different libraries to implement this:

FlashAsEEPROM
FlashStorage

I already know they're accessed in different ways, but Is there any significant difference in their implementation ?

How is this interconnected (where is the FLASH)? What processor are you using. With that information you might get an accurate answer.

Seeeduino Xiao SAMD21 using the built-in flash, no eeprom available

A domingo, 24/12/2023, 20:22, gilshultz via Arduino Forum <notifications@arduino.discoursemail.com> escreveu:

So What is your question? I use FRAM, it is fast and inexpensive. Nice thing about it can be obtained as a I2C or SPI or parallel interface.

1 Like

Maybe a link to the library in question will make it easier for the forum helpers to understand the question:

@pjrebordao already explained it, but it seems to have been missed so I'll emphasize that this is about using the flash memory in the microcontroller for non-volatile storage; not about using an external storage device.

@pjrebordao are you certain they are two different libraries? The "FlashStorage" library contains a header file named FlashAsEEPROM.h:

A common error in the Arduino community is referring to header files as "libraries". A library is package of code that may consist of multiple header files. It is incorrect to refer to each of those header files as a separate library. Even though it is a common convention for one of the header files to have a name similar to the library name, you should not assume that the header filename is the library name.

Thanks @ptillisch
It's in fact the same lib with several headers.
As for the original issue that prompted this, it's solved.

A hardware reset was making my stored variables disappear, but an EEPROM.commit() was missing...

Thanks

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.