AN2400 Freescale Semiconductor / Motorola, AN2400 Datasheet - Page 10

no-image

AN2400

Manufacturer Part Number
AN2400
Description
HCS12 NVM Guidelines
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
AN2400/D
Flash/EEPROM
Command Sequence
10
NOTE:
A Flash or EEPROM word must be erased before it is programmed.
The general command sequence begins with an initialisation sequence
followed by the command write sequence. The initialisation sequence is
described in the individual sections on Flash or EEPROM programming.
If the CBEIF flag in the FSTAT/ESTAT register is set, the command write
sequence can begin. The following command write sequence must be strictly
adhered to and no intermediate writes to the Flash/EEPROM block or
Flash/EEPROM registers are permitted. Flash/EEPROM registers, but not the
Flash/EEPROM block being programmed/erased, may be read during the
command write sequence.
A command sequence can be aborted prior to being launched by writing $00 to
the FSTAT/ESTAT register, causing the ACCERR flag to be set. Once
launched, a command cannot be safely stopped prior to completion. Avoid
executing a CPU STOP instruction whilst an NVM command is running.
1. Write the data word to be programmed to the word aligned
Freescale Semiconductor, Inc.
For More Information On This Product,
Status Register
Flash/EEPROM address (address bit 0 clear). The data and address are
stored in internal buffers. For erase and erase-verify commands, the
data value is irrelevant. For mass erase and erase-verify commands, the
address can be any valid address for the Flash/EEPROM block. For the
sector erase command, the address can be anywhere in the desired
sector.
1 1 0 0 0 0 0 0
Go to: www.freescale.com
HCS12 NVM Guidelines
Figure 9. NVM Address and Data Write
Command State Machine
Command Register
Control
Empty
Idle
Address Register
Address Buffer
Address Bus
NVM
Address
Empty
Data Register
Data Buffer
Data Bus
Empty
Data
MOTOROLA

Related parts for AN2400