亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? sst39vf1601.c

?? SST39VF1601.c sst39vf1601源代碼
?? C
?? 第 1 頁 / 共 3 頁
字號(hào):
/*Software Driver
SST39VF1601/SST39VF1602
16 Mbit Multi-Purpose Flash (MPF+)

June 2003

ABOUT THE SOFTWARE

This application note provides a software driver example for 39VF1601/39VF1602
16 Mbit Multi-Purpose Flash (MPF+) that can be used in any microprocessor based
system.

The SST39VF1601 supports bottom boot block protection, and the SST39VF1602 
supports top boot block protection. The boot block memory area is protected when 
WP# is low and unprotected when WP# is high.

Software driver example routines provided in this document utilize high-level
"C" programming language for broad platform support. In many cases, software 
driver routines can be inserted "as is" into the main body of code being 
developed by the system software developers. Extensive comments are included 
in each routine to describe the function of each routine. The software driver 
routines in "C" can be used with many microprocessors and microcontrollers. 

ABOUT THE SST39VF1601/SST39VF1602

Companion product datasheet for 39VF1601/39VF1602 should be reviewed in 
conjunction with this application note for a complete understanding of the device.

The C code in this document contains the following routines, which are listed
in this order:

Name                    Function
------------------------------------------------------------------
Check_SST_39VF160X      Check manufacturer and device ID
CFI_Query               CFI Query Entry/Exit command sequence
SecID_Query		SecID Query Entry/Exit command sequence
Erase_One_Sector        Erase a sector of 2048 words
Erase_One_Block         Erase a block of 32K words
Erase_Entire_Chip       Erase the contents of the entire chip
Program_One_Word        Alter data in one word
Program_One_Sector      Alter data in 2048-word sector
Program_One_Block       Alter data in 32K-word block
SecID_Lock_Status	Check the Lock Status of Security ID segment
User_SecID_Word_Program Write data into User Security ID Segment
User_SecID_Lock_Out 	Lock out the User Security ID Segment
Erase_Suspend		Suspend Sector/Block Erase operation
Erase_Resume		Resume Sector/Block Erase operation
Check_Toggle_Ready      End of internal program or erase detection using
                        Toggle bit
Check_Data_Polling      End of internal program or erase detection using
                        Data# polling

"C" LANGUAGE DRIVERS*/
 
/***********************************************************************/
/* Copyright Silicon Storage Technology, Inc. (SST), 1994-2003         */
/* Example "C" language Driver of 39VF160X 16 Mbit MPF+ Device	       */
/* Nelson Wang, Silicon Storage Technology, Inc.                       */
/*                                                                     */
/* Revision 1.0, June 19, 2003                                         */
/*                                                                     */
/* This file requires these external "timing"  routines:               */
/*                                                                     */
/*      1.)  Delay_10_Micro_Seconds                                    */
/*      2.)  Delay_20_Micro_Seconds                                    */
/*      3.)  Delay_150_Nano_Seconds                                    */
/*      4.)  Delay_25_Milli_Seconds                                    */
/*      5.)  Delay_50_Milli_Seconds                                    */
/***********************************************************************/

#define FALSE                   0
#define TRUE                    1

#define SECTOR_SIZE             2048    // Must be 2048 words for 39VF160X
#define BLOCK_SIZE              32768   // Must be 32K words for 39VF160X

#define SST_ID                  0x00BF  // SST Manufacturer's ID code
#define SST_39VF1601            0x234B  // SST39VF1601 device code
#define SST_39VF1602            0x234A  // SST39VF1602 device code

typedef unsigned char           BYTE;     // BYTE is 8-bit in length
typedef unsigned int            WORD;     // WORD is 16-bit in length
typedef unsigned long int       Uint32;   // Uint32 is 32-bit in length

Uint32 system_base = 0xC0000000;  // 4GByte System Memory Address.
	// This sample code uses 0xC0000000 as the system_base address.
   	// The user should modify this address accordingly.

#define sysAddress(offset) ((volatile WORD *)(system_base + offset))

#define MAX_TIMEOUT	0x07FFFFFF   // A ceiling constant used by Check_Toggle_
	// Ready() and Check_Data_Polling().
      	// The user should modify this constant accordingly.

// --------------------------------------------------------------------
//                       EXTERNAL ROUTINES
// --------------------------------------------------------------------
extern void     Delay_10_Micro_Seconds();
extern void     Delay_20_Micro_Seconds();
extern void     Delay_150_Nano_Seconds();
extern void     Delay_25_Milli_Seconds();
extern void     Delay_50_Milli_Seconds();
// --------------------------------------------------------------------

int Check_SST_39VF160X(void);
void CFI_Query(WORD*);
void SecID_Query(WORD*, WORD*);
int Erase_One_Sector(Uint32);
int Erase_One_Block (Uint32);
void Erase_Entire_Chip(void);
int Program_One_Word (WORD*, Uint32);
int Program_One_Sector (WORD*, Uint32);
int Program_One_Block (WORD *Src, Uint32 Dst);
int SecID_Lock_Status(void);
int User_SecID_Word_Program (WORD*, WORD*, int);
void User_SecID_Lock_Out (void);
void Erase_Suspend (void);
void Erase_Resume (void);
int Check_Toggle_Ready (Uint32);
int Check_Data_Polling (Uint32, WORD);


/************************************************************************/
/* PROCEDURE:   Check_SST_39VF160X                                      */
/*                                                                      */
/* This procedure decides whether a physical hardware device has a      */
/* SST39VF160X 16 Mbit MPF+ Device installed or not.         		*/
/*                                                                      */
/* Input:                                                               */
/*          None                                                        */
/*                                                                      */
/* Output:                                                              */
/*          return TRUE:  indicates a SST39VF160X                       */
/*          return FALSE: indicates not a SST39VF160X                   */
/************************************************************************/
int Check_SST_39VF160X(void)
{
    WORD SST_id1;
    WORD SST_id2;
    int  ReturnStatus;

    //  Issue the Software Product ID code to 39VF160X
    *sysAddress(0x5555) = 0x00AA;  // write data 0x00AA to device addr 0x5555
    *sysAddress(0x2AAA) = 0x0055;  // write data 0x0055 to device addr 0x2AAA
    *sysAddress(0x5555) = 0x0090;  // write data 0x0090 to device addr 0x5555
    Delay_150_Nano_Seconds();   // Tida Max 150ns for 39VF160X

    // Read the product ID from 39VF160X
    SST_id1  = *sysAddress(0x0000);   // get first ID byte
    SST_id2  = *sysAddress(0x0001);   // get second ID byte

    // ------------------------------------------------------------
    // Determine whether there is a SST 39VF1601 installed or not
    // use the following code:

    if ((SST_id1 == SST_ID) && (SST_id2 == SST_39VF1601))
            ReturnStatus = TRUE;
    else
            ReturnStatus = FALSE;
    // ------------------------------------------------------------
    // Or determine whether there is a SST 39VF1602 installed or not
    // use the following code:
     
    if ((SST_id1 == SST_ID) && (SST_id2 == SST_39VF1602))
            ReturnStatus = TRUE;
    else
            ReturnStatus = FALSE;
    // ------------------------------------------------------------

    // Issue the Software Product ID Exit code, thus returning the
    // 39VF160X to the normal operation.
    *sysAddress(0x5555) = 0x00AA;  // write data 0x00AA to device addr 0x5555
    *sysAddress(0x2AAA) = 0x0055;  // write data 0x0055 to device addr 0x2AAA
    *sysAddress(0x5555) = 0x00F0;  // write data 0x00F0 to device addr 0x5555
    Delay_150_Nano_Seconds();   // Tida Max 150ns for 39VF160X
                                    
    return (ReturnStatus);
}


/************************************************************************/
/* PROCEDURE:   CFI_Query                                               */
/*                                                                      */
/* This procedure should be used to query for CFI information           */
/*                                                                      */
/* Input:                                                               */
/*          Src	Source address to store CFI_Query data string		*/
/*                                                                      */
/* Output:                                                              */
/*          None                                                        */
/************************************************************************/
void CFI_Query(WORD *Src)
{ 
    //  Issue the CFI Query entry code to 39VF160X
    *sysAddress(0x5555) = 0x00AA;  // write data 0x00AA to device addr 0x5555
    *sysAddress(0x2AAA) = 0x0055;  // write data 0x0055 to device addr 0x2AAA
    *sysAddress(0x5555) = 0x0098;  // write data 0x0098 to device addr 0x5555
    Delay_150_Nano_Seconds();     // insert delay time = Tida

    // ----------------------------------------------------------
    //  Perform all CFI operations here:
    //  CFI_Query_address is from 0010H--0034H

    for (WORD index = 0x0010; index <= 0x0034; index++)
    {
     	 *Src = *sysAddress(index);
         ++Src;
	// CFI query data is stored in user-defined memory space.
    }
    // ----------------------------------------------------------

        // Issue the CFI Exit code thus returning the 39VF160X
        // to the read operating mode

    *sysAddress(0x5555) = 0x00AA;  // write data 0x00AA to device addr 0x5555
    *sysAddress(0x2AAA) = 0x0055;  // write data 0x0055 to device addr 0x2AAA
    *sysAddress(0x5555) = 0x00F0;  // write data 0x00F0 to device addr 0x5555
    Delay_150_Nano_Seconds();     // insert delay time = Tida
}


/************************************************************************/
/* PROCEDURE:   SecID_Query                                             */
/*                                                                      */
/* This procedure should be used to query for Security ID information.  */
/*                                                                      */
/* Input:                                                               */
/*          SST_SecID	Source address to store SST SecID string	*/
/*          User_SecID	Source address to store User SecID string	*/
/*                                                                      */
/* Output:                                                              */
/*          None                                                        */
/************************************************************************/
void SecID_Query(WORD *SST_SecID, WORD *User_SecID)
{
         //  Issue the SecID Entry code to 39VF160X
    *sysAddress(0x5555) = 0x00AA;  // write data 0x00AA to device addr 0x5555

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲在线中文字幕| 亚洲国产wwwccc36天堂| 亚洲免费伊人电影| 欧美二区在线观看| 国产老女人精品毛片久久| 18欧美亚洲精品| 精品蜜桃在线看| 91在线观看美女| 日韩精品电影在线| 国产亚洲自拍一区| 在线成人av影院| 国产成人精品在线看| 亚洲免费观看高清完整版在线 | 久久影院午夜论| 国产99久久久久久免费看农村| 午夜精品国产更新| 亚洲国产精品v| 欧美一区二区三区视频免费播放 | 欧美精品一级二级三级| 久久国产乱子精品免费女| 国产女人18毛片水真多成人如厕| 欧美精品乱码久久久久久按摩 | 日韩高清不卡在线| 国产精品伦理在线| 欧美xxx久久| 在线精品视频一区二区| 免费观看日韩电影| 亚洲伊人色欲综合网| 久久精品视频在线看| 日韩欧美一区在线| 国产iv一区二区三区| 亚洲成人免费看| 国产午夜精品久久久久久久| 91精品久久久久久久久99蜜臂| 色狠狠av一区二区三区| www.av亚洲| 99视频一区二区| 国产综合久久久久影院| 日本在线不卡一区| 国产精品的网站| 中文字幕一区二区三区不卡在线| 久久婷婷久久一区二区三区| 在线不卡欧美精品一区二区三区| 成人精品免费视频| 99视频一区二区三区| 丰满亚洲少妇av| 国产精品一级在线| 国产成人亚洲综合a∨婷婷| 麻豆91精品视频| 日韩高清不卡一区二区| 亚洲一本大道在线| 国产精品区一区二区三| 国产欧美日韩综合精品一区二区 | 欧美疯狂做受xxxx富婆| 欧美三级资源在线| 91麻豆精品国产| 欧美一区二区三区的| 欧美丰满高潮xxxx喷水动漫| 91视视频在线观看入口直接观看www | 成人黄色在线看| 成人午夜精品在线| 精品一区二区三区av| 国产一区欧美二区| 国产乱妇无码大片在线观看| 国产盗摄精品一区二区三区在线| 国产一区二区精品久久91| 美女一区二区三区在线观看| 一区二区三区四区蜜桃| 日韩成人精品在线观看| 久久精品国产一区二区三| 另类成人小视频在线| 国产一区二区按摩在线观看| 国产精品66部| 成人app网站| 91国偷自产一区二区开放时间| 欧美精三区欧美精三区| 欧美一区二区私人影院日本| 欧美本精品男人aⅴ天堂| 久久久国产一区二区三区四区小说| 久久久久久久久久久久久夜| 国产三级三级三级精品8ⅰ区| 亚洲在线观看免费视频| 日韩高清不卡在线| 成人污污视频在线观看| 欧美色图12p| 日本一区二区三区dvd视频在线| 亚洲在线观看免费视频| 国产一区二区不卡在线| 欧美色视频一区| 国产午夜精品一区二区| 午夜精品一区二区三区三上悠亚| 九九精品视频在线看| 91久久精品一区二区二区| 精品日韩欧美在线| 一区二区高清在线| 国产精品一卡二| 欧美另类高清zo欧美| 中文字幕五月欧美| 免费成人在线播放| 在线观看欧美黄色| 国产欧美一区二区三区在线老狼| 亚洲444eee在线观看| 国产成人av网站| 欧美一区二区视频观看视频 | 日精品一区二区| heyzo一本久久综合| 精品久久久久久久久久久久包黑料 | 国产成人av电影| 欧美一区中文字幕| 国产精品小仙女| 欧美精品丝袜久久久中文字幕| 国产日韩精品一区二区浪潮av | 中文字幕不卡在线观看| 免费看欧美女人艹b| 在线观看91视频| 亚洲日本成人在线观看| 国产成人综合自拍| 欧美大片在线观看一区| 天堂成人免费av电影一区| 在线观看日韩av先锋影音电影院| 国产亚洲精品aa| 黄一区二区三区| 欧美一级二级三级乱码| 午夜不卡av免费| 欧美日韩亚州综合| 亚洲一区二区三区四区五区中文 | 欧美日韩1区2区| 一区二区三区在线视频免费| www.亚洲色图.com| 国产精品久久久爽爽爽麻豆色哟哟| 国产成人丝袜美腿| 久久久电影一区二区三区| 久久草av在线| 日韩美女视频在线| 亚洲电影在线免费观看| 91麻豆精东视频| 夜夜精品视频一区二区| 99精品欧美一区二区蜜桃免费 | www.成人在线| 欧美激情综合五月色丁香小说| 国产精品一区二区在线播放| 久久伊99综合婷婷久久伊| 精品一区二区精品| 精品国产a毛片| 国产美女娇喘av呻吟久久| 日韩精品一区二区在线观看| 紧缚奴在线一区二区三区| 精品精品国产高清一毛片一天堂| 久久er精品视频| 精品国产成人系列| 国产一本一道久久香蕉| 久久久久9999亚洲精品| 成人短视频下载| 亚洲欧美国产77777| 日本韩国欧美三级| 天天色综合天天| 精品国产不卡一区二区三区| 成人中文字幕在线| 亚洲日本一区二区| 欧美日韩视频专区在线播放| 久久av中文字幕片| 久久久777精品电影网影网| 成人免费看黄yyy456| 一区二区不卡在线视频 午夜欧美不卡在 | 午夜欧美电影在线观看| 欧美一区午夜视频在线观看 | 国模套图日韩精品一区二区| 国产欧美精品一区aⅴ影院| 99re6这里只有精品视频在线观看| 亚洲精品高清在线| 欧美一区二区三区四区视频| 国产乱色国产精品免费视频| 亚洲啪啪综合av一区二区三区| 欧美撒尿777hd撒尿| 美女视频黄久久| 中文字幕在线一区| 在线综合亚洲欧美在线视频| 国产精品 欧美精品| 亚洲一区二区欧美日韩| 精品国产免费一区二区三区四区 | 日韩免费看网站| av亚洲产国偷v产偷v自拍| 亚洲午夜在线电影| 91精品在线一区二区| 成人一二三区视频| 日韩精品高清不卡| 亚洲色图欧美在线| 精品国产1区2区3区| 91福利国产成人精品照片| 九九热在线视频观看这里只有精品| 日韩影视精彩在线| 国产午夜精品一区二区三区四区 | 国产精品色在线| 91精品国产手机| 99久久精品国产一区二区三区| 免费日韩伦理电影| 一区二区三区日韩欧美精品 | 亚洲丝袜精品丝袜在线| 亚洲精品一区二区在线观看| 欧美午夜精品久久久|