I don’t think it’s easy to calculate how often you can write a file to memory. It depends on many factors. You can run tests under real end-customer conditions and check Storage health data.
If you ask AI for the “Guaranteed erase/write cycles” parameter for eMMC flash memory, you get something like:
“Rewriting a file 20,000 times does not mean your eMMC is damaged.
The endurance rating applies per erase block, and thanks to wear-leveling, the actual wear is distributed across many blocks.”
You could make some kind of an estimate based on the “Writable data amount, Guaranteed 40 TB”. So if you write for example ~22 Gigabytes every day, that should last around 5 years. (40000 / 22 = 1818,2 / 365 = 4,98).
I marked Tommi’s answer as a solution. You have to define how big the files are and how often, at most, you would like to write in your application, and calculate your use-case for the worst-case scenario.
Tip: The X20CP1686X supports Storage Health Data monitoring (noted in the datasheet). You can use this to track actual flash wear over time in your application.
You can share your calculation with us, and we can try to prove it for you.
Thanks for all the responses! I am only increasing a few counters once a minute (max 10kB) and saving parameters on HMI save command (max 10 kB). I will never reach the 40 TB so I have no worries about the storage wearing out.
10kB * 60min * 24h * 365d * 20y / 1024 / 1024 = 10gb in 20 years