All of these new fw loaders have made me wonder if there is a life limit to erasing & rewriting the Picocalc flash?
Something like 100,000 times.
That’s probably more time than I’ve got left! Good to know I don’t need to worry, thanks
I don’t know, if you write to it once a minute, 24 hours a day, that will only last 69 days ![]()
Flash lasts far longer than the expected lifetime of the device it is in. For something you trigger manually, you’d have a very very hard time doing it enough times to cause an issue. But when writing code that modifies flash, it’s still something to be aware of, because naive code can easily hammer the flash many times a second for as long as you have the device running, and that can wreck a device in a fairly short period.
There’s not much impact with the picocalc even if you do hammer flash, because you can just replace the Pico in it extremely cheaply. It’s when you have an embedded flash chip buried inside an expensive or hard to access device that you have to be deliberate with your designs.
And good implementations use a process known as ‘wear levelling’, which ensures that the entire flash memory is used evenly. Without this, it can happen that the same areas are written to repeatedly and eventually fail, whilst other areas of the flash memory may never have been used at all.
This is why when I implemented blocks storage for zeptoforth I specifically added wear leveling, because a small minority of blocks would otherwise get the vast majority of wear, and thus in many use scenarios the flash would wear out rather quickly.