Chapter 19 64 Kbyte Flash Module (S12FTS64KV4)
Freescale Semiconductor
MC9S12C-Family / MC9S12GC-Family
549
Rev 01.24
FPHDIS is cleared. The FPROT register is loaded from Flash address 0xFF0D during the reset sequence,
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 and FPLDIS while the size of the protected sector is
dened by FPHS[1:0] and FPLS[1:0] in the FPROT register.
Trying to alter any of the protected areas will result in a protect violation error and the PVIOL ag will be
set in the FSTAT register (see
Section 19.3.2.6). A mass erase of the whole Flash array is only possible
when protection is fully disabled by setting the FPOPEN, FPLDIS, and FPHDIS bits. An attempt to mass
erase a Flash array while protection is enabled will set the PVIOL ag in the FSTAT register.
Table 19-9. FPROT Field Descriptions
Field
Description
7
FPOPEN
Protection Function for Program or Erase — It is possible using the FPOPEN bit to either select address
ranges to be protected using FPHDIS, FPLDIS, FPHS[1:0] and FPLS[1:0] or to select the same ranges to be
unprotected. When FPOPEN is set, FPxDIS enables the ranges to be protected, whereby clearing FPxDIS
enables protection for the range specied by the corresponding FPxS[1:0] bits. When FPOPEN is cleared,
FPxDIS denes unprotected ranges as specied by the corresponding FPxS[1:0] bits. In this case, setting
FPxDIS enables protection. Thus the effective polarity of the FPxDIS bits is swapped by the FPOPEN bit as
shown in
Table 19-10. This function allows the main part of the Flash array to be protected while a small range
can remain unprotected for EEPROM emulation.
0 The FPHDIS and FPLDIS bits dene Flash address ranges to be unprotected
1 The FPHDIS and FPLDIS bits dene Flash address ranges to be protected
6
NV6
Nonvolatile Flag Bit — The NV6 bit should remain in the erased state for future enhancements.
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
FPHS[1:0]
Flash Protection Higher Address Size — The FPHS[1:0] bits determine the size of the protected/unprotected
sector as shown in
Table 19-11. The FPHS[1:0] bits can only be written to while the FPHDIS bit is set.
2
FPLDIS
Flash Protection Lower Address Range Disable — The FPLDIS bit determines whether there is a
protected/unprotected sector in the lower space of the Flash address map.
0 Protection/unprotection enabled
1 Protection/unprotection disabled
1–0
FPLS[1:0]
Flash Protection Lower Address Size — The FPLS[1:0] bits determine the size of the protected/unprotected
sector as shown in
Table 19-12. The FPLS[1:0] bits can only be written to while the FPLDIS bit is set.