Philips Semiconductors
FLASH MEMORY
Table 15-2: In-System Programming (ISP) hex record formats
Record type
08
In-Application Programming method
Several In-Application Programming (IAP) calls are available for use by an application program to permit selective erasing and
programming of Flash sectors, pages, security bits, configuration bytes, and device id. All calls are made through a common
interface, PGM_MTP. The programming functions are selected by setting up the microcontroller's registers before making a call
to PGM_MTP at FF00H. The IAP calls are shown in Table 15-4.
IAP Authorization Key
IAP functions which write or erase code memory require an authorization key be set by the calling routine prior to performing the
IAP function call. This authorization key is set by writing 96H to RAM location FFH. For example:
MOV
R0,#0FFH
MOV
@R0,#96H
CALL
PGM_MTP
After the function call is processed by the IAP routine, the authorization key will be cleared. Thus it is necessary for the authori-
zation key to be set prior to EACH call to PGM_MTP that requires a key. If an IAP routine that requires an authorization key is
called without a valid authorization key present, the MCU will perform a reset.
It is not possible to use the Flash memory as the source of program instructions while programming or erasing this same Flash
memory. During an IAP erase, program, or CRC the CPU enters a program-idle state.The CPU will remain in this program-idle
state until the erase, program, or CRC cycle is completed. These cycles are self timed. When the cycle is completed, code exe-
cution resumes. If an interrupt occurs during an erase, programming or CRC cycle, the erase, programming, or CRC cycle will
be aborted so that the Flash memory can be used as the source of instructions to service the interrupt. An IAP error condition
will be flagged by setting the carry flag and status information returned. The status information returned is shown in Table 15-3.
If the application permits interrupts during erasing, programming, or CRC cycles, the user code should check the carry flag after
each erase, programming, or CRC operation to see if an error occurred. If the operation was aborted, the user's code will need
to repeat the operation.
2003 Dec 8
Reset MCU
:00xxxx08cc
Where:
xxxx
= required field but value is a "don't care"
cc
= checksum
Example:
:00000008F8
104
Command/data function
User's Manual - Preliminary -
P89LPC920/921/922