Iap Commands; User Manual - Philips LPC2101 User Manual

Table of Contents

Advertisement

Philips Semiconductors
Volume 1
Table 225: ISP Return codes Summary
Return
Code
6
7
8
9
10
11
12
13
14
15
16
17
18
19

19.9 IAP commands

For in application programming the IAP routine should be called with a word pointer in
register r0 pointing to memory (RAM) containing command code and parameters. Result
of the IAP command is returned in the result table pointed to by register r1. The user can
reuse the command table for result by passing the same pointer in registers r0 and r1. The
parameter table should be big enough to hold all the results in case if number of results
are more than number of parameters. Parameter passing is illustrated in the
The number of parameters and results vary according to the IAP command. The
maximum number of parameters is 5, passed to the "Copy RAM to FLASH" command.
The maximum number of results is 2, returned by the "Blankcheck sector(s)" command.
The command handler sends the status code INVALID_COMMAND when an undefined
command is received. The IAP routine resides at 0x7FFF FFF0 location and it is thumb
code.
The IAP function could be called in the following way using C.
Define the IAP location entry point. Since the 0th bit of the IAP location is set there will be
a change to Thumb instruction set when the program counter branches to this address.
#define IAP_LOCATION 0x7ffffff1
Define data structure or pointers to pass IAP command table and result table to the IAP
function:
unsigned long command[5];

User manual

Mnemonic
INVALID_SECTOR
SECTOR_NOT_PREPARED_FOR_
WRITE_OPERATION
BUSY
PARAM_ERROR
CMD_LOCKED
INVALID_CODE
INVALID_BAUD_RATE
INVALID_STOP_BIT
CODE_READ_PROTECTION_
ENABLED
Rev. 01 - 12 January 2006
Chapter 19: Flash memory
Description
Byte count is not multiple of 4 or is not a permitted
value.
Sector number is invalid or end sector number is
greater than start sector number.
Sector is not blank.
Command to prepare sector for write operation was
not executed.
Source and destination data not equal.
Flash programming hardware interface is busy.
Insufficient number of parameters or invalid
parameter.
Address is not on word boundary.
Address is not mapped in the memory map. Count
value is taken in to consideration where applicable.
Command is locked.
Unlock code is invalid.
Invalid baud rate setting.
Invalid stop bit setting.
Code read protection enabled.
© Koninklijke Philips Electronics N.V. 2006. All rights reserved.
UM10161
Figure
63.
242

Advertisement

Table of Contents
loading

This manual is also suitable for:

Lpc2103Lpc2102

Table of Contents