![](https://pdfstore-manualsonline.prod.a.ki/pdfasset/4/44/44414c02-d064-4424-ae12-8acc58561d02/44414c02-d064-4424-ae12-8acc58561d02-bg7f.png)
iVIEW-100 Series user’s Manual, 2006, v2.0 ----- 127
A.2.5 Type 5: Flash Memory
Function Description
FlashReadId Get the information about FLASH.
FlashErase ERASE one sector of flash.
FlashWrite Write one byte data to FLASH.
FlashRead
Read one byte data from FLASH.
……more……
There are more user function for Flash Memory
please refer to Appendix C iVIEW.h and CD\
Napdos\7188\miniOS7 \manual\
information.
The size of the Flash Memory used on iVIEW-100 series is 512K bytes. MiniOs7
will use the last 64K bytes, and others are used to store user's program or data.
User's program can use functions to write data to Flash Memory. When writes
data to Flash Memory, user only can write from "1" to "0", can not write data from
"0" to "1". So, before write data to FLASH, erase it first. The erase process will
make all data to 0xFF, that is all data bit is "1". Then can write data to it.
The function FlashErase() is used to erase the FLASH, every time one sector
(64K bytes).
FlashReadId()
Func.: Get the information about FLASH.
Syntax:
int FlashReadId(void);
Header: #include ”iVIEW.h”
Description:
Read Flash memory device code(high byte) and manufacture code(low byte).
Return Value: 0xA4C2 (MXIC 29f040), 0xA401 (AMD 29f040)
Example: Please refer to “demo\flash\flash.c” for detail information.
FlashErase()
Func.: ERASE one sector of flash.
Syntax:
int FlashErase(unsigned seg);
Header: #include ”iVIEW.h”
Description:
Erase one sector (64K bytes) of Flash Memory, all data
become 0xFF.
seg: 0x8000, 0x9000, 0xA000, 0xB000, 0xC000, 0xD000 or 0xE000.
Return Value: On success return NoError(0). On fail return TimeOut(-5).
Note:
the segment 0xF000 is used for MiniOs7, if seg=0xF000 FlashErase
will do nothing.
Example: Please refer to “demo\flash\flash.c” for detail information.