Flash Memory System and Programming 284 May 03, 2004
Philips Semiconductors Preliminary User Manual
LPC2119/2129/2194/2292/2294ARM-based Microcontroller
Compare
Table 221: IAP Compare command description
Command Compare
Input
Command Code: 56
Param0(DST): Starting Flash or RAM address from where data bytes are to be compared. This
address should be a word boundary.
Param1(SRC): Starting Flash or RAM address from where data bytes are to be compared. This
address should be a word boundary.
Param2: Number of bytes to be compared. Count should be in multiple of 4.
Status Code
CMD_SUCCESS |
COMPARE_ERROR |
COUNT_ERROR (Byte count is not multiple of 4) |
ADDR_ERROR |
ADDR_NOT_MAPPED
Result Result0: Offset of the first mismatch if the Status Code is COMPARE_ERROR.
Description
This command is used to compare the memory contents at two locations. Compare result may not
be correct when source or destination address contains any of the first 64 bytes starting
from address zero. First 64 bytes can be re-mapped to RAM.
Table 222: IAP Status Codes Summary
Status
Code
Mnemonic Description
0 CMD_SUCCESS Command is executed successfully.
1 INVALID_COMMAND Invalid command.
2 SRC_ADDR_ERROR Source address is not on a 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 in to consideration where
applicable.
5 DST_ADDR_NOT_MAPPED
Destination address is not mapped in the memory
map. Count value is taken in to 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.
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 is not same.
11 BUSY Flash programming hardware interface is busy.