Datasheet

UM10398 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2014. All rights reserved.
User manual Rev. 12.3 — 10 June 2014 416 of 547
NXP Semiconductors
UM10398
Chapter 26: LPC111x/LPC11Cxx Flash programming firmware
26.2 Features
In-System Programming: In-System programming (ISP) is programming or
reprogramming the on-chip flash memory, using the bootloader software and UART
serial port or the C_CAN interface. 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.
Flash access times can be configured through a register in the flash controller block.
Erase time for one sector is 100 ms ± 5%. Programming time for one block of 256
bytes is 1 ms ± 5%.
26.3 General description
26.3.1 Bootloader
The bootloader controls initial operation after reset and also provides the means to
accomplish programming of the flash memory via UART or C_CAN. 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.
The bootloader 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 LOW level after
reset at the PIO0_1 pin is considered as an external hardware request to start the ISP
command handler either via UART or C_CAN, if present.
Remark: SRAM location 0x1000 0000 to 0x1000 0050 is not used by the bootloader and
the memory content in this area is retained during reset. SRAM memory is not retained
when the part powers down or enters Deep power-down mode.
If the C_CAN interface is present (LPC11Cx parts), the state of pin PIO0_3 at reset
together with a LOW level on pin PIO0_1 determines whether UART ISP or C_CAN ISP
routines are called:
If PIO0_3 is LOW, the bootloader configures the C_CAN interface and calls the
C_CAN ISP command handler.
PIO0_3 is HIGH, the bootloader configures the UART serial port and calls the UART
ISP command handler (this is the default).
Remark: On parts without C_CAN interface, the state of pin PIO0_3 does not matter.
Assuming that power supply pins are on their nominal levels when the rising edge on
RESET
pin is generated, it may take up to 3 ms before PIO0_1 is sampled and the
decision whether to continue with user code or ISP handler is made. If PIO0_1 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 (PIO0_1 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.