AN2400 Freescale Semiconductor / Motorola, AN2400 Datasheet - Page 32

no-image

AN2400

Manufacturer Part Number
AN2400
Description
HCS12 NVM Guidelines
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
AN2400/D
EEPROM
Introduction
32
Most HCS12 microcontrollers also incorporate EEPROM that may be used to
store data variables. HCS12 microcontrollers that do not have EEPROM may
use Flash to emulate EEPROM, refer to application note AN2302/D for details
and example software. The EEPROM on HCS12 microcontrollers is
constructed using the same basic technology as the Flash memory, but with
some adjustments to make it more suitable to data storage applications. The
most obvious of these is the erase sector size, which is 4 bytes.
Once programmed, the EEPROM retains data until it is erased and
reprogrammed. The EEPROM can be erased and reprogrammed many times
over, refer to the microcontroller Electrical Specifications for current data
retention and write/erase endurance figures.
The available sizes of EEPROM blocks are 1K, 2K and 4K bytes. The position
of the EEPROM block within the microcontroller address space is set by the
core INITEE register. The EEPROM control registers are located at the register
base address + $110 to $11F. The register base address is set by the core
INITRG register, the base address after a reset is $0000. If the EEPROM is
located at an address that overlaps the RAM, registers, or Flash, then the
EEPROM takes priority over Flash but the RAM and registers take priority over
EEPROM.
The EEPROM is programmed in units of aligned words, i.e. two bytes at a time.
The data word is written to an even address, i.e. bit 0 of the address is clear.
This will result in the bytes at the even address and the even address plus one
being programmed.
The EEPROM erase sector size is four bytes. To erase a sector, any data value
is written to any EEPROM address within the required sector. That is to say,
only address bits [15:2] are used to determine the erase sector.
Freescale Semiconductor, Inc.
For More Information On This Product,
$x11A
$x111
$x117
Address
$x110
$x113
$x114
$x115
$x116
$x112
$x119
$x11B
Go to: www.freescale.com
HCS12 NVM Guidelines
Figure 21. EEPROM Register Summary
EEPROM Clock Divider Register (ECLKDIV)
Reserved
EEPROM Configuration Register (ECNFG)
EEPROM Protection Register (EPROT)
EEPROM Status Register (ESTAT)
EEPROM Command Register (ECMD)
16-Bit Address Buffer (EADDR)
16-Bit Data Buffer (EDATA)
Name
MOTOROLA

Related parts for AN2400