
UM10850
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2016. All rights reserved.
User manual
Rev. 2.4 — 13 September 2016
420 of 464
NXP Semiconductors
UM10850
Chapter 31: LPC5410x Flash API
Table 474. Code Read Protection (CRP) options
Name
Pattern programmed
in 0x0000 02FC
Description
NO_ISP 0x4E69 7370
Prevents sampling of the pin for entering ISP mode. ISP sampling pin is available for
other applications.
CRP1
0x1234 5678
Access to chip via the SWD pins is disabled. This mode allows partial flash update using
the following ISP commands and restrictions:
•
Write to RAM command cannot access RAM below 0x0200 0300.
•
Copy RAM to flash command can not write to Sector 0.
•
Erase command can erase Sector 0 only when all sectors are selected for erase.
•
Compare command is disabled.
•
Read Memory command is disabled.
This mode is useful when CRP is required and flash field updates are needed but all
sectors can not be erased. Since compare command is disabled in case of partial
updates the secondary loader should implement checksum mechanism to verify the
integrity of the flash.
CRP2
0x8765 4321
Access to chip via the SWD pins is disabled. The following ISP commands are disabled:
•
Read Memory
•
Write to RAM
•
Go
•
Copy RAM to flash
•
Compare
When CRP2 is enabled the ISP erase command only allows erasure of all user sectors.
CRP3
0x4321 8765
Access to chip via the SWD pins is disabled. ISP entry selected via the ISP entry pin is
disabled if a valid user code is present in flash sector 0.
This mode effectively disables ISP override using the entry pin. It is up to the user’s
application to provide a flash update mechanism using IAP calls or call reinvoke ISP
command to enable flash update via USART0.
Caution: If CRP3 is selected, no future factory testing can be performed on the
device.
Table 475. ISP commands allowed for different CRP levels
ISP command
CRP1
CRP2
CRP3 (no entry in
ISP mode allowed)
Unlock
yes
yes
n/a
Set Baud Rate
yes
yes
n/a
Echo
yes
yes
n/a
Write to RAM
yes; above 0x0200 0300 only
no
n/a
Read Memory
no
no
n/a
Prepare sectors for write operation yes
yes
n/a
Copy RAM to flash
yes; not to sector 0
no
n/a
Go
no
no
n/a
Erase sector(s)
yes; sector 0 can only be erased when all
sectors are erased.
yes; all sectors only n/a
Erase page(s)
yes; page 0 can only be erased when all
pages are erased (not recommended, use
Erase Sector).
yes; all pages only
n/a
Blank check sectors
no
no
n/a