UM10503
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2015. All rights reserved.
User manual
Rev. 2.1 — 10 December 2015
73 of 1441
NXP Semiconductors
UM10503
Chapter 6: LPC43xx/LPC43Sxx flash programming/ISP and IAP
6.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 offset 0x2FC. 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.
[1]
Program the CRP pattern at address 0x1A00 02FC for flash bank A and at 0x1B00 02FC for flash bank B.
Table 32.
Code Read Protection options
Name
Pattern
programmed at
offset 0x2FC
Description
CRP1
0x1234 5678
Access to chip via the JTAG pins is disabled. This mode allows partial flash update using the
following ISP commands and restrictions:
•
Read Memory command: disabled.
•
Copy RAM to Flash command: cannot write to Sector 0.
•
Go command: disabled.
•
Erase sectors command: can erase any individual sector except sector 0 only, or can
erase all sectors at once.
•
Compare command: disabled. This mode is useful when CRP is required and flash field
updates are needed but all sectors can not be erased. The compare command is
disabled, so in the case of partial flash updates the secondary loader should implement
a checksum mechanism to verify the integrity of the flash.
•
Activate flash bank not allowed.
CRP2
0x8765 4321
This is similar to CRP1 with the following additions:
•
Write to RAM command: disabled.
•
Copy RAM to Flash: disabled.
•
Erase command: only allows erase of all sectors.
CRP3
0x4321 8765
This is similar to CRP2, but ISP entry by pulling P2_7 LOW is disabled if a valid user code is
present in flash sector 0.
This mode effectively disables ISP override using the P2_7 pin. It is up to the user’s
application to provide for flash updates by using IAP calls or by invoking ISP.
Caution: If CRP3 is selected, no future factory testing can be performed on the device.
NO_ISP
0x4E69 7370
Disables ISP request using the P2_7 pin.