UM10462
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2016. All rights reserved.
User manual
Rev. 5.5 — 21 December 2016
390 of 523
NXP Semiconductors
UM10462
Chapter 20: LPC11U3x/2x/1x Flash programming firmware
20.2 Bootloader
The bootloader controls initial operation after reset and also provides the means to
program 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.
The bootloader version can be read by ISP/IAP calls (see
or
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.
20.3 Features
•
In-System Programming: In-System programming (ISP) is programming or
reprogramming the on-chip flash memory, using the bootloader software and the
UART 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.
•
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%.
•
Support for ISP via the USB port through enumeration as a Mass Storage Class
(MSC) Device when connected to a USB host interface. See
for
supported parts.
20.4 Description
The bootloader code is executed every time the part is powered on or reset (see
). The loader can execute the ISP command handler or the user application
code. A LOW level during reset at the PIO0_1 pin is considered an external hardware
request to start the ISP command handler (or the USB device handler - see
)
without checking for a valid user code first.
Assuming that power supply pins are at their nominal levels when the rising edge on
RESET pin is generated, it may take up to 3 ms before the ISP entry pin is sampled and
the decision whether to continue with user code or ISP handler is made. The boot loader
performs the following steps (see
1. If the watchdog overflow flag is set, the boot loader checks whether a valid user code
is present. If the watchdog overflow flag is not set, the ISP entry pin is checked.
2. If there is no request for the ISP command handler execution (ISP entry pin is
sampled HIGH after reset), a search is made for a valid user program.
3. If a valid user program is found then the execution control is transferred to it. If a valid
user program is not found, the boot loader checks the USB boot pin to load a user
code either via USB or UART.