EasyManua.ls Logo

Rabbit 2000 - Page 39

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...
Designer’s
Handbook 37
with
it.
You
will
probably
be
required
to
copy
the
function
from
flash
to
a
RAM
buffer
in
the
flash
initialization
sequence.
The
field
writeMode
specifies
the
method
that
particular
flash
device
uses
to
write
data.
Currently,
only
two
common
modes
are
defined:
“sector-writing”
mode,
as
used
by
the
SST
SST29
and
Atmel
AT2 9
series
(writeMode=1);
and
“byte-writing”
mode,
as
used
by
the
Mosel/Vitelic
V29
series
(writeMode=2).
All
other
values
of
writeMode
are
currently
undefined,
although
they
may
be
defined
by
Z-World
as
new
flash
devices
are
used.
The
required
actions
of
these
functions
are
listed
below:
_InitFlashDriver
This
function
is
called
from
the
BIOS.
A
bitmap
of
quadrants
mapped
to
flash
(0x01,
0x02,
0x04,
0x08
correspond
to
the
1st-4th
quadrants)
is
passed
to
it
in
HL.
This
func-
tion
needs
to
perform
the
following
actions:
1. Load
_FlashInfo.XPC
with
the
proper
XPC
value
to
access
flash
memory
address
00000h
via
XMEM
address
E000h.
The
quadrant
num-
ber
for
the
start
of
flash
memory
is
passed
to
the
function
in
HL
and
can
be
used
to
determine
the
XPC
value,
if
desired.
For
example,
if
your
flash
is
located
in
memory
quadrant
2
then
the
physical
address
of
the
first
flash
memory
location
is
80000h.
80000h - E000h = 72000h,
so
the
value
placed
into _FlashInfo.XPC should
be
72h.
3. Load
_FlashInfo.sectorSize
with
the
flash
sector
size
in
bytes.
4. Load
_FlashInfo.numSectors
with
the
number
of
sectors
on
the
flash.
5. _FlashInfo.writeFlashPtr
should
be
loaded
with
the
memory
location
in
RAM
of
the
function
that
will
perform
that
action.
The
function
will
need
to
be
copied
from
flash
to
RAM
at
this
time
as
well.
The
eraseChipPtr
point
should
be
loaded
as
well
with
the
address
of
the
appropriate
function
(also
in
RAM).
6. This
function
should
return
zero
if
successful,
or
-1
if
an
error
occurs.

Other manuals for Rabbit 2000