mc9s12hz256v2 Freescale Semiconductor, Inc, mc9s12hz256v2 Datasheet - Page 110

no-image

mc9s12hz256v2

Manufacturer Part Number
mc9s12hz256v2
Description
Hcs12 Microcontrollers
Manufacturer
Freescale Semiconductor, Inc
Datasheet
Chapter 3 2 Kbyte EEPROM Module (EETS2KV1)
3.4.1.2
The EEPROM command controller is used to supervise the command write sequence to execute program,
erase, mass erase, sector modify, and erase verify operations. Before starting a command write sequence,
it is necessary to check that there is no pending access error or protection violation (the ACCERR and
PVIOL flags must be cleared in the ESTAT register).
After this initial step, the CBEIF flag must be tested to ensure that the address, data and command buffers
are empty. If so, the command sequence can be started. The following 3-step command write sequence
must be strictly adhered to and no intermediate access to the EEPROM array is permitted between the 3
steps. It is possible to read any EEPROM register during a command sequence. The command write
sequence is as follows:
The completion of the command is indicated by the CCIF flag setting. The CCIF flag only sets when all
active and pending commands have been completed.
The EEPROM command controller will flag errors in command write sequences by means of the
ACCERR (access error) and PVIOL (protection violation) flags in the ESTAT register. An erroneous
command write sequence will abort and set the appropriate flag. If set, the user must clear the ACCERR
or PVIOL flags before commencing another command write sequence. By writing a 0 to the CBEIF flag
the command sequence can be aborted after the word write to the EEPROM address space or after writing
a command to the ECMD register and before the command is launched. Writing a 0 to the CBEIF flag in
this way will set the ACCERR flag.
A summary of the launching of a program operation is shown in
writes the appropriate command to the ECMD register.
110
1. Write an aligned word to be to a valid EEPROM array address. The address and data will be stored
2. Write a valid command, listed in
3. Clear the CBEIF flag by writing a 1 to CBEIF to launch the command. When the CBEIF flag is
in internal buffers.
— For program and sector modify, all address and data bits are valid.
— For erase, the value of the data bytes are ignored.
— For mass erase and erase verify, the address can be anywhere in the available address space of
— For sector erase, the address bits[1:0] are ignored.
cleared, the CCIF flag is 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 write sequence to begin.
the array.
Command Write Sequence
MC9S12HZ256 Data Sheet, Rev. 2.05
Table
3-10, to the ECMD register.
Figure
3-18. For other operations, the user
Freescale Semiconductor

Related parts for mc9s12hz256v2