DRAFT
DRAFT DRAFT DR
DRAFT DRAFT DRAFT
D
RAF
DRAFT DRAFT DRA
FT D
RAFT DR
AFT D
DRA
FT DRAFT DRAFT
D
RAFT
DRAFT
D
RAFT
DRA
UM10601
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2012. All rights reserved.
Preliminary user manual
Rev. 1.0 — 7 November 2012
241 of 313
NXP Semiconductors
UM10601
Chapter 21: LPC800 Flash ISP and IAP programming
21.3.2 Flash content protection mechanism
The part is equipped with the Error Correction Code (ECC) capable Flash memory. The
purpose of an error correction module is twofold:
The ECC first decodes data words read from the memory into output data words. Then,
the ECC encodes data words to be written to the memory. The error correction capability
consists of single bit error correction with Hamming code.
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. 6 bit 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.
21.3.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.
6
1
96 - 111
0x0000 1800 - 0x0000 1BFF
-
yes
yes
7
1
112 - 127
0x0000 1C00 - 0x0000 1FFF
-
yes
yes
8
1
128 - 143
0x0000 2000 - 0x0000 23FF
-
yes
yes
9
1
144 - 159
0x0000 2400 - 0x0000 27FF
yes
yes
yes
10
1
160 - 175
0x0000 2800 - 0x0000 2BFF
yes
yes
yes
11
1
176 - 191
0x0000 2C00 - 0x0000 2FFF
yes
yes
yes
12
1
192 - 207
0x0000 3000 - 0x0000 33FF
yes
yes
yes
13
1
208 - 223
0x0000 3400 - 0x0000 37FF
yes
yes
yes
14
1
224 - 239
0x0000 3800 - 0x0000 3BFF
yes
yes
yes
15
1
240 - 255
0x0000 3C00 - 0x0000 3FFF
yes
yes
yes
Table 213. LPC800 flash configuration
Sector
number
Sector
size
[kB]
Page
number
Address range
4 kB
8 kB
16 kB