![NXP Semiconductors LPC43Sxx Скачать руководство пользователя страница 88](http://html1.mh-extra.com/html/nxp-semiconductors/lpc43sxx/lpc43sxx_user-manual_1721827088.webp)
UM10503
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2015. All rights reserved.
User manual
Rev. 2.1 — 10 December 2015
88 of 1441
NXP Semiconductors
UM10503
Chapter 6: LPC43xx/LPC43Sxx flash programming/ISP and IAP
4. Set the function pointer:
IAP iap_entry=(IAP)IAP_LOCATION;
5. Use the following statement to call the IAP:
iap_entry (command_param,status_result);
The IAP call can be simplified further by using the symbol definition file feature supported
by ARM Linker in RVDS (Realview Development Suite). You can also call the IAP routine
using assembly code. According to the ARM architecture Procedure Calling Standard
(AAPCS), up to 4 parameters can be passed in the r0, r1, r2 and r3 registers respectively.
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 this risk.
The flash memory is not accessible during a write or an erase operation. IAP commands
which result 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 using this space if IAP flash
programming is permitted in the application. Maximum stack usage is mentioned in the
description of a command.
6.8.1 IAP Initialization
This command initializes and prepares the flash for erase and write operations.
Table 51.
IAP Command Summary
IAP Command
Command Code
Reference
Init
49
10
Prepare sectors for write operation
50
10
Copy RAM to Flash
51
10
Erase sectors
52
10
Blank check sectors
53
10
Read part ID
54
10
Read Boot Code version
55
10
Read device serial number
58
10
Compare
56
10
Reinvoke ISP
57
10
Erase page
59
10
Set active boot flash bank
60
10
Table 52.
IAP Initialization command
Command
Init IAP
Input
Command code: 49 (decimal)
Status Code
CMD_SUCCESS