My LPC845x application must upgrade the current firmware from a serial flash. I see that IAP functions can do that, but how my serial flash access functions do not get corrupted during the update process?
Regards
The flash size of LPC845 is 64 KB, and is divided into 32 sectors. The corresponding address space is 0x0000 0000 - 0x00010000. Some IAP and ISP commands operate on sectors and specify sector numbers. In addition, a page erase command is available. The size of a sector is 1 KB and the size of a page is 64 byte. One sector contains 16 pages.
For example, A LPC845 SBL is downloaded to the first eight sectors in flash, so the user application starts from 0x0000 2000 in flash. Therefore, applications that boot from the SBL must be initially set up with the vector table at the address of 0x0000 2000.
An application that boots from the SBL must meet the following requirements:
• Uses no flash memory in the region of 0x0000 0000 - 0x0000 1FFF.
• Requires an image header at the address of 0x0000 2100 in flash.
I suggest you refer AN12393 LPC845 I2C Secondary Bootloader. You can search and download it from NXP website.
Thanks,
Jun Zhang