English
Language : 

MC9S12NE64V1 Datasheet, PDF (92/554 Pages) Freescale Semiconductor, Inc – MC9S12NE64V1 Data Sheet
Chapter 2 64 Kbyte Flash Module (S12FTS64KV3)
2.4.1.3.2 Data Compress Command
The data compress command is used to check Flash code integrity by compressing data from a selected
portion of the Flash block into a signature analyzer. The starting address for the data compress operation
is defined by the address written during the command write sequence. The number of consecutive word
addresses compressed is defined by the data written during the command write sequence. The number of
words that can be compressed in a single data compress operation ranges from 1 to 16,384. After launching
the data compress command, the CCIF flag in the FSTAT register will set after the data compress
operation has completed. The number of bus cycles required to execute the data compress operation is
equal to two times the number of addresses read plus 20 bus cycles as measured from the time the CBEIF
flag is cleared until the CCIF flag is set. After the CCIF flag is set, the signature generated by the data
compress operation is available in the FDATA register. The signature in the FDATA register can be
compared to the expected signature to determine the integrity of the selected data stored in the Flash block.
If the last address of the Flash block is reached during the data compress operation, data compression will
continue with the starting address of the Flash block.
NOTE
Since the FDATA register (or data buffer) is written to as part of the data
compress operation, a command write sequence is not allowed to be
buffered behind a data compress command write sequence. The CBEIF flag
will not set after launching the data compress command to indicate that a
command must not be buffered behind it. If an attempt is made to start a new
command write sequence with a data compress operation active, the
ACCERR flag in the FSTAT register will be set. A new command write
sequence must only be started after reading the signature stored in the
FDATA register.
In order to take corrective action, it is recommended that the data compress command be executed on a
Flash sector or subset of a Flash sector. If the data compress operation on a Flash sector returns an invalid
signature, the Flash sector must be erased using the sector erase command and then reprogrammed using
the program command.
The data compress command can be used to verify that a sector or sequential set of sectors are erased.
MC9S12NE64 Data Sheet, Rev. 1.1
92
Freescale Semiconductor