
M68HC11
REFERENCE MANUAL
CONFIGURATION AND MODES OF OPERATION
MOTOROLA
3-17
so the port D outputs (especially PD1/TxD) would operate as open-drain outputs dur-
ing the download. This DWOM bit must be written back to zero if the user wants any
port D pins to act as push-pull outputs.
Because the bootstrap mode is a special mode, test-related functions are enabled.
The DISR control bit is a one, which disables the COP watchdog and clock monitor
functions. As long as the SMOD control bit is a one, all reset and interrupt vectors are
located in $BFC0–$BFFF rather than $FFxx. A user’s program may have to change
some of these control bits.
Special attention should be paid to the circuitry connected to the PD1/TxD pin if the
bootstrap mode variation is used. Since the bootloader firmware enables the SCI
transmitter, the PD1 pin is forced to operate as an output. To minimize limitations on
external circuitry on the PD1 pin, port D is also configured for wired-OR operation to
make it look like an open-collector-type output during downloading. Most users will use
the PD1/TxD pin as a serial data output line; therefore, no conflict will occur between
the bootstrap use of PD1 and the user’s use of this pin. If the application uses the PD1
pin as an input to detect a switch or contact closure, there is still no conflict, although
the user could not use the verify feature of the bootloader program if the PD1 pin hap-
pened to be driven low during the download.
A downloaded program can jump back to the beginning of the bootstrap ROM, causing
a new program segment to be serially downloaded. The downloaded program might
also contain a routine to read information into the MCU over the SPI interface or from
a parallel I/O port. The loaded program can even turn on the multiplexed expansion
bus to gain access to external memory or peripheral devices. Users are limited only
by their imagination.
3.5.4.3 Using Interrupts in Bootstrap Mode
The reset and interrupt vectors for the bootstrap mode are located in the bootstrap
ROM at $BFC0–$BFFF. Although this ROM is mask programmed, it is impossible to
know in advance where a user’s service routines will be located. To allow users to use
their own service-routine addresses, a system of pseudo-vectors is included for boot-
strap mode. Specific RAM addresses are coded in the actual vector locations of the
bootstrap ROM (see
Table 3-3
). These RAM locations are called pseudo-vectors be-
cause they can be used like vectors to direct control to interrupt service routines. Each
pseudo-vector is allowed three bytes of space, rather than the two bytes for normal
vectors, because an explicit jump (JMP) opcode is needed to cause the desired jump
to the user’s service-routine address. For example, to use the SWI, a jump instruction
to the user’s SWI service routine would be placed in RAM at addresses $00F4, $00F5,
and $00F6. When an SWI request is encountered, the registers are stacked, and the
vector in the bootstrap ROM passes control to $00F4, which, in turn, contains a jump
instruction to the user’s SWI service routine.