
UM10413
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2011. All rights reserved.
User manual
Rev. 1 — 16 December 2011
223 of 268
NXP Semiconductors
UM10413
MPT612 User manual
25.7 Flash content protection mechanism
The MPT612 is equipped with the Error Correction Code (ECC) capable flash memory.
The purpose of an error correction module is twofold. First, it decodes data words read
from the memory into output data words. Second, 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 the 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 000F are
protected by the first ECC byte, and flash bytes from 0x0000 0010 to 0x0000 001F are
protected by the second ECC byte, and so on,
Whenever the CPU requests a read from the 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 is applied before
data are provided to the CPU. If a write request into the user’s flash is made, a write of
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 bytes are also erased.
Once an ECC byte is written, it cannot 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 16 bytes (or multiples of 16), aligned as described above.
25.8 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 01FC. IAP commands are not affected by the code read protection.
Remark:
Any CRP change becomes effective only after the device has gone through a
reset.
Table 211. Flash sectors in MPT612
Sector
number
Sector size
[kB]
Address range
MPT612 32 kB
0
4
0x0000 0000 to 0x0000 0FFF
+
1
4
0x0000 1000 to 0x0000 1FFF
+
2
4
0x0000 2000 to 0x0000 2FFF
+
3
4
0x0000 3000 to 0x0000 3FFF
+
4
4
0x0000 4000 to 0x0000 4FFF
+
5
4
0x0000 5000 to 0x0000 5FFF
+
6
4
0x0000 6000 to 0x0000 6FFF
+
7
4
0x0000 7000 to 0x0000 7FFF
+