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

IAP for all flash

Hi,
I'm using LPC2468
I want to replace all the flash code in the internal flash at site.
I have an external flash that I can download the new firmware to it (using serial or ethernet) then I want to run an IAP function that replace ALL the existing code (in Internal flash) with the new firmware.
Can anyone suggest me the steps to follow. I know that while I program the flash if there will be power fail I will get into trouble - How to avoid them?

Regards,
Doron

Parents
  • I want to replace all the flash code in the internal flash at site. [...] I know that while I program the flash if there will be power fail I will get into trouble - How to avoid them?

    By not doing the former, or ensuring the latter cannot happen.

    Replacing the entire executable code makes it impossible to be fully robust to power-failure. At some point in the process, you'll have to draw the rug away under your own feet. You'll be erasing the flash page with the reset vector in it, or something like that. If power fails before you've rolled out the new rug, you end up with a dead parrot.

    The usual alternatives are:

    1) a fixed bootloader that you never overflash

    2) backup power supply to allow finishing the operation cleanly.

Reply
  • I want to replace all the flash code in the internal flash at site. [...] I know that while I program the flash if there will be power fail I will get into trouble - How to avoid them?

    By not doing the former, or ensuring the latter cannot happen.

    Replacing the entire executable code makes it impossible to be fully robust to power-failure. At some point in the process, you'll have to draw the rug away under your own feet. You'll be erasing the flash page with the reset vector in it, or something like that. If power fails before you've rolled out the new rug, you end up with a dead parrot.

    The usual alternatives are:

    1) a fixed bootloader that you never overflash

    2) backup power supply to allow finishing the operation cleanly.

Children