UM10310_1
© NXP B.V. 2008. All rights reserved.
User manual
Rev. 01 — 1 December 2008
118 of 139
NXP Semiconductors
UM10310
P89LPC9321 User manual
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.
18.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
normal operating value. This is followed by three, and only three, properly timed low-going
pulses. Fewer or more than three pulses will result in the device not entering ISP mode.
Timing specifications may be found in the data sheet for this device.
This has the same effect as having a non-zero status bit. This allows an application to be
built that will normally execute the user code but can be manually forced into ISP
operation. If the factory default setting for the Boot Vector is changed, it will no longer
point to the factory pre-programmed ISP boot loader code. If this happens, the only way it
is possible to change the contents of the Boot Vector is through the parallel or ICP
programming method, provided that the end user application does not contain a
customized loader that provides for erasing and reprogramming of the Boot Vector and
Boot Status Bit. After programming the Flash, the status byte should be programmed to
zero in order to allow execution of the user’s application code beginning at address
0000H.
18.10 In-system programming (ISP)
In-System Programming is performed without removing the microcontroller from the
system. The In-System Programming facility consists of a series of internal hardware
resources coupled with internal firmware to facilitate remote programming of the
P89LPC9321 through the serial port. This firmware is provided by NXP and embedded
within each P89LPC9321 device. The NXP In-System Programming facility has made
in-circuit programming in an embedded application possible with a minimum of additional
Table 107. 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
P89LPC9321
8 kB
×
8
1FFFh
15h
DDh
2Fh
1 kB
×
8
64
×
8
1E00h to 1FFFh
1Fh
Fig 52. Forcing ISP mode.
002aaa912
V
DD
RST
t
RL
t
VR
t
RH