⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 device.h

📁 intel strata flash TE28Fxx系列的源代码 nor flash
💻 H
📖 第 1 页 / 共 2 页
字号:
#define DEVICE_PROGRAM_FLASH_BUFFERED TRUE
#define DEVICE_PROGRAM_PROTECTION     TRUE
#define DEVICE_PROGRAM_SUSPEND        TRUE
#define DEVICE_READ_BLOCK_STATUS      TRUE
#define DEVICE_READ_PROTECTION        TRUE
#define DEVICE_RESUME                 TRUE
#define DEVICE_UNLOCK_ALL_BLOCKS      TRUE 

/* set compile flags to identify functions which are NOT 
   implemented as device specific (i.e. will use the 
   common.c functions for these functions */

#define DEVICE_CLEAR_STATUS           FALSE
#define DEVICE_ERASE_BLOCK            FALSE
#define DEVICE_GET_QUERY_ADDRESS      FALSE
#define DEVICE_LOCK_DOWN_BLOCK        FALSE 
#define DEVICE_PROGRAM_FLASH          FALSE
#define DEVICE_QUERY                  FALSE
#define DEVICE_READ_DEVICE_ID         FALSE
#define DEVICE_READF                  FALSE
#define DEVICE_READ_FLASH             FALSE
#define DEVICE_READ_STATUS            FALSE
#define DEVICE_SEC_EXTENDED_QUERY     FALSE
#define DEVICE_UNLOCK_BLOCK           FALSE 
#define DEVICE_WAIT_UNTIL_READY       FALSE
#define DEVICE_WRITEF                 FALSE

/* TRUE means client will implement this function external to the template */
#define CLIENT_GET_FPTR               TRUE 

/* little endian */
#define BIG_ENDIAN_ARCHITECTURE       FALSE

/* set 1 and Only 1 configuration to TRUE */
#define X_8                           FALSE
#define PX_16                         FALSE
#define X_16                          TRUE
#define X_32                          FALSE
#define ILX_32                        FALSE

/* set 1 and only 1 size to TRUE */
#define J3_32_M                       FALSE
#define J3_64_M                       FALSE
#define J3_128_M                      TRUE

/* ERASE_TIMEOUT_CYCLES = # of times to check for status ready after erase
  commands are issued to the device */
#define TMPL_ERASE_TIMEOUT            2000000L  

/* PROGRAM_TIMEOUT_CYCLES = # of times to check for status ready after 
   program commands are issued to the device */
#define TMPL_PROGRAM_TIMEOUT          1000000L

#define TMPL_BLOCKSTAT_UNLOCKED       0x0
#define TMPL_BLOCKSTAT_LOCKED         0x1
#define TMPL_BLOCKSTAT_LOCKEDDOWN     0x3

#define TMPL_PROTECTION_LOCK_LOCATION 0x0

/******************** 32M ********************/
#if J3_32_M
	#define TMPL_TOTAL_NUMBLOCKS      0x20 
	#define TMPL_BLOCK_NUMBYTES       0x20000 
	#define TMPL_TOTAL_SIZE           0x400000 
	#define TMPL_BLOCK_MASK           0xFFFF
#endif /* J3_32_M */

/******************** 64M ********************/
#if J3_64_M
	#define TMPL_TOTAL_NUMBLOCKS      0x40 
	#define TMPL_BLOCK_NUMBYTES       0x20000 
	#define TMPL_TOTAL_SIZE           0x800000 
	#define TMPL_BLOCK_MASK           0xFFFF
#endif /* J3_64_M */

/******************** 128M *******************/
#if J3_128_M
	#define TMPL_TOTAL_NUMBLOCKS      0x80 
	#define TMPL_BLOCK_NUMBYTES       0x20000 
	#define TMPL_TOTAL_SIZE           0x1000000 
	#define TMPL_BLOCK_MASK           0xFFFF
#endif /* J3_128_M */


#if X_8
	#define TMPL_OTP_NUMWORDS         0x9
	#define TMPL_OTP_BASE             0x100 /* address */
	#define TMPL_OTP_PROGRAM          0xC0
	#define TMPL_OTP_READ             0x90
	#define TMPL_OTP_LOCK             0xFD
	#define TMPL_LOCKDOWN_BIT_SET     0x2F
	#define TMPL_LOCK_BIT_SET         0x01  /* 2nd cycle lock bit command */
	#define TMPL_LOCK_BIT_CLEAR       0xD0  /* 2nd cycle lock bit command */
	#define TMPL_BLOCK_SUSPEND        0xB0
	#define TMPL_BLOCK_RESUME         0xD0
#endif

#if PX_16
	#define TMPL_OTP_NUMWORDS         0x9
	#define TMPL_OTP_BASE             0x100  /* address */
	#define TMPL_OTP_PROGRAM          0xC0C0
	#define TMPL_OTP_READ             0x9090
	#define TMPL_OTP_LOCK             0xFDFD
	#define TMPL_LOCKDOWN_BIT_SET     0x2F2F
	#define TMPL_LOCK_BIT_SET         0x0101 /* 2nd cycle lock bit command */
	#define TMPL_LOCK_BIT_CLEAR       0xD0D0 /* 2nd cycle lock bit command */
	#define TMPL_BLOCK_SUSPEND        0xB0B0
	#define TMPL_BLOCK_RESUME         0xD0D0
#endif

#if X_16
	#define TMPL_OTP_NUMWORDS         0x9
	#define TMPL_OTP_BASE             0x100  /* address */
	#define TMPL_OTP_PROGRAM          0x00C0
	#define TMPL_OTP_READ             0x0090
	#define TMPL_OTP_LOCK             0xFFFD
	#define TMPL_LOCKDOWN_BIT_SET     0x002F
	#define TMPL_LOCK_BIT_SET         0x0001 /* 2nd cycle lock bit command */
	#define TMPL_LOCK_BIT_CLEAR       0x00D0 /* 2nd cycle lock bit command */
	#define TMPL_BLOCK_SUSPEND        0x00B0
	#define TMPL_BLOCK_RESUME         0x00D0
#endif

#if X_32
	#define TMPL_OTP_NUMWORDS         0x9
	#define TMPL_OTP_BASE             0x200	  /* address */
	#define TMPL_OTP_PROGRAM          0x00C000C0
	#define TMPL_OTP_READ             0x00900090
	#define TMPL_OTP_LOCK             0xFFFDFFFD
	#define TMPL_LOCKDOWN_BIT_SET     0x002D002F
	#define TMPL_LOCK_BIT_SET         0x00010001 /* 2nd cycle lock bit command */
	#define TMPL_LOCK_BIT_CLEAR       0x00D000D0 /* 2nd cycle lock bit command */
	#define TMPL_BLOCK_SUSPEND        0x00B000B0
	#define TMPL_BLOCK_RESUME         0x00D000D0
#endif

#if ILX_32
	#define TMPL_OTP_NUMWORDS         0x9
	#define TMPL_OTP_BASE             0x200      /* address */
	#define TMPL_OTP_PROGRAM          0x00C000C0
	#define TMPL_OTP_READ             0x00900090
	#define TMPL_OTP_LOCK             0xFFFDFFFD
	#define TMPL_LOCKDOWN_BIT_SET     0x002F002F
	#define TMPL_LOCK_BIT_SET         0x00010001 /* 2nd cycle lock bit command */
	#define TMPL_LOCK_BIT_CLEAR       0x00D000D0 /* 2nd cycle lock bit command */
	#define TMPL_BLOCK_SUSPEND        0x00B000B0
	#define TMPL_BLOCK_RESUME         0x00D000D0
#endif


/********************************************************************
	PRODUCT SPECIFIC DATA DEFINES
********************************************************************/
#if X_8
	#define TMPL_BUFFER_SIZE          0x20         /* bytes */ 
	#define TMPL_WRITE_TO_BUFFER      0xE8
	#define TMPL_SET_READ_CONFIG      0x03
#endif

#if X_16
	#define TMPL_BUFFER_SIZE          0x20         /* bytes */ 
	#define TMPL_WRITE_TO_BUFFER      0x00E8
	#define TMPL_SET_READ_CONFIG      0x0003
#endif

#if X_32
	#define TMPL_BUFFER_SIZE          0x20         /* bytes */ 
	#define TMPL_WRITE_TO_BUFFER      0x00E800E8
	#define TMPL_SET_READ_CONFIG      0x00030003
#endif

#if ILX_32
	#define TMPL_BUFFER_SIZE          0x20         /* bytes */ 
	#define TMPL_WRITE_TO_BUFFER      0x00E800E8
	#define TMPL_SET_READ_CONFIG      0x00030003
#endif


/* defined for all data widths. added to flash base address. contains A16..A1 */
#define TMPL_STD_READ_MODE            0x0000
#define TMPL_PAGE_READ_MODE           0x8000


/*
 * device specific typedefs
 */

/* extended query structure */
typedef struct TMPL_ExtQueryData {
	char   ExtQueryStr[4];        /* 3 bytes + null */
	UINT8  MajorVersionNum;       /* 1 byte */
	UINT8  MinorVersionNum;       /* 1 bytes */
	UINT32 OptionalFeature;       /* 4 bytes */
	UINT8  AfterSuspendFunctions; /* 1 byte */
	UINT16 BlockLockStatus;       /* 2 bytes */
	UINT8  VccOptimum;            /* 1 byte */
	UINT8  VppOptimum;            /* 1 byte */
} TMPL_extquery;


#endif  /* __DEVICE_H */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -