
Chapter 2 128 Kbyte Flash Module (FTS128K1V1)
MC9S12E128 Data Sheet, Rev. 1.07
Freescale Semiconductor
97
2.3.2.6
Flash Status Register (FSTAT)
The FSTAT register denes the status of the Flash command controller and the results of command
execution.
In normal modes, bits CBEIF, PVIOL, and ACCERR are readable and writable, bits CCIF and BLANK
are readable and not writable, remaining bits, including FAIL and DONE, read 0 and are not writable. In
special modes, FAIL is readable and writable while DONE is readable but not writable. FAIL must be clear
in special modes when starting a command write sequence.
6X
X
7
XXXXXXXX
1 Allowed transitions marked with X.
Module Base + 0x0005
76543210
R
CBEIF
CCIF
PVIOL
ACCERR
0
BLANK
FAIL
DONE
W
Reset
11000001
= Unimplemented or Reserved
Figure 2-10. Flash Status Register (FSTAT)
Table 2-13. FSTAT Field Descriptions
Field
Description
7
CBEIF
Command Buffer Empty Interrupt Flag — The CBEIF ag indicates that the address, data and command
buffers are empty so that a new command write sequence can be started. The CBEIF ag is cleared by writing
a 1 to CBEIF. Writing a 0 to the CBEIF ag has no effect on CBEIF. Writing a 0 to CBEIF after writing an aligned
word to the Flash address space but before CBEIF is cleared will abort a command write sequence and cause
the ACCERR ag in the FSTAT register to be set. Writing a 0 to CBEIF outside of a command write sequence
will not set the ACCERR ag. The CBEIF ag is used together with the CBEIE bit in the FCNFG register to
0 Buffers are full
1 Buffers are ready to accept a new command
6
CCIF
Command Complete Interrupt Flag — The CCIF ag indicates that there are no more commands pending. The
CCIF ag is cleared when CBEIF is clear and sets automatically upon completion of all active and pending
commands. The CCIF ag does not set when an active commands completes and a pending command is
fetched from the command buffer. Writing to the CCIF ag has no effect. The CCIF ag is used together with the
CCIE bit in the FCNFG register to generate an interrupt request (see
Figure 2-26).0 Command in progress
1 All commands are completed
Table 2-12. Flash Protection Scenario Transitions
From
Protection
Scenario
To Protection Scenario1
01234567