M25P64
18/38
Write Statu s Register (WRSR)
The Write Status Reg ister (WRSR ) instructi on al-
lows new values to be written to the Status Regis-
ter. Before it can be accepted, a Write Enable
(WREN) instruction must previously have been ex-
ecuted. After the Write Enable (WREN) instruction
has been de coded and executed , the device sets
the Write Enable Latch (WEL).
The Write Status Register (WRSR) instruction is
entered by driving Chip Select (S) Low, followed
by the instruction code and the data byte on Serial
Data Input (D).
The instruction sequence is shown in Figure 13. .
The Write Status Register (WRSR) instruction has
no effect on b6 , b5, b1 and b0 of th e Status Reg -
ister. b6 and b5 are always read as 0.
Chip Select (S) must be driven High after the
eighth bit of the data byte has been latched in. If
not, the Write Status Register (W RSR) instruc tion
is not executed. As soon as Chip Select (S) is dr iv-
en H igh, t he se lf-tim ed Wri te St atus Regist er cycl e
(whose duration is tW) is initiated. While the Write
Status Register cycle is in progress, the Status
Register may still be read to check the value of the
Write In Progress (WIP) bit. The Write In Progress
(WIP) bit is 1 during the self-timed Write Status
Register cycle, and is 0 when it is completed.
When the cycle is completed, the Write Enable
Latch (WEL) is reset.
The Write Status Register (WRSR) instruction al-
lows the user to change the values of the Block
Protect (BP2, BP1, BP0) bits, to define the size of
the area th at is to be tr eated as re ad-only, as de-
fined in Table 2.. The Write Status Register
(WRSR) instruction also allows the user to set or
reset the Status Register Write Disable (SRWD)
bit in accordance with the Write Protect (W) signal.
The Status Register Write Disable (SRWD) bit and
Write Protect (W) signal allow the device to be put
in the Hardware Protected Mode (HPM). The Write
Status Reg is ter ( W RS R) in str uct ion is no t e xe cut -
ed once the Hardware Protected Mode (HPM) is
entered.
Table 7. Protection Modes
Note: 1. As defined by the values in th e Block Protect (B P2, BP1, BP0) bits of the Status Register, as shown in Table 2..
The prote ction featu res of the devi ce are summa -
rized in T ab le 7.
When the Status Register Write Disable (SRWD)
bit of the Status Register is 0 (its initial delivery
state), it is possi bl e to wri te to the S tatu s Re gi ste r
provided that the Write Enable Latch (WEL) bit has
previously been set by a Write Enable (WREN) in-
struction, regardless of the whethe r Write Prote ct
(W) is driven High or Low.
When the Status Register Write Disable (SRWD)
bit of the Status Register is set to 1, two cases
need to be cons idered, de pending on the sta te of
Write Protect (W):
– If Write Protect (W) is driven High, it is
possible to write to the Status Register
provided that the Write Enable Latch (WEL) bit
has previously been set by a Write Enable
(WREN) instruction.
– If Write Protect (W) is driven Low, it is
not
possible to write to the Status Register
even
if
the Write Enable Latch (WEL) bit has
previously been set by a Write Enable
(WREN) instruction. (Attempts to write to the
Status Register are rejected, and are not
accepted for execution). As a consequence,
all the data bytes in the memory area that are
software protected (SPM) by the Block Protect
(BP2, BP1, BP0) bits of the Status Register,
are also hardware protected against data
modification.
Regardless of the order of the two events, the
Hardware Protected Mode (HPM) can be entered:
W
Signal SRWD
Bit Mode Write Protecti on of the
Status Register
Memory Content
Protected Area1Unprotected Area1
10
Software
Protected
(SPM)
S tatus Register is Writable
(if the WREN instruction
has set the WEL bit)
The values in the SRWD,
BP2, BP1 and BP0 bits
can be changed
Protected against Page
Progra m, Se cto r Era se
and Bulk Erase
Ready to accept Page
Progr am and S ector E rase
instructions
00
11
01
Hardware
Protected
(HPM)
Status Register is
Hardwa re wri te pro tec te d
The values in the SRWD,
BP2, BP1 and BP0 bits
cannot be chan ge d
Protected against Page
Progra m, Se cto r Era se
and Bulk Erase
Ready to accept Page
Progr am and S ector E rase
instructions