C
Atleast one bit in golden_data was
n o t p r o g r a m m e d s u ff i c i e n t l y.
It requires another programing
p u l s e
t o
b e
a p p l i e d .
These operations have to happen
on the bank register corresponding
to the bank where the address of the
f l a s h
p r o g r a m i n g
o p e r a t i o n
w a s
i n t e n d e d .
MAX_PRG_PLS_TLV is the value
of maximum number of program
pulses needed to reliably program
a flash location. This value is stored
in the device TLV table.
WAIT = wait states for program verify
mode;
RD_MODE = Program Verify;
RD_MODE_
STATUS = Program
Verify?
NO
YES
actual_data = Read_word from Flash;
temp_var = golden_data;
fail_bits = (NOT temp_var) AND
actual_data;
updated_new_data = NOT fail_bits;
(OR and NOT used above are intended
to be bit wise operations.)
RD_MODE = Normal Read;
WAIT = wait states for normal read
mode;
Clear all error flags in FLCTL_CLRIFG
register.
Enable pre and post verify option in
FLCTL_PRG_CTLSTAT register
Initiate data write to the desired flash
address with updated_new_data.
*(dest_addr) = updated_new_data;
fail_bits = 0?
End of word programming
NO
Clear all error flags in FLCTL_CLRIFG
register.
YES
PRG
= 1 in
FLCTL_IE
register?
YES
NO
PRG
= 1 in
FLCTL_IFG
register?
NO
Continue CPU execution of other tasks
or put device in LPM0.
YES
PRG
interrupt?
YES
NO
RD_MODE_
STATUS = Normal
Read?
NO
YES
num_pr
g_pls >
MAX_PRG_PLS_
TLV?
NO
YES
Word programming failure
AVPRE =
1 or AVPST =
1?
YES
A
Increment programing pulses used.
num_+;
NO
Advanced Operations using the Flash Controller
533
SLAU356I – March 2015 – Revised June 2019
Copyright © 2015–2019, Texas Instruments Incorporated
Flash Controller A (FLCTL_A)
Figure 10-3. Post-Verify Error Handling for Immediate and Full Word Program Flow