This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
What order does the erase occur within each sector of the F2812 flash? Is it from low address to high address? Or otherwise?
I ask because I am attempting to design a robust mechanism for maintaining programmable configuration data in the flash. If power were to be unexpectedly lost during an erase operation, I need to know what to expect about the state of the sector (i.e. whether the beginning may be erased but not the end, etc.)
Thanks
--Josh Warr
Josh,
The entire sector is erased together, not one bit at a time.
Regards,
Dave Foley
Josh,
Actually I should be more verbose. Erase is actually a three step process: clear, erase, compact. The first step is clear (technically there is a pre-condition step prior, but that doesn't matter for your question). Clear zeros out the entire sector starting at the least numerical address to the highest. After the entire sector is cleared all the bits in the sector are erased together. Once that completes compaction (sort of an erase cleanup step) occurs doing portions of the sector at a time. Compaction doesn't really change the state of the bit, so like pre-condition is doesn't really impact your question. So, if the "Erase_Sector" step is interrupted (via a power glitch, etc.) it could be partially cleared if it was interrupted in the middle of the clear step, it could be random data if it occurred in the middle of the erase step, or it could actually be slightly in depletion if it was interrupted in the middle of the erase or compaction step. The best thing to do immediately after the Erase_Sector step is interrupted is the Depletion_Recovery function. Then I would try programming the entire sector to all zeros. If both of those works you are good to retry the Erase_Sector step again.
Regards,
Dave Foley