Having read a lot (really!) about possible flash corruption of ESP8266 caused by writing the hard coded WiFi credentials to flash with every call of WiFi.begin(), I still couldn't figure out the current state of this issue (ESP Core 2.6.2).
There are many Github topics about that and I read the official documentation, but nevertheless I'm missing some clear and definite answers. I hope there's someone in here, who has profound knowlege about this.
I often read the general advice to use WiFi.persistent(false) to prevent the flash storage from being destroyed by too many writing processes. I'm wondering if this is still the case. So my questions are:
1.) If I set WiFi.persistent(true) [the standard setting?] - are the hard coded WiFi credentials always written to flash or does this only happen if the hard coded credentials are different to the ones that are in already in flash?
2.) If it is still necessary to set WiFi.persistent(false) - do I have to set this parameter only once in setup or before every call of WiFi.begin()?
3.) How does the widely used library WifiManager (by tzapu, available via Arduino Library Manager) handle this problem?
4.) Is WiFi.persistent() already implemented in the current ESP32 core? I can set this parameter without any error or warning messages during compiling, but I doubt the use of WiFi.persistent() has any effects.
Thanks in advance and best regards!