Chapter 20 96 Kbyte Flash Module (S12FTS96KV1)
590
MC9S12C-Family / MC9S12GC-Family
Freescale Semiconductor
Rev 01.24
20.3.2.6
Flash Status Register (FSTAT)
The FSTAT register defines 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.
6
X
X
X
X
7
X
X
X
X
X
X
X
X
1. Allowed transitions marked with X.
Module Base + 0x0005
7
6
5
4
3
2
1
0
R
CBEIF
CCIF
PVIOL
ACCERR
0
BLANK
FAIL
DONE
W
Reset
1
1
0
0
0
0
0
1
= Unimplemented or Reserved
Figure 20-12. Flash Status Register (FSTAT)
Table 20-14. FSTAT Field Descriptions
Field
Description
7
CBEIF
Command Buffer Empty Interrupt Flag
— The CBEIF flag indicates that the address, data and command
buffers are empty so that a new command write sequence can be started. The CBEIF flag is cleared by writing
a 1 to CBEIF. Writing a 0 to the CBEIF flag 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 flag in the FSTAT register to be set. Writing a 0 to CBEIF outside of a command write sequence
will not set the ACCERR flag. The CBEIF flag is used together with the CBEIE bit in the FCNFG register to
generate an interrupt request (see
).
0 Buffers are full
1 Buffers are ready to accept a new command
6
CCIF
Command Complete Interrupt Flag
— The CCIF flag indicates that there are no more commands pending. The
CCIF flag is cleared when CBEIF is clear and sets automatically upon completion of all active and pending
commands. The CCIF flag does not set when an active commands completes and a pending command is
fetched from the command buffer. Writing to the CCIF flag has no effect. The CCIF flag is used together with the
CCIE bit in the FCNFG register to generate an interrupt request (see
0 Command in progress
1 All commands are completed
Table 20-13. Flash Protection Scenario Transitions
From
Protection
Scenario
To Protection Scenario
(1)
0
1
2
3
4
5
6
7
Summary of Contents for MC9S12C Family
Page 689: ......