Chapter 29 1024 KByte Flash Module (S12XFTM1024K5V2)
MC9S12XE-Family Reference Manual Rev. 1.19
Freescale Semiconductor
1175
29.4.2
Flash Command Description
This section provides details of all available Flash commands launched by a command write sequence. The
ACCERR bit in the FSTAT register will be set during the command write sequence if any of the following
illegal steps are performed, causing the command not to be processed by the Memory Controller:
•
Starting any command write sequence that programs or erases Flash memory before initializing the
FCLKDIV register
•
Writing an invalid command as part of the command write sequence
•
For additional possible errors, refer to the error handling table provided for each command
If a Flash block is read during execution of an algorithm (CCIF = 0) on that same block, the read operation
will return invalid data. If the SFDIF or DFDIF flags were not previously set when the invalid read
operation occurred, both the SFDIF and DFDIF flags will be set and the FECCR registers will be loaded
with the global address used in the invalid read operation with the data and parity fields set to all 0.
If the ACCERR or FPVIOL bits are set in the FSTAT register, the user must clear these bits before starting
any command write sequence (see
0x08
Erase All Blocks
Erase all D-Flash (and P-Flash) blocks.
An erase of all Flash blocks is only possible when the FPLDIS, FPHDIS, and FPOPEN
bits in the FPROT register and the EPDIS and EPOPEN bits in the EPROT register are
set prior to launching the command.
0x0B
Unsecure Flash
Supports a method of releasing MCU security by erasing all D-Flash (and P-Flash) blocks
and verifying that all D-Flash (and P-Flash) blocks are erased.
0x0D
Set User Margin
Level
Specifies a user margin read level for the D-Flash block.
0x0E
Set Field Margin
Level
Specifies a field margin read level for the D-Flash block (special modes only).
0x0F
Full Partition D-
Flash
Erase the D-Flash block and partition an area of the D-Flash block for user access.
0x10
Erase Verify D-
Flash Section
Verify that a given number of words starting at the address provided are erased.
0x11
Program D-Flash
Program up to four words in the D-Flash block.
0x12
Erase D-Flash
Sector
Erase all bytes in a sector of the D-Flash block.
0x13
Enable EEPROM
Emulation
Enable EEPROM emulation where writes to the buffer RAM EEE partition will be copied
to the D-Flash EEE partition.
0x14
Disable EEPROM
Emulation
Suspend all current erase and program activity related to EEPROM emulation but leave
current EEE tags set.
0x15
EEPROM
Emulation Query
Returns EEE partition and status variables.
0x20
Partition D-Flash
Partition an area of the D-Flash block for user access.
Table 29-32. D-Flash Commands (continued)
FCMD
Command
Function on D-Flash Memory
Because
of
an
order
from
the
United
States
International
Trade
Commission,
BGA-packaged
product
lines
and
part
numbers
indicated
here
currently
are
not
available
from
Freescale
for
import
or
sale
in
the
United
States
prior
to
September
2010:
S12XE
products
in
208
MAPBGA
packages