This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Is IAP the only way of storing persistent data?

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

  • 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.

  • Mike: Yes, of course, I should have been more precise.

  • I think I found it:

    tech.groups.yahoo.com/.../2681

    It appears that on-chip flash memory in LPC2xxx MCU's has some serious limitations.
    I've been working with MCU's from ST and Freescale, and their on-chip flash memory doesn't have such limitations. Which is not surprising: ST is known for their advanced flash memory technology, and Freescale licenses one from SST.

  • Good catch. I don't think it is the same post (I think I picked up my info on the nxp or standardics forums) but the gist of the information is the same as I read.

    I might be wrong when I thought they claimed max 13 writes before erasing and rewriting the sector. This post claims 16 writes.

    Anyway - this is a link to keep. The information in it is very important and should have been in the procesor manuals. (Or maybe it is, for some LPC chips, but I haven't found it in the manuals I have read.)