© Koninklijke Philips Electronics N.V. 2006. All rights reserved.
User manual
Rev. 01 — 12 January 2006
229
19.1 Flash boot loader
The flash boot loader controls initial operation after reset and also provides the means to
accomplish programming of the flash memory. This could be initial programming of a
blank device, erasure and re-programming of a previously programmed device, or
programming of the flash memory by the application program in a running system.
19.2 Features
•
In-System Programming: In-System programming (ISP) is programming or
reprogramming the on-chip flash memory using the boot loader software and a serial
port. This can be done when the part resides in the end-user board.
•
In Application Programming: In-Application (IAP) programming is performing erase
and write operation on the on-chip flash memory, as directed by the end-user
application code.
19.3 Applications
The flash boot loader provides both In-System and In-Application programming interfaces
for programming the on-chip flash memory.
19.4 Description
The boot loader code is executed every time the part is powered on or reset. The loader
can execute the ISP command handler or the user application code. A a LOW level after
reset at the P0.14 pin is considered as an external hardware request to start the ISP
command handler. Assuming that proper signal is present on X1 pin when the rising edge
on RESET pin is generated, it may take up to 3 ms before P0.14 is sampled and the
decision on whether to continue with user code or ISP handler is made. If P0.14 is
sampled LOW and the watchdog overflow flag is set, the external hardware request to
start the ISP command handler is ignored. If there is no request for the ISP command
handler execution (P0.14 is sampled HIGH after reset), a search is made for a valid user
program. If a valid user program is found then the execution control is transferred to it. If a
valid user program is not found, the auto-baud routine is invoked.
Pin P0.14 that is used as hardware request for ISP requires special attention. Since P0.14
is in high impedance mode after reset, it is important that the user provides external
hardware (a pull-up resistor or other device) to put the pin in a defined state. Otherwise
unintended entry into ISP mode may occur.
19.4.1 Memory map after any reset
The boot block is 8 kB in size and resides in the top of the on-chip memory space (starting
from 0x7FFF E000). Both the ISP and IAP software use parts of the on-chip RAM. The
RAM usage is described later in this chapter. The interrupt vectors residing in the boot
block of the on-chip flash memory also become active after reset, i.e., the bottom 64 bytes
UM10161
Chapter 19: Flash memory system and programming
Rev. 01 — 12 January 2006
User manual