Datasheet

Table Of Contents
EEPROM 4K
Functional Description
MC9S12DP256 — Revision 1.1
EEPROM 4K
1. Write an aligned data word (16-bits) to be programmed to the
EEPROM address space between $x000 and $xFFF. The
address and data will be stored in internal buffers. For program, all
address bits are valid. For erase, the value of the data bytes is
don’t care. For mass erase the address can be anywhere in the
available address space of the 4k byte block to be erased. For
sector erase the address bits 1:0 are don’t cared.
2. Write the program or erase command to the command buffer.
3. Reset CBEIF flag by writing a “1”. This will launch the command.
The ACCERR and PVIOL flags should be tested to ensure the
command sequence was valid. Five cycles after the CBEIF flag is
cleared the CCIF flag will be cleared by hardware indicating that
the command was successfully launched. The CBEIF flag will be
set again indicating the address, data and command buffers are
ready for a new command sequence to begin.
The completion of the command is indicated by the CCIF flag setting
(Command Complete Interrupt Flag)
The Command State Machine will flag errors in program or erase
sequences by means of the ACCERR (access error) and PVIOL
(protection violation) flags in the FSTAT register. An erroneous
command sequence will immediately abort and set the appropriate flag.
The user has then to clear the ACCERR or PVIOL flags before being
able to commence another command sequence.
The ACCERR flag will be set during the command sequence if any of the
following illegal operations are performed. Such operations will cause
the command sequence to immediately abort:
1. Writing to the EEPROM address space before initializing
ECLKDIV.
2. Writing a misaligned word or a byte to the EEPROM address
space.
3. Writing to the EEPROM address space while CBEIF is not set.
4. Writing a second aligned word to the EEPROM address space
before executing a program or erase command on the previously
written word.
5. Writing to any EEPROM register other than ECMD after writing an
aligned word to the EEPROM address space.
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc...