I wants to use an onboard MCU to update the firmware of LPC51U68 using SPI interface.
i cannot find any documentation that outline the SPI ISP commands and procedures to do firmware updating.
My understanding is when first enter ISP mode, MCU need to need to send SH_CMD_PROBE to select SPI interface.
Then MCU can start using SH_CMD_WRITE_PAGE to write firmware into flash.
After update completed , MCU can send BOOT command to boot to new firmware.
My questions:
- Is SH_CMD_WRITE_PAGE the correct command to use?
- What should the pagenum for the first 256 bytes of the firmware? Page number 512?
- Does MCU need to erase the page before writing?
- Any steps I missed?