EasyManua.ls Logo

Rabbit 2000 - Program Loading Process Overview; Program Loading Process Details

Rabbit 2000
45 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
6 Rabbit
2000
Microprocessor
program
reaches
address
zero
the
boot
mode
is
disabled
and
instruction
fetching
resumes
at
address
zero.
Wait
states
are
automatically
inserted
during
the
fetching
of
bytes
3,
5
and
7
to
wait
for
the
serial
or
parallel
port
ready.
The
wait
states
continue
indefinitely
until
the
serial
port
is
ready.
This
will
cause
the
processor
to
be
in
the
middle
of
an
instruction
fetch
until
the
next
character
is
ready.
While
the
processor
is
in
this
state
the
chip
select,
but
not
the
out-
put
enable,
will
be
enabled
if
the
memory
mapping
registers
are
such
as
to
normally
enable
the
chip
select
for
the
boot
ROM
address.
The
chip
select
will
stay
low
for
extended
periods
while
the
processor
is
waiting
for
the
serial
or
parallel
port
data
to
be
ready.
Additionally,
the
chip
select
will
go
low
when
a
write
is
performed
to
an
I/O
address
if
the
address
is
such
as
to
enable
that
chip
select
if
it
were
a
write
to
a
memory
address.
3.2
Program
Loading
Process
Overview
On
start
up,
Dynamic
C
first
uses
the
PC’s
DTR
line
on
the
serial
port
to
assert
the
Rabbit
RESET
line
and
put
the
processor
in
cold-boot
mode.
Next,
Dynamic
C
uses
a
four
stage
process
to
load
a
user
program:
1. Load
an
initial
loader
(coldloader)
via
triplets
sent
at
2400
baud
from
the
PC
in
to
a
tar-
get
in
cold-boot
mode.
2. Run
the
initial
loader
and
load
a
secondary
loader
(pilot
BIOS)
at
19200
baud.
3. Run
the
secondary
loader
and
load
the
BIOS
(as
Dynamic
C
compiles
it)
4. Run
the
BIOS
and
load
the
user
program
at
115200
baud
(after
Dynamic
C
compiles
it
to
a
file).
3.3
Program
Loading
Process
Details
When
Dynamic
C
starts,
the
following
sequence
of
events
takes
place:
1. The
serial
port
is
opened
at
with
the
DTR
line
low,
closed,
then
reopened
with
the
DTR
line
high
at
2400
baud.
This
pulses
the
reset
line
on
the
target
low
(the
programming
cable
inverts
the
DTR
line)
and
prepares
the
PC
to
send
triplets.
2. A
group
of
triplets
defined
in
the
file
COLDLOAD.BIN
consisting
of
2
address
bytes
and
a
data
byte
are
sent
to
the
target.
The
first
few
bytes
sent
are
sent
to
I/O
addresses
to
set
the
up
MMU
and
MIU
and
do
system
initialization.
The
MMU
is
set
up
so
that
RAM
is
mapped
to
0x00000,
and
flash
is
mapped
0x80000.
3.
The
remaining
triplets
place
a
small
program
at
memory
location
0x00000.
The
last
triplet
sent
is
0x80,0x24,0x80,
which
tells
the
CPU
to
ignore
the
SMODE
pins
and
start
running
code
at
address
0x00000.
4.
The
PC
now
bumps
the
baud
rate
on
the
serial
port
being
used
to
19200.
5.
The
primary
loader
measures
the
crystal
speed
to
determine
what
divisor
is
needed
to
set
a
baud
rate
of
19200.
The
divisor
is
stored
at
address
0x4002
for
later
use
by
the
BIOS,
and
the
programming
port
is
set
up
to
be
a
19200
baud
serial
port.

Other manuals for Rabbit 2000