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
505 of 571
NXP Semiconductors
UM10316
Chapter 28: LPC29xx Flash/EEPROM
A sector gets protected by writing an odd value to its base address, followed by the same
trigger as for unprotecting.
Although the flash module does not need the CRA clock to select a sector for
(un)protecting, the CRA clock must already be enabled to ensure an active APB clock.
4.1.2 Erasing a single sector
Before the erasing, the erase time must be written to the timer register FPTR.TR, and the
timer must be enabled through FPTR.EN_T. During erasing, the timer register counts
back to zero. Therefore, the timer register must be rewritten before every erase cycle.
The programmed erase time must obey:
which is true for:
A single sector gets erased by writing any value to an address within that sector, followed
by writing the erase trigger value to the FCTR register.
Only unprotected sectors can be erased.
For erasing, the flash module needs a 66 kHz CRA clock being active. This clock is
derived from the APB clock, dividing it by a factor programmed in FCRA.FCRA. A value of
zero inactivates the CRA clock.
4.1.3 Erasing multiple sectors
Erasing multiple sectors can be done with only one (time consuming) erase cycle. First all
sectors except the last are selected for erasure. Then the last sector is erased using the
single sector erase procedure.
A sector gets selected for erasure by writing any value to an address within that sector,
followed by writing the select for erase trigger value to the FCTR register.
Table 437. Un(protect) trigger
LOADREQ
PROGREQ
WPB
WEB
WRE
CS
(un)protect
1
0
1
1
1
1
Table 438. Single sector erase trigger
LOADREQ
PROGREQ
WPB
WEB
WRE
CS
erase
0
1
1
0
0
1
512
FPTR.TR
⋅
2
+
(
)
t
clk
⋅
tlw_web_erase
≥
FPTR.TR
tlw_web_erase
512 t
clk
⋅
------------------------------------
=
Table 439. Select for erase trigger
LOADREQ
PROGREQ
WPB
WEB
WRE
CS
select for erasure
1
0
1
1
0
1