![background image](http://html1.mh-extra.com/html/rabbit/2000/2000_designers-handbook_3112103039.webp)
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 AT29 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.
Содержание 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...