How many times can you flash?
How many times can you flash?
I'm curious as to what the limit is, something like 10,000 write/erase cycles?
Re: How many times can you flash?
100,000 typical
-
- Posts: 9724
- Joined: Thu Nov 26, 2015 4:08 am
Re: How many times can you flash?
To be precise: we can't say because the flash is an external component. Please look up the datasheet for whatever flash chip is connected to your ESP32 if you want to be sure. It's usually in the ten-thousand to hundred-thousand times region indeed, though.
-
- Posts: 9724
- Joined: Thu Nov 26, 2015 4:08 am
Re: How many times can you flash?
FWIW: If you have an official Espressif-made module or board, all flash chips we use are specced to minimum 100,000 program/erase cycles.
Re: How many times can you flash?
Ah, perfect.
Re: How many times can you flash?
We use the standard Espressif ESP32 4MB WROOM module. It has happened to me several times (4x?) that I had to substitute a board due to a failure of either the NVS or the program memory. This is over the course of several months.ESP_Sprite wrote:FWIW: If you have an official Espressif-made module or board, all flash chips we use are specced to minimum 100,000 program/erase cycles.
Today in particular I couldn't upload the program anymore, and the part was only 2 weeks in dev use ("Warning: Could not auto-detect Flash size (FlashID=0xffffff, SizeID=0xff), defaulting to 4MB"). At 500 uploads a day (once every minute), that would mean failure after only 5000 cycles (probably significantly less, as it takes much more than a minute to think some problems through). Sure there could have been other failure modes, but I do not deem that likely.
My experience does not agree with viewtopic.php?t=4974#p22384
Also note that the 100.000 number is probably specced at 25ºC, but inside the WROOM module the temperature is raised by ca 15-20ºC, which alone is sufficient to drop the number 10x, to ca 10.000 cycles (according to Macronix data). A 70ºC increase would mean a dramatic drop, to just 10x.
At an automotive 125ºC you could only use the chip once. If you are lucky. Do not OTA at high temperatures...
As our product will operate at a relatively high temperatures (while exposed to sunlight), we will have to run an endurance test. But based on current experiences, at around 20ºC, I already doubt the 100.000x number is a minimum.
I think Espressif would do wise to characterize the flash chips at a commonly used temperature (40ºC or 50ºC) and publish the test results. If only to convince themselves the 100.000x number is realistic.
Re: How many times can you flash?
"Warning: Could not auto-detect Flash size (FlashID=0xffffff, SizeID=0xff), defaulting to 4MB"
Isn't the size obtained by reading nonvolatile chip registers? Did you do a test of your other parts to see how many bytes/sectors were failing?
Isn't the size obtained by reading nonvolatile chip registers? Did you do a test of your other parts to see how many bytes/sectors were failing?
Re: How many times can you flash?
Hello WiFive, thanks for responding.WiFive wrote:"Warning: Could not auto-detect Flash size (FlashID=0xffffff, SizeID=0xff), defaulting to 4MB"
Isn't the size obtained by reading nonvolatile chip registers? Did you do a test of your other parts to see how many bytes/sectors were failing?
I think auto-detect implies accessing the flash memory to see where it ends. That's also what I read after googling for possible causes (which include bad soldering). I tried to mechanically induce the part to come back to life, but it didn't. Without flash memory the module is a total loss, for me at least.
Re: How many times can you flash?
As WiFive mentioned, esptool.py detects flash size by reading flash chip ID, which itself is not stored in flash. If it reads 0xffffff from that register, it means that SPI communication between ESP32 and the flash chip is not happening, at least in download mode. This isn't a common failure mode when flash is written too many times. With this module, what is the message on UART console when you let it boot from flash?I think auto-detect implies accessing the flash memory to see where it ends.
Re: How many times can you flash?
I reflashed the board to get the boot report. Alas, the board works normally now. Which is behavour also seen before in other boards (not this one). In those boards it would reflash after a cooling down period of say 30m.ESP_igrr wrote:As WiFive mentioned, esptool.py detects flash size by reading flash chip ID, which itself is not stored in flash. If it reads 0xffffff from that register, it means that SPI communication between ESP32 and the flash chip is not happening, at least in download mode. This isn't a common failure mode when flash is written too many times. With this module, what is the message on UART console when you let it boot from flash?I think auto-detect implies accessing the flash memory to see where it ends.
I'll plan to keep using it while I can (it no longer has all parts), and update when it fails.
Who is online
Users browsing this forum: Bing [Bot], frengifom and 110 guests