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
506 of 571
NXP Semiconductors
UM10316
Chapter 28: LPC29xx Flash/EEPROM
Although the flash module does not need the CRA clock to select a sector for erasure, the
CRA clock must already be enabled to ensure an active APB clock.
4.1.4 Presetting data latches
When only a part of a page has to be programmed, the data latches for the rest of the
page must be preset to logical 1’s. This can be done with a single control by setting and
clearing the FCTL.FS_PDL bit. Only the data latches in the flash (1 page wide) are preset
with this action, the data latches in the controller (1 FlashWord wide) are not affected.
4.1.5 Writing and loading
Writing to flash is accomplished by writing a Word through the AHB data port to the data
inputs of the flash module. Every beat takes 2 clock cycles (1 wait state) and results in a
partial update of the data input of the flash module.
Writing is done per Word. Byte or halfword writing is not possible. However, because
writing logical 1’s leaves the flash contents unchanged, it is possible to do byte writing by
encapsulating this byte in a Word of logical 1’s. This encapsulation must be done by the
AHB master that initiates the transfer. The flash itself does not offer this feature.
Note that multiple partial writing is best done with ECC bypassed, to avoid corruption of
the ECC bits. ECC must be enabled again on the last write of a sequence of partial writes.
Every 4th write, a FlashWord (=4 Words) is loaded automatically into the data latches of
the flash module. Loading is done per FlashWord.
Loading is done automatically after writing to address 0x0C. This requires that values are
already written to addresses 0x00.. 0x08. An AHB incremental burst starting on a
FlashWord aligned address meets this requirement. Automatic loading is enabled by
writing a pattern to the FCTR register.
Loading can also be done manually by writing a ‘1’ to FCTR.FS_LOADREQ. In that case,
whatever the content of the controller’s data registers is will be transferred to the flash.
Manual loading is started by writing a trigger value to the FCTR register.
4.1.6 Burning
Burning is the data transfer from the data latches of the flash module to the flash array.
Burning is done per page.
Before the burning, the burning time must be written to the timer register FPTR.TR, and
the timer must be enabled through FPTR.EN_T. During burning, the timer register counts
back to zero. Therefore, the timer register must be rewritten before every burning cycle.
The programmed burning time must obey:
Table 440. Automatic load trigger
LOADREQ
PROGREQ
WPB
WEB
WRE
CS
enable automatic
loading
0
0
0
1
1
1
Table 441. manual load trigger
trigger for
LOADREQ
PROGREQ
WPB
WEB
WRE
CS
manual load
1
0
0
1
1
1