UM10429
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2010. All rights reserved.
User manual
Rev. 1 — 20 October 2010
161 of 258
NXP Semiconductors
UM10429
Chapter 17: LPC1102 Flash memory programming firmware
17.5.15 UART ISP Return Codes
17.6 IAP commands
For in application programming the IAP routine should be called with a word pointer in
register r0 pointing to memory (RAM) containing command code and parameters. Result
of the IAP command is returned in the result table pointed to by register r1. The user can
reuse the command table for result by passing the same pointer in registers r0 and r1. The
parameter table should be big enough to hold all the results in case the number of results
are more than number of parameters. Parameter passing is illustrated in the
.
The number of parameters and results vary according to the IAP command. The
maximum number of parameters is 5, passed to the "Copy RAM to FLASH" command.
Table 167. UART 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 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 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.
14
ADDR_NOT_MAPPED
Address is not mapped in the memory map. Count
value is taken in to consideration where applicable.
15
CMD_LOCKED
Command is locked.
16
INVALID_CODE
Unlock code is invalid.
17
INVALID_BAUD_RATE
Invalid baud rate setting.
18
INVALID_STOP_BIT
Invalid stop bit setting.
19
CODE_READ_PROTECTION_
ENABLED
Code read protection enabled.