We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi
Im using the LPC2103 MCU and I need to store some calibration data in the flash, so the calibration doesnt get lost when the system is powered off.
I know I can use IAP to do this, but is there other mehods? Not that I dont like the IAP solution, but just to know.! :-)
I guess I have to reserve some of the flash for this purpose. How is that done in KEIL?
/thomas
"These values can be written consecutively to the same location in flash without erasing the sector."
With some limitations. The additional writes (to concatenate more information) are not 100% safe for other bits. So in some cases there are limits to the number of times you may update a sector until it needs to be erased and have all data rewritten, to make sure that all data on the page will fulfill the stipulated retention times.
The bad thing is that this information is seldom available in the datasheets.
On NXP's own forum, I saw a post from NXP tech support about NXP ARM chips. I think it was the LPC21xx chips they claimed max 13 writes to a sector until it should be fully regenerated.
I think it was the LPC21xx chips they claimed max 13 writes to a sector until it should be fully regenerated.
'Fully regenerated' meaning erased? And what is '13 writes'? Isn't a sector a few kilobytes in size? What if I write 13 bytes, can't I write more? It's all very confusing.
No. The message I read said that you could erase a sector. Then write a number of bytes to the sector. Then at a later time write some more bytes. Then at a later time write yet more bytes to the same sector.
But after having written 13 times to the sector with more and more information, you should not do any more writes before first copying the existing information to RAM and erasing the sector and then write back the information again.
This figure is not a fixed general value for any processor. It was just a number I picked up from NXP tech staff, and I _think_ it was for the LPC21xx series. I have never seen anything about it in any application notes. No application note seem to discuss multiple writes without an erase in between.
The post claimed that when doing multiple writes resulted in some electrons escaping through the barrier and after enough writes there would be a too small charge left in the written (or if it was in the erased) cells that the cell contents would not be able to keep a distinctive charge for long enough time.
But the message in question did not say that after 15 or 25 or 100 writes the information would just magically be lost. It said that NXP could not guarantee the retention time (i.e. don't expect the written information to survive for 10+ years) unless you limited the number of times to concatenate more information to the same sector without refreshing the data with a sector erase and new write.
I was a fool and didn't save the link to this post immediately, and I'm not sure I can find it again. But I'm about 95% sure that it was on the NXP forum. And the signature did post claiming to be NXP technical staff. I somehow got to the post based on other informative posts made by the same person about flash mechanics and I/O port designs of NXP ARM processors.