Actually, it's 100,000 erases, not programs.

We store 128 bytes of state information on power down, and I worked out a neat algorithm (I'm sure someone else must have done this before, but...). We cycle through a single 8k page - at power up we work backwards through the page until we get a 128-byte block with a correct CRC, and note that on the next powerdown we have to use the next free slot in the page.

This means we get 8192/128=64 power downs for each 8k page erase, and more like 6.4 million powerdowns (minimum).

The limitation is *per block*. The blocks below 0x10000 (64k) are 8k, above that they are 64k.

Hugo