|
S9S12GN48F0CLH Datasheet, PDF (1154/1292 Pages) Freescale Semiconductor, Inc – MC9S12G Family Reference Manual and Data Sheet | |||
|
◁ |
240 KByte Flash Module (S12FTMRG240K2V1)
31.3.2.9 P-Flash Protection Register (FPROT)
The FPROT register deï¬nes which P-Flash sectors are protected against program and erase operations.
Offset Module Base + 0x0008
R
W
Reset
7
FPOPEN
F1
6
RNV6
F1
5
FPHDIS
F1
4
3
FPHS[1:0]
F1
F1
2
FPLDIS
F1
= Unimplemented or Reserved
Figure 31-13. Flash Protection Register (FPROT)
1 Loaded from IFR Flash conï¬guration ï¬eld, during reset sequence.
1
0
FPLS[1:0]
F1
F1
The (unreserved) bits of the FPROT register are writable with the restriction that the size of the protected
region can only be increased (see Section 31.3.2.9.1, âP-Flash Protection Restrictions,â and Table 31-21).
During the reset sequence, the FPROT register is loaded with the contents of the P-Flash protection byte
in the Flash conï¬guration ï¬eld at global address 0x3_FF0C located in P-Flash memory (see Table 31-4)
as indicated by reset condition âFâ in Figure 31-13. To change the P-Flash protection that will be loaded
during the reset sequence, the upper sector of the P-Flash memory must be unprotected, then the P-Flash
protection byte must be reprogrammed. If a double bit fault is detected while reading the P-Flash phrase
containing the P-Flash protection byte during the reset sequence, the FPOPEN bit will be cleared and
remaining bits in the FPROT register will be set to leave the P-Flash memory fully protected.
Trying to alter data in any protected area in the P-Flash memory will result in a protection violation error
and the FPVIOL bit will be set in the FSTAT register. The block erase of a P-Flash block is not possible if
any of the P-Flash sectors contained in the same P-Flash block are protected.
Table 31-17. FPROT Field Descriptions
Field
Description
7
FPOPEN
Flash Protection Operation Enable â The FPOPEN bit determines the protection function for program or
erase operations as shown in Table 31-18 for the P-Flash block.
0 When FPOPEN is clear, the FPHDIS and FPLDIS bits deï¬ne unprotected address ranges as speciï¬ed by the
corresponding FPHS and FPLS bits
1 When FPOPEN is set, the FPHDIS and FPLDIS bits enable protection for the address range speciï¬ed by the
corresponding FPHS and FPLS bits
6
Reserved Nonvolatile Bit â The RNV bit should remain in the erased state for future enhancements.
RNV[6]
5
FPHDIS
Flash Protection Higher Address Range Disable â The FPHDIS bit determines whether there is a
protected/unprotected area in a speciï¬c region of the P-Flash memory ending with global address 0x3_FFFF.
0 Protection/Unprotection enabled
1 Protection/Unprotection disabled
4â3
Flash Protection Higher Address Size â The FPHS bits determine the size of the protected/unprotected area
FPHS[1:0] in P-Flash memory as shown inTable 31-19. The FPHS bits can only be written to while the FPHDIS bit is set.
1156
MC9S12G Family Reference Manual, Rev.1.23
Freescale Semiconductor
|
▷ |