M93S66, M93S56, M93S46
14/34
WRITE PROTECTION AND THE PROTECTION REGISTER
The Protection Register on the M93Sx6 is used to
adjust the amount of memory that is to be write
protected. The write prote cted a rea extends from
the addr ess given in t he Protection Register, up to
the top address in the M93Sx6 device.
Two flag bits are used to indicate the Protection
Register status :
– Protect ion Flag: this is used to enable/disable
pro tection of the write-protected area of the
M9 3 S x 6 memory
– OTP bi t: when set, this disables access to the
Protec tion Register, and thus prevents any
further modification s to the value in th e
Protec tion Register.
The lower-bound memory address is wri tten to the
Protection Register using the Protection Register
Write (PRWRITE) instruction. It can be read using
the Protection Register Read (PRREAD) instruc-
tion.
The Protection Register Enable (PREN) instruc-
tion must be executed before any PRCLEAR,
PRWRITE or PRDS instruction, and wi th appropri-
ate levels applied to the Protection Enable (PRE)
and Write Enable (W) s ign als.
Write-access to the Protection Register is
achieved by execut ing the f ollowing sequence:
– Execut e the Write Enable (WEN) instruction
– Execut e the Protection Regi ster Enable
(PREN) instruction
– Execu te one PR WRI TE , PR CL EAR or PRDS
instructions, to set a new boundary address in
the Protection Register, to clear the protection
address (to al l 1s), or permanently to freeze
the value held in the Protection Register.
Protection Regi ster Read
The Protection Register Read (PRREAD) instruc-
tion outputs, on Serial Data Output (Q), the con-
tent of the Protection Register, followed by the
Protection Flag bit. The Protection Enable (PRE)
signal must be driven High before and during the
instruction.
As with the Read Data from Memory (READ) in-
struction, a dummy 0 b it is outp ut first. Since it is
not possible to distinguish bet ween the Protec tion
Register being cleared (all 1s) or having been writ-
ten with all 1s, the user must check the Protection
Flag status (and not the Protection Register con-
tent) to ascertain the setting of the memory protec-
tion.
Protection Register Enable
The Protection Register Enable (PREN) instruc-
tion is used to authorize the use of instructions that
modify the Protection Register (PRWRITE,
PRCLEAR, PRDS). The Protection Register En-
able (PREN) instruction does not modify the Pro-
tection Flag bit value.
Note: A Write Enable (WEN) instruction must be
executed before the Protection Register Enable
(PREN) instruction. Both the Protection Enable
(PRE) and Writ e Enable (W) signals m ust be driv-
en High during the instruction execution.
Protection Regi ster Clear
The Protection Register Clear (PRCLEAR) in-
struction clears the address stored in the Protec-
tion Register to all 1s, so that none of the memory
is write-protected by the Protection Register. How-
ever, it should be noted that all the memory re-
mains protected, in the normal way, using the
Write Enable (WEN) and Write Disable (WDS) in-
structions.
The Protection Register Clear (PRCLEAR) in-
struction clears the Protec tion Flag to 1. B oth the
Protection Enable (PRE) and Write Enable (W)
signals must be driven High during the i nstruct ion
execution.
Note: A Protection Register Enable (PREN) in-
struction must immediately precede the P rotection
Register Clear (PRCLEAR) instruction.
P rote ction Register Write
The Protection Register Write (PRWRITE) instruc-
tion is used to write an address into t he Protection
Register. This i s the addr ess of the first word to be
protected. After the Protection Register Write
(PRWRITE) instruction has been executed, all
memory locations equal to and above the speci-
fied address are protected from writing.
The Protection Flag bit is set to 0, and can be read
with Protection Register Rea d (P RREAD) instruc-
tion. Both the Protection Enable (PRE) and Write
Enable (W) signals must be driven High during the
instruction execution.
Note: A Protection Register Enable (PREN) in-
struction must immediately precede the P rotection
Register Write (PRWRITE) instruction, but it is not
necessary to execute first a Protection Register
Clear (PRCL EAR).
Protection Regi ster Disable
The Protection Register Disable (PRDS) instruc-
tion sets the One Time Programmable (OTP) bit.
This instruction is a ONE TIME O NLY i nstruction
which latches the Protection Register content, this
content is therefore unalterable in the future. Both
the Protection Enable (PRE) and Write Enable (W)
signals must be driven High during the i nstruct ion
execution. The OTP bi t c annot be di rectly read, it
can be checked by reading the content of t he Pro-
tection Register, using the Protection Register
Read (PRREAD) instruction, then by writing this
same value back into the Protect ion Register, us-