Chapter 21 128 Kbyte Flash Module (S12FTS128K1V1)
626
MC9S12C-Family / MC9S12GC-Family
Freescale Semiconductor
Rev 01.24
21.3.2.7
Flash Command Register (FCMD)
The FCMD register defines the Flash commands.
Bits CMDB6, CMDB5, CMDB2, and CMDB0 are readable and writable during a command write
sequence while bits 7, 4, 3, and 1 read 0 and are not writable.
5
PVIOL
Protection Violation
— The PVIOL flag indicates an attempt was made to program or erase an address in a
protected Flash array memory area. The PVIOL flag is cleared by writing a 1 to PVIOL. Writing a 0 to the PVIOL
flag has no effect on PVIOL. While PVIOL is set, it is not possible to launch another command.
0 No protection violation detected
1 Protection violation has occurred
4
ACCERR
Access Error
— The ACCERR flag indicates an illegal access to the Flash array caused by either a violation of
the command write sequence, issuing an illegal command (illegal combination of the CMDBx bits in the FCMD
register) or the execution of a CPU STOP instruction while a command is executing (CCIF=0). The ACCERR flag
is cleared by writing a 1 to ACCERR. Writing a 0 to the ACCERR flag has no effect on ACCERR. While ACCERR
is set, it is not possible to launch another command.
0 No access error detected
1 Access error has occurred
2
BLANK
Flash Array Has Been Verified as Erased
— The BLANK flag indicates that an erase verify command has
checked the Flash array and found it to be erased. The BLANK flag is cleared by hardware when CBEIF is
cleared as part of a new valid command write sequence. Writing to the BLANK flag has no effect on BLANK.
0 If an erase verify command has been requested, and the CCIF flag is set, then a 0 in BLANK indicates the
array is not erased
1 Flash array verifies as erased
1
FAIL
Flag Indicating a Failed Flash Operation
— In special modes, the FAIL flag will set if the erase verify operation
fails (Flash array verified as not erased). Writing a 0 to the FAIL flag has no effect on FAIL. The FAIL flag is cleared
by writing a 1 to FAIL. While FAIL is set, it is not possible to launch another command.
0 Flash operation completed without error
1 Flash operation failed
0
DONE
Flag Indicating a Failed Operation is not Active
— In special modes, the DONE flag will clear if a program,
erase, or erase verify operation is active.
0 Flash operation is active
1 Flash operation is not active
Module Base + 0x0006
7
6
5
4
3
2
1
0
R
0
CMDB6
CMDB5
0
0
CMDB2
0
CMDB0
W
Reset
0
0
0
0
0
0
0
0
= Unimplemented or Reserved
Figure 21-11. Flash Command Register (FCMD)
Table 21-13. FSTAT Field Descriptions
Field
Description
Summary of Contents for MC9S12C Family
Page 689: ......