I have an external flash device (4Gb NAND) that I want to use as a giant circular buffer to store/record sensor data over time. I want to store the location/pointer to where I'm at in that buffer onto the onboard MCF52259 flash so that when I power cycle the device I can read the location and resume writing to my external NAND where I left off so I don't overwrite any data.
I'll be recording new data and updating my memory pointer every 100ms, so at that rate, I would burn out the 100,000 write cycles in the onboard flash pretty quickly if I kept writing my memory pointer to the same static location in the MCF52259 flash.
Would the best way to handle it be to spread the counter over an entire block? i.e., count up to, say, 1000 at each word location, and then move to the next word in flash? Then at program start I could just read the onboard flash and look for where the first non-1000 value is (call this location_index) and resume writing my counter at that location_index? Then the data would be written to the external flash at (1000*location_index)+counter_val_at_location