I am in the process of sacrificing a mega163 to find out how many times I can write and erase a single page of the flash memory. I'm not specifically interested in the actual number of writes possible, but whether multiple writes to a page between erasures would lower the endurance.
In my program I need to write to the flash in blocks of only 8 bytes, and because it's possible that I only need to write a single block of 8 bytes to the flash at one time, Erasing the entire flash page to and rewriting it with the existing contents would be wasteful as far as flash endurance. Normally you must clear the page and rewrite it because you can only set the flash bits to 0 without erasing the entire page, but if you write 0xFF's to unused bytes, you may perform another write to the page without affecting portions that have already been written.
My mega163 is up to around 300,000 full page writes and subsequent erasures, so I'm curious if anybody knows what the expected endurance is, simply because I'm getting tired of waiting for it to fail. My simulation of the flash failing worked, right? :shock: