Post topics, source code that relate to the Arduino Platform

User avatar
By Inq720
#94528
s100 wrote:Thank you, that answers my major question. Rather than ask for a fish dinner on the details, is there some online documentation I could read that would dive deeper into this?


Wasn't sure if your reply is to me or J.A., so I'll assume me. :D Fish Dinner

I don't want to sound like some kind of expert on flash. If you're asking, Did I find any on the Internet? On the Internet, I found nothing giving any numbers. In fact, the aspect I observed - That the erase duration took longer as the flash "aged" was never found in any literature.

If you're asking about my tests - I only destroyed (3) ESP8266, ESP-01S so inferring that all flash or even another brand that might be on another ESP8266 is pre-mature. The variability also is concerning... 400K to 900K out of three gives a very poor statistical "average". If you're doing something that writes once a day... I wouldn't worry much about it. If you're writing something once a minute, you ought to go to the trouble of doing some kind of wear leveling.

In my library, I also store up to 5 SSID/Password pairs along with other stuff. I just append it to the last written area until I fill up the 4K sector... then I erase and write it at the beginning again.

Sadistic abuse of ESP8266 - https://www.esp8266.com/viewtopic.php?f=6&t=23141
User avatar
By fabianoriccardi
#94788 What if I simply call WiFi.begin("myssid", "mypass", channel, bssid) at the begin of my sketch? Will these values be written on flash at every boot even if they do not change?

EDIT: never mind, I did few tests, it seems to overwrite the WiFi configuration everytime I call it, so I switched to WiFi.begin() which reuses the old credential without overwriting them.
User avatar
By Dario_esp
#95636
fabianoriccardi wrote:What if I simply call WiFi.begin("myssid", "mypass", channel, bssid) at the begin of my sketch? Will these values be written on flash at every boot even if they do not change?

EDIT: never mind, I did few tests, it seems to overwrite the WiFi configuration everytime I call it, so I switched to WiFi.begin() which reuses the old credential without overwriting them.


Hey Fabian, would you be able to expand a little on how you determined the 4 arg .begin was overwriting the station_config every time it was called? This might be important for sketches that still call any of the begin overrides, besides .begin(void).