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
"I know that while I program the flash if there will be power fail I will get into trouble - How to avoid them?"
Don't replace everything. Keep a small 4kB boot loader in the first sector of the flash. If you get a power loss, the 4kB boot loader will allow the programming to restart.
Or make the first UART and the a push-button available, so an end-user may activate the NXP boot loader and perform a full download.