2021-08-16 02:25 AM
Hi! I want to have a file system on my EEPROM memory, that would be power resilient and take care of wear-leveling. I understand there are two major systems out there, SPIFFS and LittleFS, but I only find examples on ESP8266, nothing for L0 series. I tried to port SPIFFS myself, but I get Hard_Faults trying to write the file, I guess I configured it wrong, or it's something else. Any idea? Or maybe someone can recommend me something else? It can't be FIFO file system, since it won't be used just for logging.
2021-08-16 02:53 AM
SPIFFS and LittleFS are file systems for Flash memories, while the STM32L0 family is based on EEPROM technology. The EEPROM data memory offers an endurance of up to 100kcycles over the temperatur range of -40...+105°C and can be written or deleted byte by byte.
What number of write cycles would you expect?
Do you really need a file system to manage 6KB of EEPROM data?
Regards
/Peter
2021-08-16 03:15 AM
It doesn't have to be a sophisticated file system, but power-resilience is a requirement and wear-leveling would also be nice to have.
Apart from being byte-by-byte memory and not block access memory, I don't see why SPIFFS wouldn't do the trick- Apart from memory requirements, of which I am not aware since I haven't found any.
2021-08-16 04:07 AM
Please keep in mind that SPIFFS and LittleFS are aimed at flash memories whose deleted bits have the value logical 1, while the data EEPROM in the STM32L0 has the value 0 there. For this reason, e.g. the SPIFFS Github page also says: An erase will reset all bits in block to ones, Writing pulls one to zeroes, Zeroes can only be pulled to ones by erase, which must be exactly the other way around for STM32L0.
If the problem is resolved, please mark this topic as answered by selecting Select as best. This will help other users find that answer faster.
Good luck!
/Peter
2021-08-16 04:21 AM
What stops me from rewriting erase function, so that it will set all bits to ones?
Anyway, let's say SPIFFS and LittleFS won't do, is there some other filesystem with power-resilience at place? I can write a hacky one myself, of course, but I don't want to invent the wheel in case there is already something else.
2021-08-16 04:21 AM
What stops me from rewriting erase function, so that it will set all bits to ones?
Anyway, let's say SPIFFS and LittleFS won't do, is there some other filesystem with power-resilience at place? I can write a hacky one myself, of course, but I don't want to invent the wheel in case there is already something else.