Datasheet
When the FCLKDIV register is written, the FCLKDIV[FDIVLD] bit is set automatically.
If the FCLKDIV[FDIVLD] bit is 0, the FCLKDIV register has not been written since the
last reset. If the FCLKDIV register has not been written, any flash and EEPROM
program or erase command loaded during a command write sequence will not execute
and the FSTAT[ACCERR] bit will be set.
4.5.2.4.2 Command write sequence
The memory controller will launch all valid flash and EEPROM commands entered using
a command write sequence.
Before launching a command, the FSTAT[ACCERR] and FSTAT[FPVIOL] bits must be
clear and the FSTAT[CCIF] flag will be tested to determine the status of the current
command write sequence. If FSTAT[CCIF] is 0, indicating that the previous command
write sequence is still active, a new command write sequence cannot be started and all
writes to the FCCOB register are ignored.
The FCCOB parameter fields must be loaded with all required parameters for the flash
and EEPROM command being executed. Access to the FCCOB parameter fields is
controlled via FCCOBIX[CCOBIX] bits.
Flash and EEPROM command mode uses the indexed FCCOB register to provide a
command code and its relevant parameters to the memory controller. First, the user must
set up all required FCCOB field. Then they can initiate the command's execution by
writing a 1 to the FSTAT[CCIF] bit. This action clears the CCIF command completion
flag to 0. When the user clears the FSTAT[CCIF] bit all FCCOB parameter field are
locked and cannot be changed by the user until the command completes (evidenced by
the memory controller returning FSTAT[CCIF] to1). Some commands return information
to the FCCOB register array.
The generic format for the FCCOB parameter fields in flash and EEPROM command
mode is shown in the following table. The return values are available for reading after the
FSTAT[CCIF] flag has been returned to 1 by the memory controller. Writes to the
unimplemented parameter fields, FCCOBIX[CCOBIX] =110b and FCCOBIX[CCOBIX]
= 111b, are ignored with read from these fields returning 0x0000.
The table below shows the generic flash command format. The high byte of the first word
in the CCOB array contains the command code, followed by the parameters for this
specific flash command. For details on the FCCOB settings required by each command,
see the flash command descriptions in Flash and EEPROM command summary .
Flash and EEPROM
MC9S08PA60 Reference Manual, Rev. 1, 9/2012
80 Freescale Semiconductor, Inc.
