© Koninklijke Philips Electronics N.V. 2006. All rights reserved.
User manual
Rev. 01 — 12 January 2006
234
Philips Semiconductors
UM10161
Volume 1
Chapter 19: Flash memory
at addresses 0x7FFF E000 to 0x7FFF FFFF in all devices. ISP and IAP commands do not
allow write/erase/go operation on the boot block. The entire 8/16/32 kB of Flash memory
on the LPC2101/02/03 microcontrollers are available for user’s application.
19.6 Flash content protection mechanism
The LPC2101/02/03/8 is equipped with the Error Correction Code (ECC) capable Flash
memory. The purpose of an error correction module is twofold. Firstly, it decodes data
words read from the memory into output data words. Secondly, it 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 ECC is transparent to the running application. The ECC content itself is
stored in a flash memory not accessible by user’s code to either read from it or write into it
on its own. A byte of ECC corresponds to every consecutive 128 bits of the user
accessible Flash. Consequently, Flash bytes from 0x0000 0000 to 0x0000 0003 are
protected by the first ECC byte, Flash bytes from 0x0000 0004 to 0x0000 0007 are
protected by the second ECC byte, etc.
Whenever the CPU requests a read from user’s Flash, both 128 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’s Flash is made,
write of user specified content is accompanied by a matching ECC value calculated and
stored in the ECC memory.
When a sector of user’s Flash memory is erased, corresponding ECC bytes are also
erased. Once an ECC byte 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.
Table 208: Flash sectors in LPC2101, LPC2102, LPC2103
Sector
Number
Sector
Size [kB]
Address Range
LPC2
101
(8
kB)
LPC2
102
(16
k
B)
LPC2
103
(32
k
B)
0
4
0x0000 0000 - 0x0000 0FFF
+
+
+
1
4
0x0000 1000 - 0x0000 1FFF
+
+
+
2
4
0x0000 2000 - 0x0000 2FFF
+
+
3
4
0x0000 3000 - 0x0000 3FFF
+
+
4
4
0x0000 4000 - 0x0000 4FFF
+
5
4
0x0000 5000 - 0x0000 5FFF
+
6
4
0x0000 6000 - 0x0000 6FFF
+
7
4
0x0000 7000 - 0x0000 7FFF
+