UM10208_2
© NXP B.V. 2007. All rights reserved.
User manual
Rev. 02 — 1 June 2007
34 of 362
NXP Semiconductors
UM10208
Chapter 5: LPC2800 Flash
For programming and erase operations, the Flash module needs a 66 kHz clock. This
clock is derived from the AHB clock, dividing it by a factor programmed in the CLK_DIV
field of the F_CLK_TIME register. A value of zero in this field inactivates the FLASH
PROGRAMMING clock.
The flash controller can optionally generate an interrupt request when programming is
finished.
4.7 Program/erase timer
A built-in timer is used to control the program time or erase time. The timer is started by
writing the program or erase time to the FPT_TIME field of the F_PROG_TIME register,
and by enabling it via the FPT_ENABLE bit in the same register. During programming or
erasing, the timer register counts down to zero, and its current value is returned when
reading the F_PROG_TIME register. This timer reading can be used to observe the
progress of programming/erasing.
While the timer is counting down, the flash memory controller is only partly accessible:
•
Reads of the flash memory are stalled, using AHB wait states.
•
Writes to the flash controller registers are stalled.
•
Reads of flash controller registers are completed normally without stalling.
This can have significant impact on system behavior. It should be insured that the Flash
memory is not busy (the FPT_TIME field in the F_PROG_TIME register = 0 and the
FS_RDY bit in the F_STAT register =1) prior to attempting to read Flash data or write to a
Flash controller register.
5.
Register description
The Flash memory controller has registers to set the wait states for normal operation and
registers to control program/erase operations. Flash controller registers are listed in
.
Table 12.
Flash memory controller registers
Offset
Register name
Description
Access
Reset
value
0x8010 2000
F_CTRL
Flash control register
R/W
0x5
0x8010 2004
F_STAT
Flash status register
RO
0x45
0x8010 2008
F_PROG_TIME
Flash program time register
R/W
0
0x8010 2010
F_WAIT
Flash read wait state register
R/W
0xC004
0x8010 201C
F_CLK_TIME
Flash clock divider for 66 kHz
generation
R/W
0
0x8010 2FD8
F_INTEN_CLR
Clear interrupt enable bits
WO
-
0x8010 2FDC
F_INTEN_SET
Set interrupt enable bits
WO
-
0x8010 2FE0
F_INT_STAT
Interrupt status bits
RO
0
0x8010 2FE4
F_INTEN
Interrupt enable bits
RO
0
0x8010 2FE8
F_INT_CLR
Clear interrupt status bits
WO
-