English
Language : 

MC9S12C128V1 Datasheet, PDF (479/690 Pages) Freescale Semiconductor, Inc – MC9S12C Family MC9S12GC Family Reference Manual
Chapter 17 16 Kbyte Flash Module (S12FTS16KV1)
To change the Flash protection that will be loaded on reset, the upper sector of the Flash array must be
unprotected, then the Flash protection byte located at Flash address 0xFF0D must be written to.
A protected Flash sector is disabled by FPHDIS while the size of the protected sector is defined by
FPHS[1:0] in the FPROT register.
Trying to alter any of the protected areas will result in a protect violation error and the PVIOL flag will be
set in the FSTAT register (see Section 17.3.2.6). A mass erase of the whole Flash array is only possible
when protection is fully disabled by setting the FPOPEN and FPHDIS bits. An attempt to mass erase a
Flash array while protection is enabled will set the PVIOL flag in the FSTAT register.
Table 17-8. FPROT Field Descriptions
Field
Description
7
FPOPEN
Protection Function for Program or Erase — The FPOPEN bit is used to either select an address range to be
protected using the FPHDIS and FPHS[1:0] bits or to select the same address range to be unprotected as shown
in Table 17-9.
0 The FPHDIS bit allows a Flash address range to be unprotected
1 The FPHDIS bit allows a Flash address range to be protected
6
Nonvolatile Flag Bit — The NV6 bit should remain in the erased state for future enhancements.
NV6
5
FPHDIS
Flash Protection Higher Address Range Disable — The FPHDIS bit determines whether there is a
protected/unprotected area in the higher space of the Flash address map.
0 Protection/unprotection enabled
1 Protection/unprotection disabled
4–3
Flash Protection Higher Address Size — The FPHS[1:0] bits determine the size of the protected/unprotected
FPHS[1:0] sector as shown in Table 17-10. The FPHS[1:0] bits can only be written to while the FPHDIS bit is set.
2–0
Nonvolatile Flag Bits — The NV[2:0] bits should remain in the erased state for future enhancements.
NV[2:0]
Table 17-9. Flash Protection Function
FPOPEN FPHDIS FPHS1 FPHS0
1
1
x
x
1
0
x
x
0
1
x
x
0
0
x
x
1. For range sizes refer to Table 17-10.
Function(1)
No protection
Protect high range
Full Flash array protected
Unprotected high range
Table 17-10. Flash Protection Higher Address Range
FPHS[1:0]
00
01
10
11
Address Range
0xF800–0xFFFF
0xF000–0xFFFF
0xE000–0xFFFF
0xC000–0xFFFF
Range Size
2 Kbytes
4 Kbytes
8 Kbytes
16 Kbytes
Freescale Semiconductor
MC9S12C-Family / MC9S12GC-Family
479
Rev 01.24