UM10462
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2016. All rights reserved.
User manual
Rev. 5.5 — 21 December 2016
417 of 523
NXP Semiconductors
UM10462
Chapter 20: LPC11U3x/2x/1x Flash programming firmware
20.14.13 IAP Status codes
20.15 Debug notes
20.15.1 Comparing flash images
Depending on the debugger used and the IDE debug settings, the memory that is visible
when the debugger connects might be the boot ROM, the internal SRAM, or the flash. To
help determine which memory is present in the current debug environment, check the
value contained at flash address 0x0000 0004. This address contains the entry point to
the code in the ARM Cortex-M0 vector table, which is the bottom of the boot ROM, the
internal SRAM, or the flash memory respectively.
20.15.2 Serial Wire Debug (SWD) flash programming interface
Debug tools can write parts of the flash image to RAM and then execute the IAP call
"Copy RAM to flash" repeatedly with proper offset.
Table 395. 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.
Table 396. Memory mapping in debug mode
Memory mapping mode
Memory start address visible at 0x0000 0004
Bootloader mode
0x1FFF 0000
User flash mode
0x0000 0000
User SRAM mode
0x1000 0000