Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By Awacks
#47529 I'm planning on using the NodeMCU as a counter/displayer for some operational machines that I have.

Since it will be powered by the 220v line, when the power grid fails it would lose the counter number.

To keep the solution at a software level I'm planning on saving the counter number to the flash memory (file.write()) and reading from it when the Node boots up.

That rewrite cycle would occur 5.000 times a day, how many cycles should I expect before the Flash memory starts to wear out/fail ?

Daniel.
User avatar
By lethe
#47533 Winbond flash is specified for up to 100000 erase cycles (see http://elinux.org/images/f/f5/Winbond-w25q32.pdf), so a naive aproach will wear your flash out in about 3 weeks.
To make matters worse, you can't rely on that number, since most modules don't use Winbond flash, but cheap chinese chips for which you'll have a hard time finding any datasheets.

See this post for a possible workaround: viewtopic.php?p=36367#p36367