M93S66, M93S56, M93S46
12/32
WRITE PROTECTION AND THE PROTECTION REGISTER
The Protection Register on the M93Sx6 is used to
adjust the amount of me mory that is to be write
protected. The write protected are a extends from
the address given in the Protection Register, up to
the top address in the M93Sx6 device.
Two flag bi ts are used to indicate the Protection
Register status:
– Protection Flag: this is used to enable/disable
protection of the write-protected area of the
M93Sx6 memory
– OTP bit: when set, this disables access to t he
Protection Register, and thus prev ents any further modifications to the value in the Protec tion
Register.
The lower-bound memory address is written to the
Protection Register using the Protection Register
Write (PRWRITE) instruction. It can be read using
the Protection Register Read (PRREAD) instruction.
The Protection Register Enable (PREN) instruction must be executed before any PRCLEAR,
PRWRITE or PRDS instruction, and with appropriate levels applied to the Protection Enable (PRE)
and Write Enable (W) signals.
Write-access to the Protection Register is
achieved by executing the following sequence:
– Execute the Write Enable (WEN) instruction
– Execute the Protection Register Enable (PREN)
instruction
– Execute one PRWRITE, PRCLEAR or PRDS
instructions, to set a new boundary address in
the Protection Register, to clear the protection
address (to all 1s), or permanently to freeze the
value held in the Protection Register.
Protection Register Read
The Protection Re gister Rea d (PRRE AD) instruction outputs, on Serial Data Output (Q), the content of the Protection Register, followed by the
Protection Flag bit. The Protection Enabl e (PRE)
signal must be driven High before and during the
instruction.
As with the Read Data from Memory (READ) instruction, a dummy 0 bit is output first. Since it is
not possible to distinguish between the Protec tion
Register being cleared (all 1s) or having been written with all 1s, the user must check the Protection
Flag status (and no t the Protection Regist er content) to ascertain the setting of the memory protection.
Protection Register Enable
The Protection Register Enable (PREN) instruction is used to authorize the use of instructions that
modify the Protection Register (PRWRITE,
PRCLEAR, PRDS). The P rotection Register En-
able (PREN) instruction does not modify the Protection 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 Write Enable (W) signals must be driven High during the instruction execution.
Protection Register Clear
The Protection Register Clear (PRCLEAR) instruction clears the address stored in the Protection Register to all 1s, so that none of the memory
is write-protected by the Protection Register. However, it should be noted that all the memory remains protected, in the normal way, using the
Write Enable (WEN) and Write Disable (WDS) instructions.
The Protection Register Clear (PRCLEAR) instruction clears t he Protection F lag to 1. Both t he
Protection Enable (PRE) and Write Enable (W)
signals must be driven High during t he i nstruction
execution.
Note: A Protection Register Enable (PREN) instruction must immediately precede the Protection
Register Clear (PRCLEAR) instruction.
Protectio n Register Write
The Protection Register Write (PRWRITE) instruction is used to write an address into the Protection
Register. This is the address of the f ir st word t o be
protected. After the Protection Register Write
(PRWRITE) instruction has been executed, all
memory locations equal to and above the specified address are protected from writing.
The Protection Flag bit is set to 0, and can be read
with Protection Register Read (PRREAD) instruction. Both the Protection Enable (PRE) and Write
Enable (W) signals must be driven High during the
instruction execution.
Note: A Protection Register Enable (PREN) instruction must immediately precede the Protection
Register Write (PRWRITE) instruction, but it is not
necessary to execute first a Protection Register
Clear (PRCLEAR).
Protection Register Disable
The Protection Register Disable (PRDS) instruction sets the One Tim e Programmable (OTP ) bit.
This instructio n is a ONE TIME O NLY i nstruct ion
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 t he i nstruction
execution. The OTP bit can not be di rectly read, it
can be checked by reading the content of the Protection Register, using the Protection Register
Read (PRREAD) instruction, then by writing this
same value back into the Protection Regist er, us-