ESP8266 flash endurance?

Status
Not open for further replies.

Pommie

Well-Known Member
Most Helpful Member
I built an Internet connected clock 2 years ago and it's been working perfectly until this weekend. This weekend it started going through the cycle of "Connecting to WiFi" then "Connected to MikesNetwork24" and then stopping. When I connected it back to my PC and got the Serial Monitor working it was repeatedly resetting via the WDT. I got the original code intending to track down where it was crashing but when I compiled the code everything worked fine again. This leads me to suspect flash corruption. However, it's been powered for most of the two years - probably two short power cuts in that time.

Anyone any ideas or suggestions to work out what happened?

Thanks,

Mike.
 
Maybe one of those photon/neutron thingies buzzed it and flipped a bit or two upsetting the program?

To be serious, about the only thing I've ever had that got a micro confused was glitches on the power supply and I don't recall ever having to reprogram the device to get it going again.
 
I tried power cycling a few times without success. I was expecting to find a bug in the code due to something (a time server) moving on the internet and it using a part of the code it hadn't previously used. However, the fact that reprogramming fixed it suggests a flash error. Maybe I'll have to wait another two years to find out.
Maybe one of those photon/neutron thingies buzzed it and flipped a bit or two
Actually, haven't we just had a solar maximum or something that caused fantastic auroras.

Mike.
 
Had to look it up, but it seems there have been a few eruptions from the sun over the last few weeks and headed stuff in our direction, another one due last night/today from all reports
 
Flash memories do leak away their data and eventually stop working. Re-flashing will usually correct the situation. Today's flash memories seem to hold up a lot longer than those produced 10 ago and prior.
 
You doing R/W operations to FLASH or just reads ? Lifetime specs usually based on R/W cycles.
Although there is the adjacent cell read disturb issue.



Regards, Dana.
 
I have had two AVR controllers become "stupid" as their flash memories leaked away the charges stored on the flash memory gates. It is just a matter of time and temperature, in addition to damage from too may write/erase cycles.
 
I'm wondering if I can modify the OTA (over the air) code to rewrite the flash memory every 6 months. Do members think this will make any difference?

Mike.
 
ESP32, some versions dual core. Could write code to compare two cores running
same code, and if necessary using onchip bootloader rewrite the code stored in
non active FLASH. One possibility.


Regards, Dana.
 
I'm using the 8266 with 4Meg flash. The OTA code loads a new version via wifi and copies it over the lower region. I figured, copy code to second meg of flash, run it and it copies the code from the first meg to the third meg before copying it back to the first meg. I'm thinking that doing this every 6 months should fix any flash leakage problems.

Mike.
 
Out of curiosity, I googled 'esp8266 memory leakage' - seems there are a lot of people having problems with it, especially related to wi-fi usage.

Maybe be worth a look at?
 

Thats basically a "wear leveling" approach, used in SSD's for example.


Regards, Dana.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…