28
Rabbit 4000 Microprocessor User’s Manual
If either of the SMODE pins is high, the processor will enter the bootstrap mode and
accept triplets from either Serial Port A or the slave port. It is good practice to place
pulldown resistors on the SMODE pins to ensure proper operation of your design.
In bootstrap mode, the processor inhibits the normal memory fetch from /CS0 and instead
fetches instructions from a small internal boot ROM. This program reads triplets of three
bytes from the selected peripheral. The first byte is the most-significant byte of a 16-bit
address, the second byte is the least-significant byte of the address, and the third byte is
the data to be written. If the uppermost bit of the address is 1, then the address is assumed
to be an internal register address instead of a memory address, and the data are written to
the appropriate register instead.
The boot ROM program waits for data to be available; each byte received automatically
resets the watchdog timer with a 2-second timeout. Bytes must be received quickly
enough to prevent timeout (or the watchdog must be disabled).
The device checks the state of the SMODE pins each time it jumps back to the start of the
ROM program and responds according to the current state. In addition, by writing to bit 7
of the Slave Port Control Register (SPCR) the processor can be told to ignore the state of
the SMODE pins and continue normal operation.
Note that the processor can be told to reenter bootstrap mode at any time by setting bit 7 of
SPCR low; once this occurs and the least-significant four bits of the current PC address
are zero, the processor will sample the state of the SMODE pins and respond accordingly.
This feature allows in-line downloading from the selected bootstrap port; once the down-
load is complete, bit 7 of SPCR can be set high and the processor will continue operating
from where it left off.
As a security feature, any attempt to enter bootstrap mode from either the SMODE pins or
by writing to bit 7 of SPCR will erase the data stored in the onchip-encryption RAM. This
prevents loading a small program in memory to read out the data.
Table 3-2. SMODE Pin Settings
SMODE Pins [1,0]
Operation
00
No bootstrap; code is fetched from address 0x0000
on /CS0, /OE0.
01
Bootstrap from the slave port.
10
Bootstrap from Serial Port A, clocked mode.
11
Bootstrap from Serial Port A, asynchronous mode.