
UM10800
All information provided in this document is subject to legal disclaimers.
© NXP Semiconductors N.V. 2016. All rights reserved.
User manual
Rev. 1.2 — 5 October 2016
377 of 487
NXP Semiconductors
UM10800
Chapter 25: LPC82x Flash In-System and In-Application Programming
•
Re-initialize the SP pointer to the application default
•
Set the SYSMEMREMAP to either 0x01 or 0x02
While in the ISP mode, the SYSMEMREMAP is set to 0x00.
Alternatively, the following snippet can be loaded into the RAM for execution:
SCB->AIRCR = 0x05FA0004;
//issue system reset
while(1);
//should never come here
The snippet will issue a system reset request to the core.
25.6.1.9 Erase sector(s) <start sector number> <end sector number>
25.6.1.10 Blank check sector(s) <sector number> <end sector number>
Table 321. UART ISP Erase sector command
Command
E
Input
Start Sector Number
End Sector Number:
Should be greater than or equal to start sector number.
Return Code
CMD_SUCCESS |
BUSY |
INVALID_SECTOR |
SECTOR_NOT_PREPARED_FOR_WRITE_OPERATION |
CMD_LOCKED |
PARAM_ERROR |
CODE_READ_PROTECTION_ENABLED
Description
This command is used to erase one or more sector(s) of on-chip flash memory. The
boot block can not be erased using this command. This command only allows
erasure of all user sectors when the code read protection is enabled.
Example
"E 2 3<CR><LF>" erases the flash sectors 2 and 3.
Table 322. UART ISP Blank check sector command
Command
I
Input
Start Sector Number:
End Sector Number:
Should be greater than or equal to start sector number.
Return Code
CMD_SUCCESS |
SECTOR_NOT_BLANK (followed by <Offset of the first non blank word location>
<Contents of non blank word location>) |
INVALID_SECTOR |
PARAM_ERROR
Description
This command is used to blank check one or more sectors of on-chip flash memory.
Blank check on sector 0 always fails as first 64 bytes are re-mapped to flash boot
block.
When CRP is enabled, the blank check command returns 0 for the offset and value
of sectors which are not blank. Blank sectors are correctly reported irrespective of
the CRP setting.
Example
"I 2 3<CR><LF>" blank checks the flash sectors 2 and 3.