UM11029
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2017. All rights reserved.
User manual
Rev. 1.0 — 16 June 2017
40 of 515
NXP Semiconductors
UM11029
Chapter 5: LPC84x ISP and IAP
5.6.1 Prepare sector(s) for write operation
This command makes flash write/erase operation a two step process.
5.6.2 Copy RAM to flash
See
for limitations on the write-to-flash process.
Table 38.
IAP Prepare sector(s) for write operation command
Command
Prepare sector(s) for write operation
Input
Command code: 50 (decimal)
Param0:
Start Sector Number
Param1:
End Sector Number (should be greater than or equal to start sector number).
Status code
CMD_SUCCESS |
BUSY |
INVALID_SECTOR
Result
None
Description
This command must be executed before executing "Copy RAM to flash" or "Erase Sector(s)" or “Erase
page(s)” command. Successful execution of the "Copy RAM to flash" or "Erase Sector(s)" or “Erase page(s)”
command causes relevant sectors to be protected again. To prepare a single sector use the same "Start" and
"End" sector numbers.
Table 39.
IAP Copy RAM to flash command
Command
Copy RAM to flash
Input
Command code: 51 (decimal)
Param0(DST):
Destination flash address where data bytes are to be written. This address should be a 64
byte boundary.
Param1(SRC):
Source RAM address from which data bytes are to be read. This address should be a word
boundary.
Param2:
Number of bytes to be written. Should be 64 | 128 | 256 | 512 | 1024.
Param3:
System Clock Frequency (CCLK) in kHz.
Status code
CMD_SUCCESS |
SRC_ADDR_ERROR (Address not a word boundary) |
DST_ADDR_ERROR (Address not on correct boundary) |
SRC_ADDR_NOT_MAPPED |
DST_ADDR_NOT_MAPPED |
COUNT_ERROR (Byte count is not 64 | 128 | 256 | 512 | 1024) |
SECTOR_NOT_PREPARED_FOR_WRITE_OPERATION |
BUSY
Result
None
Description
This command is used to program the flash memory. The affected sectors should be prepared first by calling
"Prepare Sector for Write Operation" command. The affected sectors are automatically protected again once
the copy command is successfully executed. Also see
for the number of bytes that can be
written.
Remark:
All user code must be written in such a way that no master accesses the flash while this command
is executed and the flash is programmed.