How many times can you flash?

arao23
Posts: 30
Joined: Tue Dec 13, 2016 4:44 pm

How many times can you flash?

Postby arao23 » Wed Dec 14, 2016 7:17 am

I'm curious as to what the limit is, something like 10,000 write/erase cycles?

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: How many times can you flash?

Postby WiFive » Wed Dec 14, 2016 9:55 am

100,000 typical

ESP_Sprite
Posts: 8921
Joined: Thu Nov 26, 2015 4:08 am

Re: How many times can you flash?

Postby ESP_Sprite » Thu Dec 15, 2016 1:33 am

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.

ESP_Sprite
Posts: 8921
Joined: Thu Nov 26, 2015 4:08 am

Re: How many times can you flash?

Postby ESP_Sprite » Thu Dec 15, 2016 3:09 am

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.

arao23
Posts: 30
Joined: Tue Dec 13, 2016 4:44 pm

Re: How many times can you flash?

Postby arao23 » Fri Dec 16, 2016 4:24 am

Ah, perfect.

chromebin
Posts: 77
Joined: Wed Feb 07, 2018 3:53 pm

Re: How many times can you flash?

Postby chromebin » Fri Sep 14, 2018 2:02 pm

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.
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.

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.

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: How many times can you flash?

Postby WiFive » Fri Sep 14, 2018 8:59 pm

"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?

chromebin
Posts: 77
Joined: Wed Feb 07, 2018 3:53 pm

Re: How many times can you flash?

Postby chromebin » Fri Sep 14, 2018 11:18 pm

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?
Hello WiFive, thanks for responding.

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.

ESP_igrr
Posts: 2067
Joined: Tue Dec 01, 2015 8:37 am

Re: How many times can you flash?

Postby ESP_igrr » Sat Sep 15, 2018 12:54 am

I think auto-detect implies accessing the flash memory to see where it ends.
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?

chromebin
Posts: 77
Joined: Wed Feb 07, 2018 3:53 pm

Re: How many times can you flash?

Postby chromebin » Mon Sep 17, 2018 1:41 pm

ESP_igrr wrote:
I think auto-detect implies accessing the flash memory to see where it ends.
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 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.

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: No registered users and 119 guests