I want to maximize the number of write cycles to flash memory, utilizing IAP.
I understand the block and page formats for writing and erasing.
I propose: segment a 256-byte block of RAM into sixteen 16-byte subsections, and keep 16-bytes of data in one 16-byte data struct or string inside the first subsection, with all other data bytes as FF.
In one sector this should yield 16 x 2500 x 16 blocks = 640,000 write cycles instead of 10,000.
Assumptions:
OK, so where have I gone terribly wrong?
Also, why have the links to the various APnotes for this sort of thing (like AN11008) gone to?
OK, I really botched up this question, but it at least states what I want to do.
Update: move a small subblock of data throughout the block writing each block 16-times; then move to next block once exhausted; then only erase the entire sector and start again at zero once entire sector traversed (in my case its sector 6). This should yield:
The idea is that each cell only sees 5000 writes and 5000 erases total in this method. FFs writing over FF doesn't stress the cell and writing "00" over "00" shouldn't either. Each cell transitions to "0" completely only once per pass.
Try again? Any thoughts if this is wrong or right?
Hi David,
Do you use the IAP command? IAR don't have the block erase, it just have the sector and page erase.
Actually, the endurance will be count after program/erase cycles, no matter how your operate it, when you program, then erase, then the according flash area will count one endurance cycle. so to the specific flash address, the min 10000 endurance cycles won't be changed.
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Yes, I see that I missed two important aspects of programming the LPC1114: sector erase limit and block programming limit.
But, if I utilize the method I described above, where I repeatedly index my small data chunk into a block, taking the chunk from FF to data, then incrementing to the next chunk location in the block, each time programming but not erasing, then I do increase the endurance by the ratio of the chunk times the block. With a 8-byte chunk there will be 32 locations in the block, times 16 blocks in the sector -- we index inside the block changing the chunk from FF to my data, and the previous indexed chunk to 00, then program the whole block.
FFs onto FFs don't stress, and 00s onto 00s don't stress -- therefore, as you move from block to block with the chunk changing each time only from erased to programmed, each cell is only stressed once -- then erase the entire sector at the end, and start over.
That does change the endurance. By a whole lot. In the example I gave it goes from 10,000 to 5,120,000 times for each sector.
Hi David,
Thanks a lot for your detail reply!
I think if you have interest , you can test your own method on your side, just to check, whether it is really change the endurance, but from the NXP side, we still don't have the test result about your method.
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------