
UM10375
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2011. All rights reserved.
User manual
Rev. 3 — 14 June 2011
337 of 368
NXP Semiconductors
UM10375
Chapter 21: LPC13xx Flash memory programming firmware
suggested scheme is used for the parameter passing/returning then it might create
problems due to difference in the C compiler implementation from different vendors. The
suggested parameter passing scheme reduces such risk.
The flash memory is not accessible during a write or erase operation. IAP commands,
which results in a flash write/erase operation, use 32 bytes of space in the top portion of
the on-chip RAM for execution. The user program should not be use this space if IAP flash
programming is permitted in the application.
21.14.1 Prepare sector(s) for write operation
This command makes flash write/erase operation a two step process.
Table 334. IAP Command Summary
IAP Command
Command Code
Described in
Prepare sector(s) for write operation
50 (decimal)
Copy RAM to flash
51 (decimal)
Erase sector(s)
52 (decimal)
Blank check sector(s)
53 (decimal)
Read Part ID
54 (decimal)
Read Boot code version
55 (decimal)
Compare
56 (decimal)
Reinvoke ISP
57 (decimal)
Read UID
58 (decimal)
Fig 64. IAP parameter passing
COMMAND CODE
PARAMETER 1
PARAMETER 2
PARAMETER n
STATUS CODE
RESULT 1
RESULT 2
RESULT n
command
parameter table
command
result table
ARM REGISTER r0
ARM REGISTER r1