1/20April 2002
M29W040B
4 Mbit (512 Kb x8, Unif orm B l ock)
Low Voltage Single Supply Flash Memory
SI NGLE 2 .7 t o 3.6V SUPPL Y VOLTAG E fo r
PROGRAM, ERASE and R EAD OPERAT IONS
ACCESS TIME: 55ns
PRO GRAMMIN G TIME
10µs per Byte typica l
8 UNIFORM 64 Kbytes MEMORY BLOCKS
PROGRAM/ERASE CON T ROL LER
Embedded Byt e Program algorithm
Embedded Multi-Block/Chip Erase algorithm
Status Register Pol ling and Toggle Bits
ERASE SUSPEND and RESUM E MOD ES
Read and Program another Block during
Erase Su spend
UNLOCK BYPASS PROGRAM COMMAND
Fas ter Production/Batc h Prog ramm ing
LOW POWER CONSUM PTION
Standby and Autom atic Standby
100,000 PROGRAM/ERASE CYCLES per
BLOCK
20 YEAR S DATA RETENTI ON
Defect ivity below 1 ppm/ year
ELECTRONIC SIGNATURE
Manufacturer Code: 20h
Devi ce Code: E3h
TSOP32 (N)
8 x 20mm
PLCC32 (K)
TSOP32 (NZ)
8 x 14mm
Figure 1. Logic Diagram
AI02953
19
A0-A18
W
DQ0-DQ7
VCC
M29W040B
G
E
VSS
8
M29W040B
2/20
Figure 2. PLCC Connections
AI02951
A17
A13
A10
DQ5
17
A1
A0
DQ0
DQ1
DQ2
DQ3
DQ4
A7
A4
A3
A2
A6
A5
9
W
A8
1
A16
A9
DQ7
A12
A14
32
A18
VCC
M29W040B
A15
A11
DQ6
G
E
25
VSS
Figu re 3. TSOP C onnec tion s
A1
A0
DQ0
A7
A4 A3
A2
A6
A5
A13
A10
A8
A9
DQ7
A14
A11 G
E
DQ5
DQ1
DQ2
DQ3
DQ4
DQ6
A17
W
A16
A12
A18
VCC
A15
AI02952
M29W040B
8
1
9
16 17
24
25
32
VSS
Table 1. Sign al Names
A0-A18 Address Inputs
DQ0-DQ7 Data Inputs/Outputs
EChip Enable
GOutput Enable
WWrite Enable
VCC Supply Voltage
VSS Ground
SUMMARY DESCRIPTION
The M29 W040B is a 4 M bit (512Kb x8) n on-vola-
tile memory that can be read, erased and repro-
grammed. These operations can be performed
using a single low voltage (2. 7 to 3.6V) supply. On
power-up the memory defaults to its Read mode
where it can be read in the same way as a ROM or
EPROM. The M29W040B is fully backward com-
patible with the M29W040.
The memory is divided into blocks that can be
erased independently so it is pos sible to preserv e
valid data while old dat a is erased. Each block can
be protected independently to prevent accidental
Program or Erase commands from modifying the
memory. P rogram and Eras e com m ands are wri t-
ten to the Com mand Interface of t he memory. An
on-chip Program/Erase Controller simplifies the
process of programming or erasing the memory by
taking care of al l of the special operations that are
required to update the mem ory con tents. The end
of a program or erase operation can be detected
and any error conditions identified. The c om m and
set required to control the memory is consistent
with JEDEC standards.
Chip Enable, Output Enable and Write Enable sig-
nals control the bus operation of the memory.
They allow simple connection to most micropro-
cessors, often without additional logic .
The memory is offered in TSOP32 (8 x 20mm),
TSOP32 (8 x 1 4mm) and PLCC32 packages and
it is supplied with all the bits erased (set to ‘1’).
3/20
M29W040B
SIGNAL DESCRIPTIONS
See Figure 1, Logic Diag ram, and T able 1, Sign al
Names, for a brief overview of the s ignals connect -
ed to this device.
Address Inputs (A0-A18). The Address Inputs
select the cell s in the memory arra y to access dur-
ing Bus Read operations. During Bus Writ e opera-
tions they control the commands sent to the
Comman d Interface of the internal state machine.
Data Inputs/Outputs (DQ0-DQ7). The Data In-
puts/Outputs output the data stored at the selected
address during a Bus Read operation. During Bus
Write operations they represent the commands
sent to the Command Interface of the internal state
machine.
Chip Enable (E). The Chip Enable, E, activates
the memory, allowing Bus Read and Bus Write op-
erations to be performed. When Chip Enable is
High, VIH, all other pins are ignored.
Output Enable (G). The Output Enable, G, con-
trols the Bus Read operation of the memory.
Write Enable (W). The Write Enable, W, controls
the Bus Write operation of the memory’s Com-
ma nd Inte r fa ce .
VCC Supply Voltage. The VCC Supply Voltage
supplies the power for all operations (Read, Pro-
gram, Erase etc.).
The Command Interface is dis abled when the VCC
Supply Voltage is less than the Lockout Voltage,
VLKO. This prevent s Bus Write operations from ac-
cidentally damaging the data during power-up,
power-down and power surges. If the Program/
Erase Controller is programming or erasing during
this time then the operation aborts and the memo-
ry contents being alt ered will be invalid.
A 0.1µF capacitor should be connected between
the V CC Supply Voltage pin and the VSS Ground
pin to decoupl e the current surges from the power
supply. The PCB track widths must be sufficient to
carry the currents required during program and
erase operat ions, ICC3.
VSS Ground. The VSS Ground is the referenc e for
all voltage measureme nts.
Table 2. Absolute M axim um Ratings (1)
Note: 1. Exc ept for th e ratin g "Oper ating T emperat ure Range", stres ses above th ose lis te d i n the T able "A bsolu te Maxim um Ratings" may
cause permanent damage to the device. These are stress ratings only and operation of the device at these or any other conditions
above thos e indicated in t he Op erating sect i ons of this specification is not i m plied. Ex posure to A bsol ut e M aximum R ating condi -
tions for extended pe riods may aff ect device reliabilit y. Refer also to the STMic ro electronics SURE Program and other r elevant qual-
i ty do cu m ent s .
2. Mini m um Voltage may undershoot to –2V during transition an d fo r l ess tha n 20ns duri ng trans i tions.
Symbol Parameter Value Unit
TAAmbient Operating Temperature (Temperature Range Option 1) 0 to 70 °C
Ambient Operating Temperature (Temperature Range Option 6) –40 to 85 °C
TBIAS Temperature Under Bias –50 to 125 °C
TSTG Storage Temperature –65 to 150 °C
VIO (2) Input or Output Voltage –0.6 to 4 V
VCC Supply Voltage –0.6 to 4 V
VID Identification Voltage –0.6 to 13.5 V
Table 3. Uniform Block Addresses, M29W040B
#Size
(Kbytes) Address Range
7 64 70000h-7FFFFh
6 64 60000h-6FFFFh
5 64 50000h-5FFFFh
4 64 40000h-4FFFFh
3 64 30000h-3FFFFh
2 64 20000h-2FFFFh
1 64 10000h-1FFFFh
0 64 00000h-0FFFFh
M29W040B
4/20
BUS OPERATIONS
There are five standard bus operations t hat control
the device. These are Bus Read, Bus Wri te, Out-
put Disable, Standby and Automatic Standby. See
Table 4, Bus Operations, for a summary. Ty picall y
glitches of less than 5ns on Chip E nable o r Write
Enable are i gnored by t he mem ory and do not af-
fect bus operations.
Bus Read. Bus Read operations read from the
memory cells, or specific registers in the Com-
mand Interface. A valid Bus Read operation in-
volves setting the desi red address on the Address
Inputs, appl ying a Low s ig nal, VIL, to Chip Enable
and Output Enable and keeping Write Enable
High, VIH. The Data Input s/Ou tputs will outp ut the
value, see the Figure 8, Read Mode AC Wave-
forms, and Table 11, Read AC Characteristics, for
details of when the outp ut becom es valid.
Bus Write. Bus Write operations write to the
Command Interface. A valid Bus Write operation
begins by setting the desire d address on the Ad-
dress Inputs. The Address Inputs are latched by
the Command Interface on the falling edge of Chip
Enable or Write Enable, whichever occurs last.
The Dat a Input s/Outpu ts a re latched by the Com -
mand Interface on the rising edge of Chip Enab le
or Write Enable, whichever occurs first. Output En-
able must remai n High, VIH, during the whole Bus
Write operation. See Figures 9 and 10 Write AC
Waveforms, and Tables 12 and 13, Write AC
Characteristics, for details of the timing require-
ments.
Outp ut Disable . The Data Inputs/Outputs are in
the high impeda nce state when Output Enable is
High, VIH.
Standby. When Chip Enable is High, VIH, the
memory enters Standby mode and the Data In-
puts/Outputs pins are placed in the high-imped-
ance state. To reduce the Supply Current to the
Standby Supply Current, ICC2, Chip Enable should
be held within VCC ± 0.2V. For t he Standby current
level see Table 10, DC Characteristics.
During program or erase operations the memory
will continue to use the Program/Erase Supply
Current, ICC3, for Program or Erase operations un-
til the operation com pletes .
Automatic Standby. If CMOS levels (VCC ± 0.2V)
are used to drive the bus and the bus is inactive for
150ns or more the memory enters Automatic
Standby where the internal Supply Current is re-
duced to the Standby Supply Current, ICC2. The
Data Inputs/Outputs will still output data if a Bus
Read operation is in progress.
Special Bus Operati ons
Additional bus operations can be performed to
read the Electronic Signature and also to apply
and remove Block Protection. These bus opera-
tions are intended for use by programming equip-
ment and are not usually used in applications.
They require VID to be applied to some pins.
Electronic Sign atur e. The memory has two
codes, the manufacturer code and the device
code, that can be read to identify the memory.
These co des can be read by applying the si gnals
listed in Table 4, Bus Operations.
Block Protection and Blocks Unprotection. Each
block can be separately protected against acci-
dental Program or Erase. Protected bloc ks can be
unprotected to allow data to be changed. Block
Protection and Blocks Unprotection operations
must only be performed on programming equip-
ment. For further information refer to Application
Note AN1122, Applying P rotection and Unp rotec-
tion to M29 Series Flash.
Table 4. Bus Ope rations
Note: X = VIL or VIH.
Operation E G W Address Inputs Data
Inputs/Outputs
Bus Read VIL VIL VIH Cell Address Data Output
Bus Write VIL VIH VIL Command Address Data Input
Output Disable XV
IH VIH XHi-Z
Standby VIH XXX Hi-Z
Read Manufacturer
Code VIL VIL VIH A0 = VIL, A1 = VIL, A9 = VID,
Others VIL or VIH 20h
Read Device Code VIL VIL VIH A0 = VIL, A1 = VIL, A9 = VID,
Others VIL or VIH E3h
5/20
M29W040B
COMMAND INTERFACE
All Bus Write operations t o the memory are in ter-
preted by the Command Interface. Commands
consist of one or more sequential Bus Write oper-
ations. Failure to observe a vali d sequence of Bus
Write operations will result in the memory return-
ing to Read mode. The long command sequences
are imposed to maximize data security.
The command s are summ arized in Table 5, Com-
mands. Refer to Table 5 in conjunction with the
text descriptions below.
Read/Reset Comm and. The Read/Reset com-
mand returns the memory to its Read mode where
it behaves like a ROM or EPROM. It also resets
the errors in the Status Register. Either one or
three Bus Write operations can be used to issue
the Read/ Reset c ommand.
If the Read/Reset command is issued during a
Block Erase operation or following a Programming
or Erase error then the memory will take upto 10µs
to abort. During the abort period no valid data can
be read from the memory. Issuing a Read/Reset
command during a Block Erase operation will
leave invalid data in the memory.
Auto Select Command. The Auto Select com-
mand i s us ed to read the Man ufacturer Code, the
Device Code and the Block Protection Status.
Three consecutive Bus Write operations are re-
quired to issue the Auto Select command. Once
the Auto Select command is issued the memory
remains in Auto Select mode until another com-
mand is issued.
From the Auto Select mode the Manufacturer
Code can be read using a Bus Read operation
with A 0 = VIL and A1 = VIL. The other address bits
may be set to either VIL or VIH. The Manufacturer
Code for STMicroelectronics is 20h.
The Device Code can b e read using a Bus Read
operation with A0 = VIH and A1 = VIL. The other
address bits ma y be set to either V IL or VIH. The
Device Code for the M29W040B is E3h.
The B lock P rot ection S t atus of e ac h bl ock can be
read using a Bus Read operation with A0 = VIL,
A1 = VIH, and A16, A17 and A18 specifying the ad-
dress of the blo ck. The o ther addres s bits may be
set to either VIL or VIH. If the addressed block is
protected then 01h is output on the Data Inputs/
Outputs, otherwise 00h is output.
Progra m Command . The Program command
can be used to program a value to one address in
the memory array at a time. The command re-
quires four Bus Write operations, the final write op-
eration latches the address and data in the internal
state machine and starts the Program/Erase Con-
troller.
If the address falls in a protected block then the
Program command is ignored, the data remains
unchanged. The Status Register is never read and
no error condition is given.
During the program operation the me mory will ig-
nore all co mmands. I t is not poss ible t o issue any
command to abort or pause the operation. Typical
program times are given in Table 6. Bus Read op-
erations during the program operation will output
the Status Register on the Data Inputs/Outputs.
See the section on the Status Register for more
details.
After the program operation has completed the
memory will return to the Read mode, unless an
error has occurred. When an error occurs the
memory will continue to output the Status Regis-
ter. A Read/Reset command must be i ssued to re-
set the error condition and return to Read mode.
Note that t he Program command cannot change a
bit set at ‘0’ back to ‘1’. One of the Erase Com-
mands must be used to set all the bits in a block or
in the whole memory from ‘0’ to ‘1’.
Unlock Bypass Comma nd. The Unlock Bypass
command is used in conjunction with the Unlock
Bypass Program c ommand to program the memo-
ry. When the access time to the device is long (as
with some EPROM programmers) considerable
time saving can be made by using these com-
mands. Three Bus Write operations are required
to issue the Unlock Bypass comm and.
Once the Unlock Bypass command has been is-
sued the memory will only accept the Unlock By-
pass Program command and the Unlock Bypass
Reset command. The memory can be read as if in
Read mode.
Unlock Bypass Prog ram Comm an d. The Un-
lock Bypass Program command can be used to
program one address in memory at a time. The
command requires two Bus Write operations, the
final write operation latches the address and data
in the internal state machine and starts the Pro-
gram/Erase Controller.
The Program operation using the Unlock Bypass
Program c ommand behaves identically to the Pro-
gram operation using the Program command. A
protected block cannot be program m ed; the oper-
ation cannot be aborted and the Status Register is
read. Errors must be reset using the Read/Reset
command, w hich l eaves the d evice in Unlo ck By-
pass Mode. See the Program command for details
on the behavior.
Unlock Bypass Reset Comman d. The Unlock
Bypass Re set comm and can be used to return to
Read/Reset mode from Unlock Bypass Mode.
Two Bus Write operations are required to issue the
Unlo ck Bypa ss Reset command.
M29W040B
6/20
Table 5. Command s
Note: X Don’t C are, PA Program Address, PD Program Data, BA Any address in the Block.
All values in the table are in hexadecimal.
The C om m and Int erface only uses addre ss bi ts A0-A1 0 to verify th e commands, the upper address bi ts are Don t C are.
Re ad/Reset. After a Read/Reset command, read the memory as normal until another command is issued.
Auto Select. After a n A uto Select command, read Man ufactu rer ID, Device ID o r B l ock Protec tion Status.
Pro gr am, Unl ock Bypass Progr am, Chi p E r ase, Bl o ck E r ase. Aft er thes e commands read th e Status Register until t he Pro gram/Erase
Co nt rol l er com p l et es a nd the me m ory returns to Read Mode. Add additional Bl ocks during Bl ock Erase Command with additional Bus Write
Operation s until the Ti meout Bit is set .
Unlock Bypass. After the Unlock Bypass command issue Unlock Bypass Program or Unlock Bypass Reset commands.
Unlock Bypass Reset. After the Unlock Bypass Reset command read the memory as normal until another command is issued.
Erase Suspend. After the Erase Suspend command read non-erasing memory blocks as normal, issue Auto Select and Program commands
on non-era sing bloc ks as nor m al .
Erase Resume. A fte r th e Er as e Res ume com man d th e sus pe nded Eras e o perat ion re sumes , re ad the Stat us R egi ster unt il t he Prog ram/
Eras e Controller completes and the mem ory returns to Read Mo de.
Command
Length
Bus Write Operations
1st 2nd 3rd 4th 5th 6th
Addr Data Addr Data Addr Data Addr Data Addr Data Addr Data
Read/Reset 1X F0
3 555 AA 2AA 55 X F0
Auto Select 3 555 AA 2AA 55 555 90
Program 4 555 AA 2AA 55 555 A0 PA PD
Unlock Bypass 3 555 AA 2AA 55 555 20
Unlock Bypass
Program 2X A0PAPD
Unlock Bypass Reset 2 X 90 X 00
Chip Erase 6 555 AA 2AA 55 555 80 555 AA 2AA 55 555 10
Block Erase 6+ 555 AA 2AA 55 555 80 555 AA 2AA 55 BA 30
Erase Suspend 1 X B0
Erase Resume 1 X 30
Chip Erase Command. The Chip Erase com-
mand can be used to erase the entire chip. Six Bus
Write operations are required to issue the Chip
Erase Command and start the Program/Erase
Controller.
If any blocks are protected then these are ig nored
and all the other blocks are erased. If all of the
blocks a re p rote cted the Chip Era se o perat ion ap-
pears to start but will terminate within about 100µs,
leaving the data unchange d. No error condit ion is
given when protected blocks are ignored.
During the erase operation the memory wi ll ignore
all commands. It is not possible to issue any com-
mand to abort the operation. Typical chip erase
times are given in Table 6. All Bus Read opera-
tions during the Chip Erase operation will output
the Status Register on the Data Inputs/Outputs.
See the section on the Status Register for more
details.
After the Chip Erase operation has com pleted t he
memory will return to the Read Mode, unless an
error has occurred. When an error occurs the
memory will continue to output the Status Regis-
ter. A Read/Reset command must be i ssued to re-
set the error condition and return to Read Mode.
The Chip Erase Command sets all of the bits in un-
protected blocks of the memory to ‘1’. All previous
data is lost.
7/20
M29W040B
Block Erase Command. The Block Erase com-
mand can be used to erase a list of one or more
blocks. Six Bus Write operations are required to
select the first block in the list. Each additional
block in the list can be selected by repeating the
sixth Bus Wr ite operation using the address of the
additional block. The Bl ock Erase operation st arts
the Program/Erase Controller about 50µs after the
last Bus Write operation. Once the Program/Erase
Controller starts it is not possible to select any
more blocks. Each additional block must therefore
be selected within 50µs of the last block. The 50µs
timer r estarts when an additional block is select ed.
The Status Register can be read after the sixth
Bus Write operation. See the Status Register for
details on how to identify if the Program/Erase
Controller has started the Block Erase operation.
If any selected blocks are protected then these are
ignored and all the other selected blocks are
erased. If all of the selected blocks are protected
the Block Erase operation appears to s tart but will
terminate within about 100µs, l eaving the data un-
changed. No error condition is given when protect-
ed blocks are ignored.
During the Blo ck Erase ope ra tion the me mory will
ignore all commands except the Erase Suspend
and Read/Reset commands. Typical block erase
times are given in Table 6. All Bus Read opera-
tions du ring the Blo ck E rase operation will ou tput
the Status Register on the Data Inputs/Outputs.
See the section on the Status Register for more
details.
After the Block Erase operation has completed the
memory will return to the Read Mode, unless an
error has occurred. When an error occurs the
memory will continue to output the Status Regis-
ter. A Read/Reset command must be i ssued to re-
set the error condition and return to Read mode.
The Block Erase Command sets all of the bits in
the unprotected selec ted blocks to ‘1’. All previous
data in the selected blocks is lost.
Erase Suspend Comm and. The Erase Suspend
Comman d m ay be used to temporari ly sus pend a
Block Erase operation and return the memory to
Read mode. The command requires one Bus
Write operation.
The Prog ram/Eras e Controlle r will sus pend within
15µs of the Erase Suspend Command being is-
sued. Once the Program/Erase Controller has
stopped the memory will be set t o Read mode and
the Erase will be suspended. If the Erase Suspend
command is issued during the period when the
memory is waiting for an additional block (before
the Program/Erase Controller starts) then the
Erase is susp ended i mmedi ately and wi ll start im-
mediately when the Erase Resume Command is
issued. It will not be possible to select any further
blocks fo r er asur e aft er the Erase Resume.
During Erase Suspend it is possible to Read and
Program cells in blocks that are not being erased;
both Read and Program operations behave as
normal on these blocks. Reading from blocks that
are being erased will output the Status Register. I t
is also possible to enter the Auto Select mode: the
memory will behave as in the Auto Select mode on
all blocks until a Read/Reset command returns the
memory to Erase Suspen d mode.
Erase Resum e Command. The Erase Resume
command must be used to restart the Program/
Erase Controller from Erase Suspend. An erase
can be suspended and resumed more than once.
Table 6. Pro gra m , Erase Times and Progra m , Erase Enduran ce Cycle s
(TA = 0 to 70°C or –40 to 85°C)
Note: 1. TA = 25°C, VCC = 3.3V.
Parameter Min Typ (1) Typical after
100k W/E Cycles (1) Max Unit
Chip Erase (All bits in the memory set to ‘0’) 2.5 2.5 sec
Chip Erase 6 6 35 sec
Block Erase (64 Kbytes) 0.8 0.8 6 sec
Program 10 10 200 µs
Chip Program 5.5 5.5 30 sec
Program/Erase Cycles (per Block) 100,000 cycles
M29W040B
8/20
STATUS REGISTER
Bus Read operations from any address always
read the Status Register during Program and
Erase operations. It is also read during Erase Sus-
pend when an address within a block being erased
is acce ssed .
The bits in the Status Register are s um marized in
Table 7, Status Register Bits.
Data Polling Bit (DQ7). The Data Polling Bit can
be used to identify whether the Program/Erase
Controller has successfully completed its opera-
tion or if it has responded to an Erase Suspend.
The Data Polling Bit is output on DQ7 when the
Status Register is read.
During Program operations the Data Polling Bit
outputs the complement of the bit being pro-
grammed to DQ7. After successful completion of
the Program operation the memory returns to
Read mode and Bus Read oper ations from t he ad-
dress just programmed output DQ7, not its com-
plement.
During Erase ope rations the Data Po lling Bit out-
puts ‘0’, the complement of the erased state of
DQ7. Aft er s uc cessful completion of the Erase op-
eration the memory returns to Read mod e.
In Erase Suspend mode the Data Polling Bit will
output a ‘1’ during a Bus Read operation within a
block being erased. The Data Polling Bit will
change f rom a ‘0’ to a ‘1’ when the Program/Erase
Controller has suspe nded the Erase operation.
Figure 3, Data Polling Flowchart, gives an exam-
ple of how to use the Data Polling Bit. A V alid Ad-
dress is the address being programmed or an
address within the block being erased.
Toggle Bit (DQ6). The Toggle Bit can be used to
identify whether the Program/Erase Controller has
successfully completed its operation or if it has re-
sponded to an Erase Suspend. The Toggle Bit is
output on DQ6 when the Status Register is read.
During Program and Erase operations the Toggle
Bit changes f rom ‘0 ’ to ‘ 1’ to ‘ 0’, et c., with succes-
sive Bus Read operations at any address. After
successful completion of the operation the memo-
ry returns to Read mode.
During Erase Suspend mode the Toggle Bit will
output when addressing a cell within a block being
erased. The Toggle Bit will stop toggling when the
Program/Erase Controller has suspended the
Erase operation.
Figure 4 , Data Toggle Flowchart, g ives an exam-
ple of how to use the Data Toggle Bit.
Error Bit (DQ5). The Error Bit can be used to
identify errors detected by the Program/Erase
Controller. The Error Bit is set to ‘1’ wh en a Pro-
gram, Block Erase or Chip Erase operation fails to
write the correct data to the memory. If the Error
Bit is set a Rea d/Re se t comm and must be iss ued
before other command s are issued. The Error bit
is output on DQ5 when the Status Register is read.
Note that t he Program command cannot change a
bit set at ‘0’ back to ‘1’ and attempting to do so may
or may not set DQ5 at ‘1’. In both cases, a s uc ces-
sive Bus Read operation will show the bit is st ill ‘0’.
One of the Erase comm ands must be used to set
all the bits in a block or in the whole me mory from
‘0’ to ‘1’.
Table 7. Status Register Bits
No te : Unspeci f i ed data bi ts should be ignored.
Operation Address DQ7 DQ6 DQ5 DQ3 DQ2
Program Any Address DQ7 Toggle 0 ––
Program During Erase
Suspend A ny Address DQ7 Toggle 0
Program Error Any Address DQ7 Toggle 1
Chip Erase Any Address 0 Toggle 0 1 Toggle
Block Erase before
timeout E rasing Block 0 Togg le 0 0 Toggle
Non-Erasing Block 0 Toggle 0 0 No Toggle
Block Erase Erasing Block 0 Togg le 0 1 Toggle
Non-Erasing Block 0 Toggle 0 1 No Toggle
Erase Suspend Erasing Block 1 No Toggle 0 Toggle
Non-Erasing Block Data read as normal
Erase Error Good Block Address 0 Toggle 1 1 No Toggle
Faulty Block Address 0 Toggle 1 1 Toggle
9/20
M29W040B
Figu re 4. Da ta Po lli ng Fl owch a rt
READ DQ5 & DQ7
at VALID ADDRESS
START
READ DQ7
at VALID ADDRESS
FAIL PASS
AI03598
DQ7
=
DATA YES
NO
YES
NO
DQ5
= 1
DQ7
=
DATA YES
NO
Figu re 5. Da ta To ggl e Fl owchar t
READ DQ6
START
READ DQ6
TWICE
FAIL PASS
AI01370B
DQ6
=
TOGGLE NO
NO
YES
YES
DQ5
= 1
NO
YES
DQ6
=
TOGGLE
READ
DQ5 & DQ6
Erase Timer Bit (DQ3). The Erase Timer Bit can
be used to identify the start of Program/Erase
Controller operation during a Block Erase com-
mand. Once the Program/Erase Controller starts
erasing the Erase Ti mer Bit is set to ‘1’ . Before the
Program/Erase Controller starts the Erase Timer
Bit is set to ‘0’ and additional block s to be eras ed
may be written to the Command Interface. The
Erase Timer Bit is output on DQ3 when the Status
Register is read.
Alternative Toggle Bit (DQ2). The Alternative
Toggle Bit can be used to monitor the Program/
Erase controller during Erase operations. The Al-
ternative Toggle Bit is output on DQ2 when the
Status Register is read.
During Chip Erase and Block Erase operations the
Toggle Bit changes from ‘0’ to ‘1’ to ‘0’, etc., with
successive Bus Re ad operations from addresses
withi n the blocks being erased. Once the operati on
completes the memory returns to Read mode.
During Erase Suspend the Alternative Toggle Bit
changes from ‘0’ to ‘1’ to ‘0’, etc. with successive
Bus Read operations from addresses within the
blocks being erased. Bus Read operations to ad-
dresses within blocks not being erased will ou tput
the memory cell data as if in Read mode.
After an Erase operation that c auses t he Error Bit
to be set the Alternative Toggle Bit can be used to
identify which block or bl ocks have caused t he er-
ror. The Alternative Toggle Bit changes from ‘0’ to
‘1’ to ‘0’, etc. with successive Bus Read Opera-
tions from addresses within blocks that have not
erased correctly. The Alternative Toggle Bit does
not change if the addressed block has erased cor-
rectly.
M29W040B
10/20
Figure 6. AC Testing Input Output Waveform
AI01417
3V
0V
1.5V
Fi gure 7. AC Tes t i ng Loa d C i rcuit
AI02762
0.8V
OUT
CL = 30pF or 100pF
CL includes JIG capacitance
3.3k
1N914
DEVICE
UNDER
TEST
Table 9. Capacitance
(TA = 25 °C, f = 1 MHz)
No te : Sam pled only, not 100% tested .
Symbol Parameter Test Condition Min Max Unit
CIN Input Capacitance VIN = 0V 6pF
C
OUT Output Capacitance VOUT = 0V 12 pF
Table 8. AC Measu remen t Conditions
Parameter M29W040B
55 70 90 / 120
VCC Supply Voltage 3.0 to 3.6V 2.7 to 3.6V 2.7 to 3.6V
Load Capacitance (CL)30pF 30pF 100pF
Input Rise and Fall Times 10ns 10ns 10ns
Input Pulse Voltages 0 to 3V 0 to 3V 0 to 3V
Input and Output Timing Ref. Voltages 1.5V 1.5V 1.5V
11/20
M29W040B
Table 10. DC Characteristics
(TA = 0 to 70°C or –40 to 85°C)
Not e: 1. Sampled only, not 100% tested.
2. TA = 25 °C, VCC = 3.3V.
Symbol Parameter Test Condition Min Typ. (2) Max Unit
ILI Input Leakage Current 0V VIN VCC ±1 µA
ILO Output Leakage Current 0V VOUT VCC ±1 µA
ICC1 Supply Current (Read) E = VIL, G = VIH, f = 6MHz 410mA
I
CC2 Supply Current (Standby) E = VCC ± 0.2V 30 100 µA
ICC3 (1) Supply Current (Program/Erase) Program/Erase
Controller active 20 mA
VIL Input Low Voltage –0.5 0.8 V
VIH Input High Voltage 0.7VCC VCC + 0.3 V
VOL Output Low Voltage IOL = 1.8mA 0.45 V
VOH Output High Voltage IOH = –100µA VCC0.4 V
VID Identification Voltage 11.5 12.5 V
IID Identification Current A9 = VID 100 µA
VLKO (1) Program/Erase Lockout Supply
Voltage 1.8 2.3 V
M29W040B
12/20
Figure 8. Read Mode AC Waveforms
AI02903
tAVAV
tAVQV tAXQX
tELQX tEHQZ
tGLQV
tGLQX tGHQX
VALID
A0-A18
G
DQ0-DQ7
E
tELQV tEHQX
tGHQZ
VALID
Table 11. R ead AC Characteri stics
(TA = 0 to 70°C or –40 to 85°C)
Not e: 1. Sampled only, not 100% tested.
Symbol Alt Parameter Test Condition M29W040B Unit
55 70 90 / 120
tAVAV tRC Address Valid to Next Address Valid E = VIL,
G = VIL Min 55 70 90 ns
tAVQV tACC Address Valid to Output Valid E = VIL,
G = VIL Max 55 70 90 ns
tELQX (1) tLZ Chip Enable Low to Output
Transition G = VIL Min 0 0 0 ns
tELQV tCE Chip Enable Low to Output Valid G = VIL Max 55 70 90 ns
tGLQX (1) tOLZ Output Enable Low to Ou tput
Transition E = VIL Min 0 0 0 ns
tGLQV tOE Output Enable Low to Output Valid E = VIL Max 30 30 35 ns
tEHQZ (1) tHZ Chip Enable High to Output Hi-Z G = VIL Max 20 25 30 ns
tGHQZ (1) tDF Output Enable High to Output Hi-Z E = VIL Max 20 25 30 ns
tEHQX
tGHQX
tAXQX tOH Chip Enable, Output Enable or
Address Transition to Output
Transition Min 0 0 0 ns
13/20
M29W040B
Figure 9. Write AC Wavefor m s, Write Enable Con trolled
AI02908
E
G
W
A0-A18
DQ0-DQ7
VALID
VALID
VCC
tVCHEL
tWHEH
tWHWL
tELWL
tAVWL
tWHGL
tWLAX
tWHDX
tAVAV
tDVWH
tWLWHtGHWL
Table 12. W rite AC Characteristics, Write Enable Con trolled
(TA = 0 to 70°C or –40 to 85°C)
Symbol Alt Parameter M29W040B Unit
55 70 90 / 120
tAVAV tWC Address Valid to Next Address Valid Min 55 70 90 ns
tELWL tCS Chip Enable Low to Write Enable Low Min 0 0 0 ns
tWLWH tWP Write Enable Low to Write Enable High Min 40 45 45 ns
tDVWH tDS Input Valid to Write Enable High Min 25 30 45 ns
tWHDX tDH Write Enable High to Input Transition Min 0 0 0 ns
tWHEH tCH Write Enable High to Chip Enable High Min 0 0 0 ns
tWHWL tWPH Write Enable High to Write Enable Low Min 30 30 30 ns
tAVWL tAS Address Valid to Write Enable Low Min 0 0 0 ns
tWLAX tAH Write Enable Low to Address Transition Min 40 45 45 ns
tGHWL Output Enable High to Write Enable Low Min 0 0 0 ns
tWHGL tOEH Write Enable High to Output Enable Low Min 0 0 0 ns
tVCHEL tVCS VCC High to Chip Enable Low Min 50 50 50 µs
M29W040B
14/20
Table 13. Write AC Characteristics, Chip Enable Controlled
(TA = 0 to 70°C or –40 to 85°C)
Symbol Alt Parameter M29W040B Unit
55 70 90 / 120
tAVAV tWC Address Valid to Next Address Valid Min 55 70 90 ns
tWLEL tWS Write Enable Low to Chip Enable Low Min 0 0 0 ns
tELEH tCP Chip Enable Low to Chip Enable High Min 40 45 45 ns
tDVEH tDS Input Valid to Chip Enable High Min 25 30 45 ns
tEHDX tDH Chip Enable High to Input Transition Min 0 0 0 ns
tEHWH tWH Chip Enable High to Write Enable High Min 0 0 0 ns
tEHEL tCPH Chip Enable High to Chip Enable Low Min 30 30 30 ns
tAVEL tAS Address Valid to Chip Enable Low Min 0 0 0 ns
tELAX tAH Chip Enable Low to Address Transition Min 40 45 45 ns
tGHEL Output Enable High Chip Enable Low Min 0 0 0 ns
tEHGL tOEH Chip Enable High to Output Enable Low Min 0 0 0 ns
tVCHWL tVCS VCC High to Write Enable Low Min 50 50 50 µs
Figure 10. Write AC Wavefo rms, Chip Enable Controlled
AI02909
E
G
W
A0-A18
DQ0-DQ7
VALID
VALID
VCC
tVCHWL
tEHWH
tEHEL
tWLEL
tAVEL
tEHGL
tELAX
tEHDX
tAVAV
tDVEH
tELEHtGHEL
15/20
M29W040B
Table 14. Ordering Information Scheme
Note: The last two charac ters o f the ordering code m ay be replaced by a letter code for preprogramm ed
parts, otherwise devices are shipped from the factory with the memory content bits erased to ‘1’.
For a list of availabl e options (S peed, P ack age, et c...) or for further information on any aspect of this de-
vice, pleas e contact the ST Sales Office nearest to you.
Example: M29W040B 55 N 1 T
Device Type
M29
Operating Voltage
W = VCC = 2.7 to 3.6V
Device Function
040B = 4 Mbit (512Kb x8), Uniform Block
Speed
55 = 55 ns
70 = 70 ns
90 = 90 ns
120 = 120 ns
Package
K = PLCC32
N = TSOP32: 8 x 20 mm
NZ = TSOP32: 8 x 14 mm
Temperature Range
1 = 0 to 70 °C
6 = –40 to 85 °C
Option
T = Tape & Reel Packing
M29W040B
16/20
Table 15. Revision History
Date Rev. Revision Details
July 1999 -01 First Issue
21-Sep-1999 -02 ICC1 Typ. specification added (Table 10)
ICC2 Typ. specification added (Table 10)
09-Mar-2000 -03
Document type: from Preliminary Data to Data Sheet
Status Register bit DQ5 clarification
Data Polling Flowchart diagram change (Figure 4)
Data Toggle Flowchart diagram change (Figure 5)
22-Apr-2002 -04 PLCC32 package mechanical data modified
17/20
M29W040B
PLCC32 – 32 lead Plastic Leaded Chip Carri er, Pac kage Ou tline
Not e: Drawing is not to scale.
PLCC32 – 32 lead Plastic Leaded Chip Carrier, Pac kage Mech anical Data
Symbol millimeters inches
Typ Min Max Typ Min Max
A 3.18 3.56 0.125 0.140
A1 1.53 2.41 0.060 0.095
A2 0.38 0.015
B 0.33 0.53 0.013 0.021
B1 0.66 0.81 0.026 0.032
CP 0.10 0.004
D 12.32 12.57 0.485 0.495
D1 11.35 11.51 0.447 0.453
D2 4.78 5.66 0.188 0.223
D3 7.62 0.300
E 14.86 15.11 0.585 0.595
E1 13.89 14.05 0.547 0.553
E2 6.05 6.93 0.238 0.273
E3 10.16 0.400
e 1.27 0.050
F 0.00 0.13 0.000 0.005
N32 32
R 0.89 0.035
PLCC-A
D
E3 E1 E
1 N
D1
D3
CP
B
E2
e
B1
A1
A
R
0.51 (.020)
1.14 (.045)
F
A2
E2
D2 D2
M29W040B
18/20
TSOP32 – 32 lead Plastic Thin S mall Outline, 8 x 20mm, Package Ou tline
Not e: Drawing is not to scale.
TSOP32 – 32 lead Plastic Thin S mall Outline, 8 x 20mm, Package Me chan ical Data
Symbol millimeters inches
Typ Min Max Typ Min Max
A 1.20 0.0472
A1 0.05 0.15 0.0020 0.0059
A2 0.95 1.05 0.0374 0.0413
B 0.15 0.27 0.0059 0.0106
C 0.10 0.21 0.0039 0.0083
D 19.80 20.20 0.7795 0.7953
D1 18.30 18.50 0.7205 0.7283
E 7.90 8.10 0.3110 0.3189
e 0.50 0.0197
L 0.50 0.70 0.0197 0.0276
α
N 32 32
CP 0.10 0.0039
TSOP-a
D1
E
1 N
CP
B
e
A2
A
N/2
D
DIE
C
LA1 α
19/20
M29W040B
TSOP32 – 32 lead Plastic Thin S mall Outline, 8 x 14mm, Package Ou tline
Not e: Drawing is not to scale.
TSOP32 – 32 lead Plastic Thin S mall Outline, 8 x 14mm, Package Me chan ical Data
Symbol millimeters inches
Typ Min Max Typ Min Max
A 1.20 0.0472
A1 0.05 0.15 0.0020 0.0059
A2 0.95 1.05 0.0374 0.0413
B 0.17 0.27 0.0067 0.0106
C 0.10 0.21 0.0039 0.0083
D 13.80 14.20 0.5433 0.5591
D1 12.30 12.50 0.4843 0.4921
E 7.90 8.10 0.3110 0.3189
e 0.50 0.0197
L 0.50 0.70 0.0197 0.0276
α
N 32 32
CP 0.10 0.0039
TSOP-a
D1
E
1 N
CP
B
e
A2
A
N/2
D
DIE
C
LA1 α
M29W040B
20/20
Info rm atio n fur ni shed is bel i eved to be ac curate an d rel i able. However, STMicroelectronics assu m es no responsibility for t he consequences
of use of such information nor for any infringement of patents or other rights of third parties which may result from its use. No license is granted
by i m pl i cation or otherwise under a ny paten t or pat ent ri ghts of STMicroel ectron i cs . Spec i fications me nt i oned in this publ icatio n are subj ect
to change without notice. This publication supersedes and replaces all information previously supplied. STMicroelectronics produ ct s are not
authorized for use as c ri tical compone nts in lif e support device s or systems wi thout express wri tten ap proval of STM i croel ectronics.
The ST l ogo is re gi stered trademark of STMic roelec troni cs
All other nam es are th e prope rty of their respective owners
© 2002 STMicroelectronics - All Rights Reserved
STM i croel ectron ic s group of co m panies
Aus tralia - Br azil - Canada - China - Finl and - Fr ance - Germ any - Hong Kong -
India - Israel - Italy - Japan - Mal aysia - M al ta - Mor occo - Singapore - Spai n - S weden - Sw i tz erland - United Kin gdom - United States.
www.st.com