
SDK Programming Guide Version 1.511
ABLELink
R
Ethernet-Serial Server MAXI Series
Example:
Erase A000:0000 ~ B000:FFFF.
ushort ret
;
ret = EraseSector(2);
if ( ret ) {
// fatal error found !!!
:
}
else {
// OK !!!
:
}
Remarks:
This function is used to erase one sector (
64K
bytes) of flash memory.
ProgOneByte()
Description:
Write one byte into flash memory.
Include:
DAPAPI.H
Usage:
ushort ProgOneByte ( uchar
data,
uchar *
addr
)
data
byte value being written into flash memory
Input Parameters:
addr
address of flash memory.
Note:
1.
The segment value of the address must be 64k boundary
,
it means that the legal segment value is 0x8000
、
0x9000....or
0xD000. For GW21x-MAXI, only 0xC000 and 0xD000 are
available. For example: the address D000:F000 is correct but
DF00:0 is error.
2. All addresses in flash memory can be written only one
times. If you want to write the second times, you must call
EraseSector()
function to erase the sector:64K and then
write the data.
Return Value:
0 successful
1 others
error
Copyright © 2004 Atop Technologies, Inc.
All rights reserved. Designed in Taiwan.