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 it possible to use flash memory to store data?

"Is it possible to use LPC1114 internal flash memory to store variable data?"

Is anyone can help me?

thanks

ANUS MUBEREK

regards, ANUS MUBEREK

Parents
  • Writing stuff to flash is not a good idea.

    I have to do it on a silabs 8051 in a system that has no other way to store items.
    In the case of this part, you have to go through some gyrations to open the flash for writing.
    BUT this risks corrupting flash that you are running code in.

    As it turned out the product has been experiencing random flash corruption. It took a very very
    long time to find the reason. like a couple of years.

    Essentially on the 8051, if you disable the interrupt mask with EA=0; unless the next instruction is a EA=0 instruction, you can get an interrupt.

    In my case, I found quite by accident that my sequence was allowing an interrupt to happen between the EA=0, and after the redirection bit was set, so the interrupt would run with
    flash open to writing. It happened rarely, but we finally got a device that did it repeatedly for some reason, and got it to happen with an unprotected flash load, and I was able to track it down.

    So IF you write to flash, be very very careful of things like this.

Reply
  • Writing stuff to flash is not a good idea.

    I have to do it on a silabs 8051 in a system that has no other way to store items.
    In the case of this part, you have to go through some gyrations to open the flash for writing.
    BUT this risks corrupting flash that you are running code in.

    As it turned out the product has been experiencing random flash corruption. It took a very very
    long time to find the reason. like a couple of years.

    Essentially on the 8051, if you disable the interrupt mask with EA=0; unless the next instruction is a EA=0 instruction, you can get an interrupt.

    In my case, I found quite by accident that my sequence was allowing an interrupt to happen between the EA=0, and after the redirection bit was set, so the interrupt would run with
    flash open to writing. It happened rarely, but we finally got a device that did it repeatedly for some reason, and got it to happen with an unprotected flash load, and I was able to track it down.

    So IF you write to flash, be very very careful of things like this.

Children