3.
Write the Flash memory write key and the
WRITE
bit (a value of 0xA442.0001) to the
FMC
register. The write key may be 0xA442 or the value programmed into the
FLPEKEY
register
depending on the
KEY
value in the
BOOTCFG
register. See page 674 and page 640 for more
information.
4.
Poll the
FMC
register until the
WRITE
bit is cleared.
To perform an erase of a 16-KB sector
1.
Write the 16-KB aligned address to the
FMA
register.
2.
Write the Flash memory write key and the
ERASE
bit to the
FMC
register.
3.
Poll the
FMC
register until the
ERASE
bit is cleared or, alternatively, enable the programming
interrupt using the
PMASK
bit in the
FCIM
register.
To perform a mass erase of the Flash memory
1.
Write the Flash memory write key and the
MERASE
bit to the
FMC
register.
2.
Poll the
FMC
register until the
MERASE
bit is cleared or, alternatively, enable the programming
interrupt using the
PMASK
bit in the
FCIM
register.
8.2.3.11
32-Word Flash Memory Write Buffer
A 32-word write buffer provides the capability to perform faster write accesses to the Flash memory
by programming two 32-bit words at a time, allowing 32 words to be programmed in the same time
as 16 would take using the method described above. The data for the buffered write is written to
the
Flash Write Buffer (FWBn)
registers.
The registers are 32-word aligned with Flash memory, and therefore the register
FWB0
corresponds
with the address in
FMA
where bits [6:0] of
FMA
are all 0.
FWB1
corresponds with the address in
FMA
+ 0x4 and so on. Only the
FWBn
registers that have been updated since the previous buffered
Flash memory write operation are written. The
Flash Write Buffer Valid (FWBVAL)
register shows
which registers have been written since the last buffered Flash memory write operation. This register
contains a bit for each of the 32
FWBn
registers, where bit[n] of
FWBVAL
corresponds to
FWBn
.
The
FWBn
register has been updated if the corresponding bit in the
FWBVAL
register is set.
To program 32 words with a single buffered Flash memory write operation
1.
Write the source data to the
FWBn
registers.
2.
Write the target address to the
FMA
register. This must be a 32-word aligned address (that is,
bits [6:0] in
FMA
must be 0s).
3.
Write the Flash memory write key and the
WRBUF
bit to the
FMC2
register.
4.
Poll the
FMC2
register until the
WRBUF
bit is cleared or wait for the
PMIS
interrupt to be signaled.
8.2.3.12
Non-Volatile Register Programming-- Flash Memory Resident Registers
Note:
The
Boot Configuration (BOOTCFG)
register requires a POR before the committed
changes take effect.
This section discusses how to update the registers shown in Table 8-3 on page 614, which are
resident within the Flash Memory. These registers exist in a separate space from the main Flash
613
June 18, 2014
Texas Instruments-Production Data
Tiva
™
TM4C1294NCPDT Microcontroller