
DR
AFT
DR
AFT
DRAFT
DR
D
RAFT
DRAFT
DRA
FT DRAF
D
RAFT DRAFT DRAFT DRAFT DRAFT D
DRAFT
D
RAFT DRA
FT DRAFT DRAFT DRAFT DRA
UM10360_0
© NXP B.V. 2009. All rights reserved.
User manual
Rev. 00.06 — 5 June 2009
602 of 808
NXP Semiconductors
UM10360
Chapter 32: LPC17xx Flash memory interface and programming
7.14 Compare <address1> <address2> <no of bytes>
7.15 ISP Return Codes
Table 568. ISP Compare command
Command
M
Input
Address1 (DST):
Starting flash or RAM address of data bytes to be compared.
This address should be a word boundary.
Address2 (SRC):
Starting flash or RAM address of data bytes to be compared.
This address should be a word boundary.
Number of Bytes:
Number of bytes to be compared; should be a multiple of 4.
Return Code
CMD_SUCCESS | (Source and destination data are equal)
COMPARE_ERROR | (Followed by the offset of first mismatch)
COUNT_ERROR (Byte count is not a multiple of 4) |
ADDR_ERROR |
ADDR_NOT_MAPPED |
PARAM_ERROR |
Description
This command is used to compare the memory contents at two locations.
Example
"M 8192 268435968 4<CR><LF>" compares 4 bytes from the RAM address
0x1000 0200 to the 4 bytes from the flash address 0x2000.
Table 569. ISP Return Codes Summary
Return
Code
Mnemonic
Description
0
CMD_SUCCESS
Command is executed successfully. Sent by ISP
handler only when command given by the host has
been completely and successfully executed.
1
INVALID_COMMAND
Invalid command.
2
SRC_ADDR_ERROR
Source address is not on word boundary.
3
DST_ADDR_ERROR
Destination address is not on a correct boundary.
4
SRC_ADDR_NOT_MAPPED
Source address is not mapped in the memory map.
Count value is taken into consideration where
applicable.
5
DST_ADDR_NOT_MAPPED
Destination address is not mapped in the memory
map. Count value is taken into consideration where
applicable.
6
COUNT_ERROR
Byte count is not multiple of 4 or is not a permitted
value.
7
INVALID_SECTOR
Sector number is invalid or end sector number is
greater than start sector number.
8
SECTOR_NOT_BLANK
Sector is not blank.
9
SECTOR_NOT_PREPARED_FOR_
WRITE_OPERATION
Command to prepare sector for write operation
was not executed.
10
COMPARE_ERROR
Source and destination data not equal.
11
BUSY
Flash programming hardware interface is busy.
12
PARAM_ERROR
Insufficient number of parameters or invalid
parameter.
13
ADDR_ERROR
Address is not on word boundary.