
UM10375
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2011. All rights reserved.
User manual
Rev. 3 — 14 June 2011
323 of 368
NXP Semiconductors
UM10375
Chapter 21: LPC13xx Flash memory programming firmware
21.9 USB communication protocol
The LPC134x is enumerated as a Mass Storage Class (MSC) device to a PC or another
embedded system. In order to connect via the USB interface, the LPC134x must use the
external crystal at a frequency of 12 MHz. The MSC device presents an easy integration
with the PC’s Windows operating system. The LPC134x flash memory space is
represented as a drive in the host file system. The entire available user flash is mapped to
a file of the size of the LPC134x flash in the host’s folder with the default name
‘firmware.bin’. The ‘firmware.bin’ file can be deleted and a new file can be copied into the
directory, thereby updating the user code in flash. Note that the filename of the new flash
image file is not important. After a reset or a power cycle, the new file is visible in the
host’s file system under it’s default name ‘firmware.bin’.
Remark:
USB ISP commands are supported for Windows operating system only.
The code read protection (CRP, see
) level determines how the flash is
reprogrammed:
If CRP1 or CRP2 is enabled, the user flash is erased when the file is deleted.
If CRP1 is enabled or no CRP is selected, the user flash is erased and reprogrammed
when the new file is copied. However, only the area occupied by the new file is erased
and reprogrammed.
Remark:
The only Windows commands supported for the LPC134x flash image folder are
copy and delete.
Three Code Read Protection (CRP) levels can be enabled for flash images updated
through USB (see
for details). The volume label on the MSCD indicates the
CRP status.
21.9.1 Usage note
When programming flash images via Flash Magic or Serial Wire Debugger (SWD), the
user code valid signature is automatically inserted by the programming utility. When using
USB ISP, the user code valid signature must be either part of the vector table, or the axf or
binary file must be post-processed to insert the checksum.
Table 312. CRP levels for USB boot images
CRP status
Volume label
Description
No CRP
CRP DISABLD
The user flash can be read or written.
CRP1
CRP1 ENABLD
The user flash content cannot be read but can be updated. The
flash memory sectors are updated depending on the new
firmware image.
CRP2
CRP2 ENABLD
The user flash content cannot be read but can be updated. The
entire user flash memory is erased before writing the new
firmware image.
CRP3
CRP3 ENABLD
The user flash content cannot be read or updated. The
bootloader always executes the user application if valid.