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

Rewriting internal flash sectors with IAP

Hello,

A colleague of mine needs to maintain the values of variables in non-volatile memory but the only provisions he has is internal flash. He implemented a scheme that uses 7 sectors (LPC1788) and it seems to work but occasionally, some bits get corrupt. The assumption is that same page (256 bytes) can be written again and again as long as no bits are set from 0 to 1 (this is supported by an application note by NXP: www.nxp.com/.../AN11008_Flash_based_non-volatile_storage_with_software.zip). Disabling interrupts during write operations does not help, and besides he mapped his interrupts to RAM as well as the ISRs themselves.
Any thoughts...?
Thanks in advance.

Parents
  • The assumption is that same page (256 bytes) can be written again and again as long as no bits are set from 0 to 1 (this is supported by an application note by NXP...)

    Not sure if this is a correct assumption. The application note says that data should be written 16 bytes at a time due to the ECC mechanism. But the datasheet says: "Data must be written to the flash in blocks of 256 bytes." This could be your answer.
    Besides, there is always a possibility of bugs in the code.

Reply
  • The assumption is that same page (256 bytes) can be written again and again as long as no bits are set from 0 to 1 (this is supported by an application note by NXP...)

    Not sure if this is a correct assumption. The application note says that data should be written 16 bytes at a time due to the ECC mechanism. But the datasheet says: "Data must be written to the flash in blocks of 256 bytes." This could be your answer.
    Besides, there is always a possibility of bugs in the code.

Children