
UM10800
All information provided in this document is subject to legal disclaimers.
© NXP Semiconductors N.V. 2016. All rights reserved.
User manual
Rev. 1.2 — 5 October 2016
370 of 487
NXP Semiconductors
UM10800
Chapter 25: LPC82x Flash In-System and In-Application Programming
The operation of the ECC is transparent to the running application. The ECC content itself
is stored in a flash memory not accessible by the user’s code to either read from it or write
into it on its own. Six bits of ECC corresponds to every consecutive 32 bit of the user
accessible Flash. Consequently, Flash bytes from 0x0000 0000 to 0x0000 0003 are
protected by the first 6 bit ECC, Flash bytes from 0x0000 0004 to 0x0000 0007 are
protected by the second 6-bit ECC byte, etc.
Whenever the CPU requests a read from the user accessible Flash, both 32 bits of raw
data containing the specified memory location and the matching ECC byte are evaluated.
If the ECC mechanism detects a single error in the fetched data, a correction will be
applied before data are provided to the CPU. When a write request into the user
accessible Flash is made, writing the user specified content is accompanied by a
matching ECC value calculated and stored in the ECC memory.
When a sector of Flash memory is erased, the corresponding ECC bits are also erased.
Once a 6-bit ECC is written, it can not be updated unless it is erased first. Therefore, for
the implemented ECC mechanism to perform properly, data must be written into the flash
memory in groups of 4 bytes (or multiples of 4), aligned as described above.
25.5.3 Code Read Protection (CRP)
Code Read Protection is a mechanism that allows the 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 0x0000 02FC. 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.