AnsweredAssumed Answered

When to write to NVM

Question asked by Robert Maier on Jul 27, 2017
Latest reply on Jul 27, 2017 by Robert Maier

I'll get straight to the question: Is there anything wrong with writing to unwritten flash at any time? That is to say, we have a sector that has been erased, I want to write to a "virgin" portion of this sector at any time even after a reset/power-up. Basically, write to any flash bytes that are still set to 0xFF in a predefined sector?

 

I am working with a KEA64 MCU. I need to write a small amount of data to flash frequently. I've got plenty of flash space to spare. I could use one or more sectors, and write to them sequentially. Once a sector is filled, it gets erased and put to the end of the write queue. The theory is that writing 8 bytes sequentially get me 64 writes per deteriorating erase/write cycle, thus extending my usable "write" cycles from a minimum of 10k to 640k.

 

Is there any reason this would not work, or is not favorable?

Outcomes