Operating features
M25PX64
4.7.2
Specific hardware and software protection
There are two software protected modes, SPM1 and SPM2, that can be combined to protect
the memory array as required. The SPM2 can be locked by hardware with the help of the 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 lock register (RDLR) and
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 modified
(using the write, program or erase instructions). When the write lock bit is set to ‘1’,
the sector is write protected – any operations that 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 provides a mechanism for protecting software data from simple
hacking and malicious attack. When the lock down bit is set to ‘1’, further
modification to the write lock and lock down bits cannot be performed. A power-up
is required before changes to these bits can be made. When the lock down bit is
reset to ‘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 127, 64-Kbyte granularity)
Sector lock register
Protection status
Lock
Write
down bit lock bit
Sector unprotected from program/erase/write operations, protection status
reversible
0
0
1
1
0
1
0
1
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.
the second software protected mode (SPM2) uses the block protect bits (see
Section 6.4.3: BP2, BP1, BP0 bits) and the top/bottom bit (see Section 6.4.4:
Top/bottom bit) to allow part of the memory to be configured as read-only.
16/66