Using the new Arduino IDE for ESP8266 and found bugs, report them here

Moderator: igrr

User avatar
By bastian.h.jaeger
#94271 @Ing720 Thanks for your insights.

Inq720 wrote:I wanted to ask if you have your own hardware EEPROM on the PCB or are you talking about the EEPROM library on the ESP that is using flash memory?

The latter on. I use the usual "eeprom" from the Arduino library, i.e. hardware-wise a partition of the ESP8266 internal flash.

The behavior of your abusive tests sounds exactly like my issues, ... but
But I was able to cold restart (remove power completely) my devices and they again worked for another 1000x boot cycles. I did not manage to break any device completely. But I only worte extensively on ~ 300 bytes of the eeprom.

Inq720 wrote:I seem to recall reading somewhere (I couldn't find the reference) that the EEPROM library does not do any flash wear leveling... meaning every time you you do a commit, it is doing an erase and overwriting the same region at the beginning of the sector. Don't know if that is still the case.

Yes, still the case. If you are looking for wear leveling you have to use LittleFS or something similar. Which is exactly what I did now on my devices.

Inq720 wrote:Do you know (or can estimate) how many cycles you're talking about?

Not so easy to tell, but my estimation is around 100.000 - 350.000 writing cycles.
User avatar
By Inq720
#94272
bastian.h.jaeger wrote:@Ing720 Thanks for your insights.
The behavior of your abusive tests sounds exactly like my issues, ... but
But I was able to cold restart (remove power completely) my devices and they again worked for another 1000x boot cycles. I did not manage to break any device completely. But I only worte extensively on ~ 300 bytes of the eeprom.

Sounds like I need to pull them out of the box marked "Smoke Escaped Devices" and see if I can resurrect them.

Yes, still the case. If you are looking for wear leveling you have to use LittleFS or something similar. Which is exactly what I did now on my devices.

I thought the author of LittleFS said wear-leveling was on the TODO list. Maybe it's now on the DONE list. At the time I was playing with flash memory, I found it pretty easy to work with really only having three Espressif functions, so I wrote my own wear-leveling version of EEPROM and a wear leveling File System, both built-in to my library.

bastian.h.jaeger wrote:Not so easy to tell, but my estimation is around 100.000 - 350.000 writing cycles.

Thank you for the information. I'm trying to build a system into my equivalent EEPROM, File System and now a wear-leveling Data Logger classes that will give the user an "age" of their flash and if they're getting close to killing their project.

VBR,
Inq