UM10147_2
© NXP B.V. 2008. All rights reserved.
User manual
Rev. 02 — 28 April 2008
112 of 134
NXP Semiconductors
UM10147
P89LPC952/954 User manual
17.6 ISP and IAP capabilities of the P89LPC952/954
An In-Application Programming (IAP) interface is provided to allow the end user’s
application to erase and reprogram the user code memory. In addition, erasing and
reprogramming of user-programmable bytes including UCFG1, the Boot Status Bit, and
the Boot Vector is supported. As shipped from the factory, the upper 512 bytes of user
code space contains a serial In-System Programming (ISP) loader allowing for the device
to be programmed in circuit through the serial port. This ISP boot loader will, in turn, call
low-level routines through the same common entry point that can be used by the end-user
application.
17.7 Boot ROM
When the microcontroller contains a a 256 byte Boot ROM that is separate from the user’s
Flash program memory. This Boot ROM contains routines which handle all of the low level
details needed to erase and program the user Flash memory. A user program simply calls
a common entry point in the Boot ROM with appropriate parameters to accomplish the
desired operation. Boot ROM operations include operations such as erase sector, erase
page, program page, CRC, program security bit, etc. The Boot ROM occupies the
program memory space at the top of the address space from FF00 to FFFFh, thereby not
conflicting with the user program memory space. This function is in addition to the IAP-Lite
feature.
17.8 Power on reset code execution
The P89LPC952/954 contains two special Flash elements: the BOOT VECTOR and the
Boot Status Bit. Following reset, the P89LPC952/954 examines the contents of the Boot
Status Bit. If the Boot Status Bit is set to zero, power-up execution starts at location
0000H, which is the normal start address of the user’s application code. When the Boot
Status Bit is set to a va one, the contents of the Boot Vector is used as the high byte of the
execution address and the low byte is set to 00H.
The factory default settings for this device is shown in
The factory pre-programmed boot loader can be erased by the user. Users who wish to
use this loader should take cautions to avoid erasing the last 1 kB sector on the device.
Instead, the page erase function can be used to erase the eight 64-byte pages located in
this sector. A custom boot loader can be written with the Boot Vector set to the custom
boot loader, if desired.
17.9 Hardware activation of Boot Loader
The boot loader can also be executed by forcing the device into ISP mode during a
power-on sequence (see
). This is accomplished by powering up the device with
the reset pin initially held low and holding the pin low for a fixed time after V
DD
rises to its
Table 101. Boot loader address and default Boot vector
Product
Flash size End
address
Signature bytes
Sector
size
Page
size
Pre-programmed
serial loader
Default Boot
vector
Mfg id Id 1
Id 2
P89LPC952
8 kB
×
8
1FFFh
15h
DDh
28h
1 kB
×
8
64
×
8
1E00h to 1FFFh
1Fh
P89LPC954
16 kB
×
8
3FFFh
15h
DDh
7Ah
1 kB
×
8
64
×
8
3E00h to 3FFFh
3Fh