DR
AFT
DR
AFT
DRAFT
DR
D
RAFT
DRAFT
DRA
FT DRAF
D
RAFT DRAFT DRAFT DRAFT DRAFT D
DRAFT
D
RAFT DRA
FT DRAFT DRAFT DRAFT DRA
UM10316_0
© NXP B.V. 2008. All rights reserved.
User manual
Rev. 00.06 — 17 December 2008
483 of 571
NXP Semiconductors
UM10316
Chapter 28: LPC29xx Flash/EEPROM
At power-up the reset should be applied for at least 100
μ
s. However a normal reset (not
at power-up) period is only 40 ns. The longer reset period at power-up relates to the
bandgap of the FLASH and EEPROM devices.
After the reset period the EEPROM devices will initialize themselves. Therefore the first 2
bytes (containing trimming information) of the last (protected) page of every EEPROM
device will be read. The information that is read will be used as input values of the
EEPROM devices, it will be ignored by the controller and is not visible on the AHB/VPB
bus.
Before starting any EEPROM operation some registers need to be programmed. First of
all the EEPROM devices need a 375 kHz clock for erase/program actions, so the system
bus clock needs to be divided to generate an internal clock with this frequency. Register
EEDIVCLK needs to be programmed to divide the system bus clock. Next to this also the
EEWSTATE needs to be programmed with wait state values. After programming these
registers operations on the EEPROM devices can be started.
2.10 EEPROM operations
An EEPROM device can not be programmed directly. Writing data to it and the actual
erase/program of the memory are two separate steps. The page register (64 bytes) will
temporarily hold write data. But as soon as this data needs to be read from the EEPROM
or data needs to be written to another page, the contents of the page register first needs to
programmed into the EEPROM memory.
It is important to know that the EEPROM devices are completely independent from the
FLASH module. Therefore EEPROM and FLASH operations can be mixed and performed
in parallel without interfering with each other.
The following sections explain the EEPROM operations (read, write and program) in more
detail.
2.10.1 Writing
The EEPROM controller supports writing of 8-bit, 16-bit or 32-bit elements. Since the
EEPROM device doesn’t support 32-bit operations the controller splits the operation into
two 16-bit operations.
For doing a write operation first an address needs to be written into the address register
and the kind of write operation needs to be selected in the command register. This can be
done in any order. After this the data is written to the write data register, which
automatically starts the write operation on the EEPROM device.