MOTOROLA
3-20
CONFIGURATION AND MODES OF OPERATION
M68HC11
REFERENCE MANUAL
mal mode and special test operation of the board. In fact, after a reset in special test
mode, software can change to normal expanded mode, and the reset and interrupt
vectors are still available in the external EPROM. If the internal 8 Kbyte ROM has a
useful program in it (and internal ROM is enabled), the external EPROM can be used
for additional program memory. Of course, when the CPU reads an internal ROM ad-
dress, it sees valid internal ROM data even though the external data bus has data from
the external EPROM. As long as the IRV function is not enabled, there is no conflict
between the internal 8 Kbytes ROM and the external EPROM.
In Example 3–1, the program shown in
Figure 3-3
is programmed into the external
2764-type EPROM. When the board is turned on, this small program reads the eight-
part switch that is wired to the port E pins. If the CONFIG register is different, it is re-
programmed to match the switches. Because the EEPROM is subject to wear-out (af-
ter thousands of write-erase cycles), it should not be erased and reprogrammed
unless it is incorrect. Since this program is intended to be very simple, it does not
check to see if the change was successful.
This program could be modified to include the ability to check the results. The security
feature offers some challenges. For example, if security mode is being enabled, it is
not possible to verify the CONFIG value in this setup. A reset is required to get the
CONFIG value transferred into the readable working register, and the part can only be
reset in single-chip modes after security is enabled. If the secured part is reset while
MODB is low, it comes up in special bootstrap mode (MODA pin is ignored due to se-
curity). When reset in bootstrap mode, the EEPROM and CONFIG register are auto-
matically erased, which is self-defeating. Presumably, a user has a meaningful
program in internal ROM before the security bit is finally enabled, which provides for
orderly program execution in normal single-chip mode. The user then verifies that se-
curity is enabled by a checking function in that internal software. Another way to check
for security is to attempt to reset the part in normal expanded mode. If security is not
enabled, the AS/STRA pin acts as an address strobe that clocks at the E-clock fre-
quency even while RESET is still low (part does not have to be out of reset to check
for security). If security is not activated, the AS/STRA pin acts as the strobe A high-
impedance input.