The FlashStorage_STM32 library, inspired from Cristian Maglie's FlashStorage, provides a convenient way to store and retrieve user's data using emulated-EEPROM, from the non-volatile flash memory of STM32F/L/H/G/WB/MP1.
The flash memory, generally used to store the firmware code, can also be used to store / retrieve more user's data and faster than from EEPROM. Thanks to the buffered data writing and reading, the flash access time is greatly reduced to increase the life of the flash.
Currently supported Boards
STM32F/L/H/G/WB/MP1 boards with / without integrated EEPROM
I have a blue pill with chinese CS32F103C8T6 in it. EEPROM write (commit and put) works only after I completely erase the chip using STM32CubeProgrammer. Once there is any data other than 0xFF in any location, it will no longer write to any location. Every sample programs failed, after the initial run in that chip. Everything is working as it should on my other bluepill with Genuine (I hope) STM32F103C8T6.
I really don't know what wrong with it: the chip (I guess) or hardware design.
Add support to new STM32L5 and many new STM32F/L/H/G/WB/MP1 boards
Debug Terminal Output Samples
The following is the sample terminal output when running example MQTT_ThingStream_Ethernet_STM32_LAN8720 on BLACK_F407VE board with LAN8720 Ethernet & STM32Ethernet Library demonstrating FlashStorage_STM32 feature to be used to store persistent data.
1.1. Without correct ThingStream MQTT Credentials. Enter Config Portal