Memory
MCF51CN128 Reference Manual, Rev. 6
Freescale Semiconductor
4-27
4.4.2.3
Flash Configuration Register (FCNFG)
The FCNFG register gates the security backdoor writes.
KEYACC is readable and writable while all remaining bits read 0 and are not writable. KEYACC is only
writable if KEYEN is set to the enabled state (see
Section 4.4.2.2, “Flash Options Register (FOPT and
).
NOTE
Flash array reads are allowed while KEYACC is set.
4.4.2.4
Flash Protection Register (FPROT and NVPROT)
The FPROT register defines which flash sectors are protected against program or erase operations. FPROT
bits are readable and writable if the size of the protected flash memory is being increased. Any write to
FPROT that attempts to decrease the size of the protected flash memory is ignored.
During the reset sequence, the FPROT register is loaded from the flash protection byte in the flash
configuration field, indicated by F in
. To change the flash protection loaded during the reset
sequence, the flash sector containing the flash configuration field must be unprotected. Then, the flash
protection byte must be reprogrammed.
Trying to alter data in any protected area in the flash memory results in a protection violation error and
FSTAT[FPVIOL] is set. The mass erase of the flash array is not possible if any of the flash sectors
contained in the flash array are protected.
7
6
5
4
3
2
1
0
R
0
0
KEYACC
0
0
0
0
0
W
Reset
0
0
0
0
0
0
0
0
Figure 4-6. Flash Configuration Register (FCNFG)
Table 4-10.
FCNFG Field Descriptions
Field
Description
7–6
Reserved, must be cleared.
5
KEYACC
Enable Security Key Writing
0 Writes to the flash block are interpreted as the start of a command write sequence.
1 Writes to the flash block are interpreted as keys to open the backdoor.
4–0
Reserved, must be cleared.
7
6
5
4
3
2
1
0
R
FPS
FPOPEN
W
Reset
F
F
F
F
F
F
F
F
Figure 4-7. Flash Protection Register (FPROT)