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) Table 335
Copy RAM to flash 51 (decimal) Table 336
Erase sector(s) 52 (decimal) Table 337
Blank check sector(s) 53 (decimal) Table 338
Read Part ID 54 (decimal) Table 339
Read Boot code version 55 (decimal) Table 340
Compare 56 (decimal) Table 341
Reinvoke ISP 57 (decimal) Table 342
Read UID 58 (decimal) Table 343
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