Start Flash
Program (immediate/full word
mode)
Clear pending PRG, PRG_ERR,
AVPST and AVPRE Interrupt flags
Enable immediate/full word
program operation.
(ENABLE = 1, MODE = 0/1 in
FLCTL_PRG_CTLSTAT)
PRG
= 1 in
FLCTL_IE
register
?
Enable Post Verify option.
(VER_PST = 1 in
FLCTL_PRG_CTLSTAT)
Enable Pre and Post Verify option.
(VER_PRE = 1, VER_PST = 1 in
FLCTL_PRG_CTLSTAT)
YES
NO/MAYBE
Store data to be programed
(golden_data) in a temporary
variable. This is to prevent the
accidental loss of data to be
programmed.
temp_var = golden_data;
Initiate data write to the desired
flash address with golden_data.
*(dest_addr) = temp_var;
YES
Location
/Locations to be
programed is
already
erased?
NO
PRG
= 1 in
FLCTL_IFG
register
?
NO
Continue CPU execution of other
tasks or put device in LPM0.
YES
AVPRE
= 1 or AVPST
= 1?
End of word
programming
YES
A
NO
Size of the variables
w i l l
v a r y
b e t w e e n
immediate and full word
p r o g r a m m i n g
m o d e s
i m m e d i a t e
m o d e :
sizeof(temp_var) = 32-bits
f u l l
w o r d
m o d e :
sizeof(temp_var) = 128-bits
PRG
interrupt?
YES
NO
Keep track of the number of
programming pulses.
num_prg_pls = 0;
Increment programing pulses used.
num_+;
Advanced Operations using the Flash Controller
531
SLAU356I – March 2015 – Revised June 2019
Copyright © 2015–2019, Texas Instruments Incorporated
Flash Controller A (FLCTL_A)
10.3.2.2.1 Software Flow for Immediate and Full-Word Programming Modes
, and
show the software flow to be followed for reliable immediate and
full word programming modes.
Figure 10-1. Immediate and Full Word Program Flow