The M25PX32 is a 32 Mbit (4 Mb x 8) serial Flash memory, with advanced write protection
mechanisms, accessed by a high speed SPI-compatible bus.
The M25PX32 supports two new, high-performance dual input/output instructions:
●Dual Output Fast Read (DOFR) instruction used to read data a t up t o 75 MHz by using
both pin DQ1 and pin DQ0 as outputs
●Dual Input Fast Program (DIFP) instruction used to program data at up to 75 MHz by
using both pin DQ1 and pin DQ0 as inputs
These new instructions double the transfer bandwidth for read and program operations.
The memory can be programmed 1 to 256 bytes at a time, using the Page Program
instruction.
The memory is organized as 64 sectors that are further divided into 16 subsectors each
(1024 subsectors in total).
The memory can be erased a 4-Kbyte subsector at a time, a 64-Kbyte sect or at a time , or as
a whole. It can be Write Protected by software using a mix of volatile and non-volatile
protection features, depending on the application needs. The protection granularity is of 64
Kbytes (sector granularity).
An enhanced Fast Bulk Erase mode is available to speed up Bulk Erase operations in
factory environment. The device enters this mode whenever the V
the Write Protect/Enhanced Program supply voltage pin (W
/VPP).
voltage is applied to
PPH
The M25PX32 has 64 One-Time-Programmable bytes (OTP bytes) that can be read and
programmed using two dedicated instructions, Read OTP (ROTP) and Program OTP
(POTP), respectively. These 64 bytes can be permanently locked by a particular Program
OTP (POTP) sequence. Once they have been lock ed, they become read-only and this state
cannot be reverted.
Further features are available as additional security options. More information on these
security features is available, upon completion of an NDA (nondisclosure agreement), and
are, therefore, not described in this datasheet. For more details of this option contact your
nearest ST Sales office.
In order to meet environmental requirements, ST offers the M25PX32 in ECOPACK®
packages. ECOPACK® packages are Lead-free and RoHS compliant.
ECOPACK® is an ST trademark. ECOPACK® specifications are available at: www.st.com.
6/63
M25PX32Description
Figure 1.Logic diagram
V
CC
DQ0
DQ1
C
M25PX32
W/V
S
PP
HOLD
V
Table 1.Signal names
SS
AI14228
Signal nameFunctionDirection
CSerial ClockInput
DQ0Serial Data inputI/O
DQ1Serial Data outputI/O
(1)
(2)
SChip SelectInput
/V
W
PP
HOLD
Write Protect/Enhanced Program supply voltageInput
HoldInput
V
CC
V
SS
1. Serves as an output during Dual Output Fast Read (DOFR) instructions.
2. Serves as an input during Dual Input Fast Program (DIFP) instructions.
Supply voltage
Ground
Figure 2.VFQFPN and SO8 connections
M25PX32
SV
1
2
W/V
1. There is an exposed central pad on the underside of the VFQFPN package. This is pulled, internally, to
V
, and must not be allowed to be connected to any other voltage or signal line on the PCB.
SS
2. See Package mechanical section for package dimensions, and how to identify pin-1.
PP
SS
3
4
7/63
8
CC
7
HOLDDQ1
6
C
5
DQ0V
AI13720b
DescriptionM25PX32
Figure 3.SO16 connections
M25PX32
HOLD
V
CC
DU
DU
DU
S
DQ1
1. DU = Don’t use.
2. See Package mechanical section for package dimensions, and how to identify pin-1.
16
1
2
3
4
5
6
7
8
15
14
13
12
11
10
C
DQ0
DUDU
DU
DU
DU
V
SS
9
W/V
PP
AI13721b
8/63
M25PX32Signal descriptions
2 Signal descriptions
2.1 Serial Data output (DQ1)
This output signal is used to transf er data serially out of the device. Data are shifted out on
the falling edge of Serial Clock (C).
During the Dual Input Fast Program (DIFP) instruction, pin DQ1 is used as an input. It is
latched on the rising edge of the Serial Clock (C).
2.2 Serial Data input (DQ0)
This input signal is used to transfer data serially into the device. It receives instructions,
addresses, and the data to be programmed. Values are latched on the rising edge of Serial
Clock (C).
During the Dual Output Fast Read (DOFR) instruction, pin DQ0 is used as an output. Data
are shifted out on the falling edge of the Serial Clock (C).
2.3 Serial Clock (C)
This input signal provides the timing of the serial interface. Instructions, addresses, or data
present at Serial Data input (DQ0) are latched on the rising edge of Serial Clock (C). Data
on Serial Data output (DQ1) changes after the falling edge of Serial Clock (C).
2.4 Chip Select (S)
When this input signal is High, the device is deselec ted and Serial Data output (DQ1) is at
high impedance. Unless an internal Program, Erase or Write Status Register cycle is in
progress, the device will be in the Standby Power mode (this is not the Deep Power-down
mode). Driving Chip Select (S
After Power-up, a falling edge on Chip Select (S
instruction.
2.5 Hold (HOLD)
The Hold (HOLD) signal is used to pause any serial communications with the de vice without
deselecting the device.
During the Hold condition, the Serial Data output (DQ1) is hi gh impe dance, and Serial Data
input (DQ0) and Serial Clock (C) are Don’t care.
To start the Hold condition, the device must be selected, with Chip Select (S
) Low enables the device, placing it in the Active Power mode .
) is required prior to the start of any
) driven Low.
9/63
Signal descriptionsM25PX32
2.6 Write Protect/Enhanced Program supply voltage (W/VPP)
W/VPP is both a control input and a power supply p in. The two functions ar e selected by the
voltage range app lied to the pin.
If the W
input. This input signal is used to freeze the size of the area of memory that is protected
against program or erase instructions (as specified by the values in the BP2, BP1 and BP0
bits of the Status Register. See Table 9).
If V
during the Bulk Erase cycle. In this case V
completed.
/V
input is kept in a low voltage range (0 V to VCC) the pin is seen as a control
PP
is in the range of V
PP
PPH
2.7 VCC supply voltage
VCC is the supply voltage.
2.8 VSS ground
VSS is the reference for the VCC supply voltage.
(as defined in Table 14) it acts as an additional power supply
must be stable until the Bulk Er ase algorithm is
PP
10/63
M25PX32SPI modes
3 SPI modes
These devices can be drive n by a microcontroller with its SPI peripheral running in either of
the two following modes:
●CPOL=0, CPHA=0
●CPOL=1, CPHA=1
For these two modes, input data is latched in on the rising edge of Serial Clock (C), and
output data is available from the falling edge of Serial Clock (C).
The difference between the two modes, as sho wn in Figure 5, is the clock polarity when the
bus master is in Standby mode and not transferring data:
●C remains at 0 for (CPOL=0, CPHA=0)
●C remains at 1 for (CPOL=1, CPHA=1)
Figure 4.Bus Master and memory devices on the SPI bus
V
SS
V
CC
R
SPI interface with
(CPOL, CPHA) =
(0, 0) or (1, 1)
SPI Bus Master
CS3CS2 CS1
1. The Write Protect (W) and Hold (HOLD) signals should be driven, High or Low as appropriate.
SDO
SDI
SCK
device
V
CC
HOLD
W
C
V
SS
DQ1 DQ0
SPI memory
S
C
DQ1DQ0
RRR
SPI memory
S
device
V
CC
W
HOLD
C
V
SS
S
DQ1DQ0
SPI memory
device
W
V
CC
V
SS
HOLD
AI13725b
Figure 4 shows an exampl e of three de vices connected to an MCU, on an SPI bus. Only one
device is selected at a time, so only one device drives t he Serial Data ou tput ( DQ1) line a t a
time, the other devices are high impedance. Resistors R (represented in Figure 4) ensure
that the M25PX32 is not selected if the Bus Master leaves the S
line in the high impedance
state. As the Bus Master may enter a state where all inputs/outputs are in high impedance
at the same time (for example, when the Bus Master is reset), the clock line (C) must be
connected to an external pull-down resistor so that, when all inputs/outputs become high
impedance, the S
C do not become High at the same time, and so, that the t
typical value of R is 100 kΩ, assuming that the time constant R*C
line is pulled High while the C line is pulled Low (thus ensuring that S a nd
requirement is met). The
SHCH
(Cp = parasitic
p
capacitance of the bus line) is shorter than the time during which the Bus Master leaves the
SPI bus in high impedance.
11/63
SPI modesM25PX32
Example: Cp = 50 pF, that is R*Cp = 5 µs <=> the application must ensure that the Bus
Master never leaves the SPI bus in the hig h impedance state for a time period shorter than
5µs.
Figure 5.SPI modes supported
CPHA
CPOL
C
0
0
1
1
C
DQ0
DQ1
MSB
MSB
AI13730
12/63
M25PX32Operating features
4 Operating features
4.1 Page programming
To program one data byte, two instructions are required: Write Enab le (WREN), which is one
byte, and a Page Program (PP) sequence, which consists of four bytes plus data. This is
followed by the internal Program cycle (of duration t
To spread this overhead, the P age Program (PP) instruction allows up to 256 bytes to be
programmed at a time (changing bits from 1 to 0), provided that they lie in consecutive
addresses on the same page of memory.
For optimized timings, it is recommended to use the Page Program (PP) instruction to
program all consecutive targeted bytes in a single sequence versus using several Page
Program (PP) sequences with each containing only a few bytes (see Page Program (PP)
and Table 17: AC characteristics).
4.2 Dual Input Fast Program
The Dual Input Fast Program (DIFP) instruction makes it possible to program up to 256
bytes using two input pins at the same time (by changing bits from 1 to 0).
PP
).
For optimized timings, it is recommended to use the Dual Input Fast Program (DIFP)
instruction to program all consecutive targeted bytes in a single sequence rather to using
several Dual Input Fast Program (DIFP) sequences each containing only a few bytes (see
Section 6.12: Dual Input Fast Program (DIFP)).
4.3 Subsector Erase, Sector Erase and Bulk Erase
The Page Program (PP) instruction allows bits to be reset from 1 to 0. Before this can be
applied, the bytes of memory need to have been erased to all 1s (FFh). This can be
achieved either a subsector at a time, using the Subsector Erase (SSE) instruction, a sector
at a time, using the Sector Erase (SE) instruction, or throughout the entire memory, using
the Bulk Erase (BE) instruction. This starts an internal Erase cycle (of duration t
t
).
BE
The Erase instruction must be preceded by a Write Enable (WREN) instruction.
4.4 Polling during a Write, Program or Erase cycle
A further improvement in the time to Write Status Register (WRSR), Program OTP (POTP),
Program (PP), Dual Input F ast Program (DIFP) or Erase (SSE, SE or BE) can be achieved
by not waiting for the worst case delay (t
(WIP) bit is provided in the Status Register so that the application program can monitor its
value, polling it to establish when the previous Write cycle, Program cycle or Erase cycle is
complete.
, tPP, t
W
, tSE, or tBE). The Write In Progress
SSE
SSE
, tSE or
13/63
Operating featuresM25PX32
4.5 Fast Bulk Erase mode
The Fast Bulk Erase mode is used to speed up Bulk Erase operations. The device enters
the Fast Bulk Er ase mode d uring a Bulk Erase inst ruction whene v er a voltage equal to V
is applied to the W
/VPP pin.
PPH
The use of the Fast Bu lk Erase mode requires specific operating conditions in a ddition to the
normal ones (V
●the voltage applied to the W/V
●ambient temperature, T
●the cumulated time during which W/V
must be within the normal operating range):
CC
pin must be equal to V
PP
must be 25 °C ±10 °C,
A
is at V
PP
PPH
(see Table 13)
PPH
should be less than 80 hours.
4.6 Active Po wer, Standby Power and Deep Power-down modes
When Chip Select (S) is Low, the device is selected, and in the Active Power mode.
When Chip Select (S
) is High, the device is deselect ed, but coul d remain in the Activ e P o wer
mode until all internal cycles have completed (Program, Erase, Write Status Register). The
device then goes in to the Standby Power mode. The device consumption drops to I
The Deep Power-down mode is entered when the specific instruction (the Deep Powerdown (DP) instruction) is executed. The device consumption drops further to I
device remains in this mode until another specific instruction (the Release from Deep
Power-down (RDP) instruction) is executed.
While in the Deep Power-down mode, the device ignores all Write, Program and Erase
instructions (see Deep Power-down (DP)), this can be used as an extra software protection
mechanism, when the device is not in active use, to protect the device from inadvertent
Write, Program or Erase instructions.
4.7 Status Register
The Status Register contains a number of status a nd cont rol bits that can b e read or set (as
appropriate) by specific instructions. See Section 6.4: Read Status Register (RDSR) for a
detailed description of the Status Register bits.
CC2
CC1
. The
.
14/63
M25PX32Operating features
4.8 Protection modes
There are protocol-related and specific hardware and software protection modes. They are
described below.
4.8.1 Protocol-related protections
The environments where non-volatile memory devices are used can be very noisy. No SPI
device can operate correctly in the presence of excessive noise. To help combat this, the
M25PX32 features the following data protection mechanisms:
●P ower On Reset and an internal timer (t
changes while the power supply is outside the operating specification
●Program, Er ase and Write Status Register inst ructions are chec k ed tha t the y co nsist of
a number of clock pulses tha t is a multiple of eight, before they are accepted for
execution
●All instructions that modify data must be prec eded by a Write Enable (WREN)
instruction to set the Write Enable Latch (WEL) bit . This bit is re turned to its re set state
by the following events:
●In addition to the lo w power consumption feature , the Deep Power-down mode offers
extra softw are protection, as all Write, Program and Erase instructions are ignored.
) can provide protection against inadvertent
PUW
15/63
Operating featuresM25PX32
4.8.2 Specific hardware and software protection
There are two software protected modes , SPM1 and SPM2, that can b e combined to protect
the memory array as required. Th e SPM 2 can be lo cked by hardw are wit h th e help o f th e W
input pin.
SPM1 and SPM2
●The first software protected mode (SPM1) is managed by specific Lock Registers
assigned to each 64 Kbyte sector.
The Lock Registers can be read and written using the Read Loc k Register (RDLR) a nd
Write to Lock Register (WRLR) instructions.
In each Lock Register two bits control the protection of each sector: the Write Lock bit
and the Lock Down bit.
–Write Lock bit:
The Write Lock bit determines whether the contents of the sector can be modifi ed
(using the Write, Program or Erase instructions). When the Write Loc k b it is set to
‘1’, the sector is write protected – any operations t hat attempt to change the data
in the sector will fail. When the Write Lock bit is reset to ‘0’, the sector is not write
protected by the Lock Register, and may be modified.
–Lock Down bit:
The Lock Down bit pro vides a mechanism for protecting software da ta from simple
hacking and malicious attack. When the Lock Down bit is set, ‘1’, further
modification to the Write Lock and Lock Down bits cannot be performed. A powerup, is required before changes to these bits can be made. When the Lock Down bit
is reset, ‘0’, the Write Lock and Lock Down bits can be changed.
The definition of the Lock Register bits is given in Table 9: Lock Register out.
Table 2.Software protection truth table ( Sectors 0 to 63, 64 Kbyte granularity)
Sector Lock
Register
Protection status
Lock
Down bit
00
01
10
11
●the second software protected mode (SPM2) uses the Block Protect bits (see
Write
Lock bit
Sector unprotected from Program/Erase/Write operations, protection status
reversible
Sector protected from Program/Erase/Write operations, protection status
reversible
Sector unprotected from Program/Erase/Write operations,
Sector protection status cannot be changed except by a Power-up.
Sector protected from Program/Erase/Write operations,
Sector protection status cannot be changed except by a Power-up.
Section 6.4.3: BP2, BP1, BP0 bits) and the Top/Bottom bit (see Section 6.4.4: TB bit) to
allow part of the memory to be configured as read-only.
16/63
M25PX32Operating features
Table 3.Protected area sizes
Status Register
contents
TB
BP
BP
bit
bit 2
bit 1
BP
bit 0
Protected areaUnprotected area
00 0 0 none All sectors
Memory content
(1)
(64 sectors: 0 to 63)
00 0 1 Upper 64th (Sector 63)Lower 63/64ths (63 sectors: 0 to 62)
00 1 0 Upper 32nd (two sectors: 62 and 63) Lower 31/32nds (62 sectors: 0 to 61)
00 1 1
01 0 0 Upper eighth (eight sectors: 56 to 63)
01 0 1
01 1 0
Upper sixteenth (four sectors: 60 to
63)
Upper quarter (sixteen sectors: 48 to
63)
Upper half (thirty-two sectors: 32 to
63)
Lower 15/16ths (60 sectors: 0 to 59)
Lower seven-eighths (56 sectors: 0
to 55)
Lower three-quarters (48 sectors: 0
to 47)
Lower half (32 sectors: 0 to 31)
01 1 1 All sectors (64 sectors: 0 to 63)none
(1)
1000noneAll sectors
(64 sectors: 0 to 63)
1001Lower 64th (sector 0)Upper 63/64ths (63 sectors: 1 to 63)
1010Lower 32nd (two sectors: 0 and 1)Upper 31/32ths (62 sectors: 2 to 63)
1011Lower 16th (four sectors: 0 to 3)Upper 15/16ths (60 sectors: 4 to 63)
1100Lower 8th (eight sectors: 0 to 7)Upper 7/8ths (56 sectors: 8 to 63)
1101Lower 4th (sixteen sectors: 0 to 15)Upper 3/4ths (48 sectors: 16 to 63)
1110
Lower half (thirty-two sectors: 0 to
31)
Upper half (32 sectors: 32 to 63)
1111All sectors (64 sectors: 0 to 63)none
1. The device is ready to accept a Bulk Erase instruction if, and only if, all Block Protect (BP2, B P1, BP0) are
0.
As a second level of protection, the Write Protect signal (applied on the W/VPP pin) can
freeze the Status Register in a read-only mode. In this mode, the Block Protect bits (BP2,
BP1, BP0) and the Status Register Write Disable bit (SRWD) are protected. For more
details, see Section 6.5: Write Status Register (WRSR).
17/63
Operating featuresM25PX32
4.9 Hold condition
The Hold (HOLD) signal is used to pause any serial communications with the de vice without
resetting the clocking sequence. However, taking this signal Low does not terminate any
Write Status Register, Pro gram or Erase cycle that is currently in progress.
To enter the Hold condition, the device must be selected, with Chip Select (S
The Hold condition starts on the falling edge of the Hold (HOLD
) signal, provided that this
) Low.
coincides with Serial Clock (C) being Low (as shown in Figure 6).
The Hold condition ends on the rising edge of the Hold (HOLD
) signal, provided that this
coincides with Serial Clock (C) being Low.
If the falling edge does not coincide with Serial Clock (C) being Low, the Hold condition
starts after Serial Clock (C) next goes Low. Similarly, if the rising edge does not coincide
with Serial Clock (C) being Low, the Hold condition ends after Serial Clock (C) next goes
Low. (This is shown in Figure 6).
During the Hold condition, the Serial Data output (DQ1) is hi gh impe dance, and Serial Data
input (DQ0) and Serial Clock (C) are Don’t care.
Normally , the de vice is k ept selected, with Chip Select (S
) driven Low, for the whole dur ation
of the Hold condition. This is to ensure that the state of the internal logic remains unchanged
from the moment of entering the Hold condition.
If Chip Select (S
) goes High while the device is in the Hold condition, t his has the effect of
resetting the internal logic of the device. To restart communication with the device, it is
necessary to drive Hold (HOLD
) High, and then to drive Chip Select (S) Low. This prevents
the device from going back to the Hold condition.
Figure 6.Hold condition activation
C
HOLD
Hold
Condition
(standard use)
18/63
Hold
Condition
(non-standard use)
AI02029D
M25PX32Memory organization
5 Memory organization
The memory is organized as:
●4 194 304 bytes (8 bits each)
●1024 subsectors (4 Kbytes each)
●64 sectors (64 Kbytes each)
●16384 pages (256 bytes each)
●64 OTP bytes located outside the main memory array
Each page can be individually prog rammed ( bits are prog rammed from 1 t o 0). The de vice is
Subsector, Sector or Bulk Erasable (bits are erased from 0 to 1) but not Page Erasable.
Figure 7.Block diagram
HOLD
V
DQ0
DQ1
PP
Control Logic
S
C
Address Register
and Counter
Y Decoder
High Voltage
Generator
I/O Shift Register
256 Byte
Data Buffer
64 OTP bytes
Status
Register
3FFFFFh
Configurable OTP
area in main
memory array
00000h
256 Bytes (Page Size)
X Decoder
000FFh
AI13722
19/63
Loading...
+ 44 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.