
UM10850
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2016. All rights reserved.
User manual
Rev. 2.4 — 13 September 2016
434 of 464
NXP Semiconductors
UM10850
Chapter 31: LPC5410x Flash API
Up to 4 parameters can be passed in the r0, r1, r2 and r3 registers respectively (see the
ARM Thumb Procedure Call Standard SWS ESPC 0002 A-05)
. Additional parameters are
passed on the stack. Up to 4 parameters can be returned in the r0, r1, r2 and r3 registers
respectively. Additional parameters are returned indirectly via memory. Some of the IAP
calls require more than 4 parameters. If the ARM 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.
Table 496. IAP Command Summary
IAP Command
Command code
Reference
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)
Erase page(s)
59 (decimal)
Read Signature
70 (decimal)
Fig 62. IAP parameter passing
&RPPDQGFRGH
3DUDP
3DUDP
3DUDPQ
VWDWXVBUHVXOW>@
VWDWXVBUHVXOW>@
6WDWXVFRGH
5HVXOW
5HVXOW
5HVXOWQ
&RPPDQG3DUDPHWHU$UUD\
6WDWXV5HVXOW$UUD\
$505(*,67(5U
$505(*,67(5U
FRPPDQGBSDUDP>@
FRPPDQGBSDUDP>@
FRPPDQGBSDUDP>@
FRPPDQGBSDUDP>Q@
VWDWXVBUHVXOW>@
VWDWXVBUHVXOW>Q@