EasyManua.ls Logo

Rabbit 2000 - Access; Reading the ID Block

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...
24 Rabbit
2000
Microprocessor
int idBlockCRC; // CRC of this block (when this
// field is set to zero)
char marker[6]; // should be 0x55 0xAA 0x55 0xAA
// 0x55 0xAA
} SysIDBlock;
6.2
Access
The
BIOS
will
read
the
system
ID
block
during
startup,
so
all
a
user
needs
to
do
is
access
the
system
ID
block
struct
in
memory.
If
the
user
desires
to
read
the
ID
block
off
the
flash,
the
following
function
(from
IDBLOCK.LIB)
should
be
called:
int _readIDBlock(int flash_bitmap)
DESCRIPTION:
Attempts
to
read
the
system
ID
block
from
the
highest
flash
quadrant
and
save
it
in
the
system
ID
block
structure.
It
performs
a
CRC
check
on
the
block
to
verify
that
the
block
is
valid.
If
an
error
occurs,
SysIDBlock.tableVersion
is
set
to
zero.
PARAMETER
flash_bitmap
Bitmap
of
memory
quadrants
mapped
to
flash.
Examples:
0x01
=
quadrant
0
only
0x03
=
quadrants
0
and
1
0x0C
=
quadrants
2
and
3
RETURN
VALUE:
0
if
successful
-1
if
error
reading
from
flash
2
if
ID
block
missing
3
if
ID
block
invalid
(failed
CRC
check)
The
WriteFlash()
function
does
not
allow
writing
to
the
ID
block.
Users
should
nor-
mally
not
desire
to
write
to
the
ID
block,
but
a
library
that
contains
a
high-level
function
that
will
write
an
ID
block
can
be
provided
if
a
customer
needs
it.
If
the
BIOS
does
not
find
an
ID
block,
it
sets
all
parameters
in
SysIDBlock
to
zero.
6.3
Reading
the
ID
block
The
following
sequence
of
events
can
be
used
to
determine
if
an
ID
block
is
present:
1. The
top
16
bytes
of
the
flash
device
are
read
(the
first
two
quadrants
are
mapped
to
flash,
so
16
bytes
starting
at
address
0x7FFF0
will
be
read)
into
a
local
buffer.
If
the
flash
is
smaller
than
512K,
it
doesn’t
matter
because
0x7FFF0
will
still
represent
the
start
of
the
highest
16
bytes.

Other manuals for Rabbit 2000