Does configuring the WiFi mode write to FLASH?

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
User avatar
WZab
Posts: 10
Joined: Tue Jan 21, 2020 7:45 pm

Does configuring the WiFi mode write to FLASH?

Post by WZab » Wed Oct 14, 2020 1:08 pm

I have a ESP32-based Micropython device (described later as "controller"), which needs to connect often to various WiFi Access Points.
It is used to control equipment accessible via WiFi in a special mode - each controlled device has its own WPA2-protected WiFi AP with hidden ESSID.

The controlled device remains silent until the controller connects to it. When the system works, the controller needs to connect to various controlled devices in a sequence. It can be easily done with:

Code: Select all

wlan.connect('essid', 'password')
The important question, however, is if such reconfiguration of the network is associated with writing to the FLASH? If yes, the frequent reconfiguration may wear the FLASH and result in fast malfunction of the device.

TIA & Regards,
Wojtek

User avatar
pythoncoder
Posts: 4573
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Does configuring the WiFi mode write to FLASH?

Post by pythoncoder » Sat Oct 17, 2020 1:11 pm

This is a factor on ESP8266, but not (as far as I know) on ESP32.
Peter Hinch

User avatar
jimmo
Posts: 1911
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: Does configuring the WiFi mode write to FLASH?

Post by jimmo » Tue Oct 20, 2020 1:01 pm

Like @pythoncoder says, this was definitely true on ESP8266 but I have not seen any evidence that this is the case on ESP32.

You'd have to look in the ESP-IDF. MicroPython calls esp_wifi_connect(). Unfortunately some of the WiFi stuff on ESP32 is implemented in a binary blob though, but I suspect anything that wrote to flash would likely be done in the IDF code.

Post Reply