![background image](http://html1.mh-extra.com/html/rabbit/2000/2000_designers-handbook_3112103026.webp)
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.
Содержание 2000
Страница 1: ...Rabbit 2000 Microprocessor Designers Handbook Revision C...
Страница 4: ...Rabbit 2000 Microprocessor...
Страница 6: ...2 Rabbit 2000 Microprocesssor...
Страница 12: ...8 Rabbit 2000 Microprocessor...
Страница 34: ...344 Dynamic C User s Manual...
Страница 36: ...34 Rabbit 2000 Microprocessor...
Страница 44: ...42 Rabbit 2000 Microprocessor...