02-11-2023, 09:34 AM
I had this issue after doing some test with a KC868-A64 board. The issue is caused by flashing different configuration. Please see https://esphome.io/guides/faq.html#component-states-not-restored-after-reboot
It says:
The solution is to erase the NVS portion of the flash. The solution provided in the link was not valid for me because I use Windows and I was not sure of the values provided in the solution (I am not sure was the size of the NVS flash part is).
I think that when a new version of ESP home is released, the NVS flash part is also erased and this was the solution above. But as I'm running the latest version, I can't update :-(
There is a more safer tool "parttool.py" that reads the ESP32 partition tabel and then erases the partition you specify. But it requires you to install the ESP-IDF tools, this is rather large and takes soms time to install but hey: I was happy at the end :-)
So I did this to solve the issue
Here is the output of my command:
Have fun and share your experience
It says:
Quote:it could be that the NVS portion of the flash memory is full due to repeatedly testing multiple configurations (usually large) in the same ESP32 board.
The solution is to erase the NVS portion of the flash. The solution provided in the link was not valid for me because I use Windows and I was not sure of the values provided in the solution (I am not sure was the size of the NVS flash part is).
I think that when a new version of ESP home is released, the NVS flash part is also erased and this was the solution above. But as I'm running the latest version, I can't update :-(
There is a more safer tool "parttool.py" that reads the ESP32 partition tabel and then erases the partition you specify. But it requires you to install the ESP-IDF tools, this is rather large and takes soms time to install but hey: I was happy at the end :-)
So I did this to solve the issue
- Install python -> see https://www.python.org/downloads/
- Install the ESP-IDF tools -> see https://docs.espressif.com/projects/esp-...setup.html
- Pluging the board via the USB cable and find out what the com port number is. (on windows -> via device manager)
- Open the ESP-IDF command prompt and run command below, replace <PORT> with your COM port:
Code:
parttool.py --port <PORT> erase_partition --partition-name=nvs
Here is the output of my command:
Code:
C:\Espressif\frameworks\esp-idf-v5.0>parttool.py --port COM3 erase_partition --partition-name=nvs
Running C:\Espressif\python_env\idf5.0_py3.8_env\Scripts\python.exe C:\Espressif\frameworks\esp-idf-v5.0\components\esptool_py\esptool\esptool.py --port COM3 read_flash 32768 3072 C:\Users\krisb\AppData\Local\Temp\tmpqngnepws...
esptool.py v4.4
Serial port COM3
Connecting....
Detecting chip type... Unsupported detection protocol, switching and trying again...
Connecting....
Detecting chip type... ESP32
Chip is ESP32-D0WD-V3 (revision v3.0)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: b4:8a:0a:40:46:88
Uploading stub...
Running stub...
Stub running...
3072 (100 %)
3072 (100 %)
Read 3072 bytes at 0x00008000 in 0.3 seconds (82.8 kbit/s)...
Hard resetting via RTS pin...
Running C:\Espressif\python_env\idf5.0_py3.8_env\Scripts\python.exe C:\Espressif\frameworks\esp-idf-v5.0\components\esptool_py\esptool\esptool.py --port COM3 erase_region 36864 20480...
esptool.py v4.4
Serial port COM3
Connecting....
Detecting chip type... Unsupported detection protocol, switching and trying again...
Connecting....
Detecting chip type... ESP32
Chip is ESP32-D0WD-V3 (revision v3.0)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: b4:8a:0a:40:46:88
Uploading stub...
Running stub...
Stub running...
Erasing region (may be slow depending on size)...
Erase completed successfully in 0.3 seconds.
Hard resetting via RTS pin...
Erased partition 'nvs' at offset 0x9000
Have fun and share your experience