
DR
AFT
DR
AFT
DRAFT
DR
D
RAFT
DRAFT
DRA
FT DRAF
D
RAFT DRAFT DRAFT DRAFT DRAFT D
DRAFT
D
RAFT DRA
FT DRAFT DRAFT DRAFT DRA
UM10360_0
© NXP B.V. 2009. All rights reserved.
User manual
Rev. 00.06 — 5 June 2009
594 of 808
NXP Semiconductors
UM10360
Chapter 32: LPC17xx Flash memory interface and programming
6.
Code Read Protection (CRP)
Code Read Protection is a mechanism that allows user to enable different levels of
security in the system so that access to the on-chip flash and use of the ISP can be
restricted. When needed, CRP is invoked by programming a specific pattern in flash
location at 0x000002FC. IAP commands are not affected by the code read protection.
Important: Any CRP change becomes effective only after the device has gone
through a power cycle.
Table 550. Code Read Protection options
Name Pattern
programmed
in 0x000002FC
Description
CRP1
0x12345678
Access to chip via the JTAG pins is disabled. This mode allows partial
flash update using the following ISP commands and restrictions:
•
Write to RAM command can not access RAM below 0x10000200.
This is due to use of the RAM by the ISP code, see
•
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
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
0x87654321
Access to chip via the JTAG 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
0x43218765
Access to chip via the JTAG pins is disabled. ISP entry by pulling P2.10
LOW is disabled if a valid user code is present in flash sector 0.
This mode effectively disables ISP override using the P2.10 pin. It is up
to the user’s application to provide for flash updates by using IAP calls or
by re-invoking ISP via UART0.
Caution: If CRP3 is selected, no future factory testing can be
performed on the device.