2 password-protected access, 1 entering password, Maxq family user’s guide – Maxim Integrated MAXQ Family User Manual
Page 177

17.2 Password-Protected Access
Some applications require preventative measures to protect against simple access and viewing of program code memory. To address
this need for code protection, any MAXQ microcontroller equipped with a Utility ROM that permits in-system programming, in-appli-
cation programming, or in-circuit debugging grants full access to those utilities only after a password has been supplied. The pass-
word is defined as the 16 words of physical program memory at addresses x0010h to x001Fh. Note that using these memory locations
as a password does not exclude their usage for general code space if a unique password is not needed.
A single Password Lock bit (PWL) is implemented in the SC register. When the PWL is set to 1, a password is required to access the
in-circuit debug and in-system programming ROM routines that allow reading or writing of internal memory. When PWL is cleared to 0,
these utilities are fully accessible through the Utility ROM without a password.
The PWL bit defaults to 1 by a power-on reset. To access the ROM utilities, a correct password is needed; otherwise access to the
ROM utilities is denied. Once the correct password has been supplied by the user, the ROM clears the password lock. The PWL
remains clear until one of the following occurs:
• a power-on reset, or
• set to logic 1 by user software.
For devices with ROM program memory, the end user supplies the ROM code, thus the user always knows the password if needed. It
is expected that the password will rarely be needed since the utility of memory programming and/or in-circuit debug to the end user
will be minimal once the decision has been made to freeze the code in program ROM.
For devices with reprogrammable nonvolatile memory, the password is always known for a fully erased device since the unprogrammed
state of these memories will be fixed. Once the memory has been programmed, a password is established and can be used for access
protection. The Utility ROM code denies access to the protected routines when PWL indicates a locked state.
17.2.1 Entering Password
A password can be entered in one of two ways:
• Via the in-system programming interface established by the PSS1:PSS0 bits when SPE bit is set to logic 1; the ROM Bootstrap Loader
dictates the protocol for entering the password over the specified serial communication interface
• Via the TAP interface directly by issuing the Unlock Password debug mode command. The Unlock Password command requires 32
follow-on transfer cycles each containing a byte value to be compared with the program memory password.
17-3
MAXQ Family User’s Guide
Maxim Integrated