28F160S3/28F320S3 E
26 PRELIMINARY
This two-s tep command sequence of setup fol l owed
by execution ensures that block contents are not
accidentally erased. An invalid Full Chip Erase
command sequence will result in both status
register bits SR.4 and SR.5 being set to 1. Also,
reliable full chip erasure can only occur when
VCC = VCC1/2 and VPP = VPPH1/2/3. In the abs ence of
these voltages, block contents are protected
against eras ure. If ful l chip erase is att empted while
VPP ≤ VPPLK, SR.3 and SR.5 will be set to 1. When
WP# = VIL, only unlocked blocks are erased. Full
chip erase cannot be suspended.
4.8 Write to Buffer Command
To program the flash devic e via the write buffers, a
Write to Buffer command sequence is initiated. A
variable number of bytes or words, up to the buffer
size, can be wri tt en into t he buf fer and programmed
to the flash device. First, the Write to Buffer Setup
command is issued along with the Block Address.
At this point, the XSR information is loaded and
XSR.7 indicates that another Write to Buffer
command is possible. If XSR.7 = 0, no write buffer
is avai lable. To retry , cont inue monit oring X SR.7 by
issui ng the Write t o Buffer S etup comm and with the
Block Address until XSR.7 = 1. When XSR.7
transitions to a “1,” the buffer is ready for loading.
Next, a word or byte count is issued at a valid
address within the block. On the next write, a
device start address is given along with the write
buffer data. For maximum programming
performance and lower power, align the start
address at the beginning of a writ e buffer boundary.
Subsequent writes must supply additional device
addresses and data, depending on the count. All
subsequent addresses must lie within the start
address plus the count.
After the final buffer data is given, a Write Confirm
command is iss ued. This ini t i ates t he WSM to begi n
copying the buffer data to the flash memory. If a
command other than Write Conf irm is written t o the
device, an “Invalid Command/Sequence” error will
be generated and status register bits SR.5 and
SR.4 will be set to “1.” For additional buffer writes,
issue another Write to Buffer Setup command and
check XSR.7. The write buf fers can be l oaded while
the WSM is bus y as long as X SR.7 indicat es that a
buffer is available. Refer to Figure 6 f or the
Write to
Buffer Flowchart
.
If an error occurs while writing, the device will stop
programming, and status register bit SR.4 will be
set to a “1” to indicat e a program failure. Any ti me a
media failure occurs during a program or an erase
(SR.4 or SR.5 is set), the device will not accept any
more Write to Buffer c ommands. Additionally, if the
user attempts t o wri te past an erase block boundary
with a Write to Buffer command, the device will
abort programming. This will generate an “Invalid
Command/Sequence” error and status register bits
SR.5 and SR.4 will be set to “1.” To clear SR.4
and/or SR.5, issue a Clear Status Register
command.
Reliable buffered programming can only occur
when VCC = VCC1/2 and VPP = VPPH1/2/3. If
programming is attempted while VPP ≤ V
PPLK,
status register bits SR.4 and SR.5 will be set to “1. ”
Programming attempts with invalid VCC and VPP
voltages produce spurious results and should not
be attempted. Finally, successful programming
requires that the corresponding Block Lock-Bit be
cleared, or WP# = VIH. If a buffered write is
attempted when the corresponding Block Lock-Bit
is set and WP# = VIL, SR.1 and SR.4 will be set to
“1.”
4.9 Byte/Word Program Commands
Byte/Word programming is executed by a two-cycle
command sequence. Byte/Word Program setup
(standard 40H or alternate 10H) is written, followed
by a second write that specifies the address and
data (latched on the ri si ng edge of WE#). The WSM
then takes over, controlling the program and verify
algorithms internally. After the write sequence is
written, the device automatically outputs status
register data when read. The CPU can detect the
completion of the program event by analyzing STS
in level RY/BY# mode or status register bit SR.7.
When programming is complete, status register bit
SR.4 should be checked. If a programming error is
detected, the st atus regis ter should be c leared. The
internal WSM verif y only detect s errors for “1”s that
do not successfully program to “0”s. The CUI
remains in read status register mode until it
receives another command. Refer to Figure 7 for
the
Single Word/Byte Program Flowchart
.
Also, Reliable byte/word programming can only
occur when VCC = VCC1/2 and V PP = VPPH1/2/3. In the
absence of thi s high v olt age, c ontent s are prot ect ed
against programming. If a byte/word program is