📄 fl_sst.h
字号:
/* * $Revision: 1.1 $ * $Author: mechavar $ * $Date: 2000/06/19 18:53:18 $ * * Copyright (c) 1999 ARM, INC. * All rights reserved * *//******************************************************************************** ** ******************************************************************************/#ifndef fl_sst_h#define fl_sst_h#define EPROM_BASE (0x01800000)#define ROM_PROTECT_LIMIT (EPROM_BASE + 0x6000)#define ADDR_TOO_LOW (1)#define ADDR_TOO_HI (2)#define ADDR_PROTECTED (3)#define SECTOR_SIZE (0x1000) /* 4K */#define SST39_SECTOR_SIZE SECTOR_SIZE#ifdef MAX_SECTOR_SIZE#undef MAX_SECTOR_SIZE#endif#define MAX_SECTOR_SIZE SECTOR_SIZE#define NUM_SECTORS_400 (0x80)#define BLOCK_SIZE (10000) /* 64K */#define NUM_BLOCKS_400 (8)#define MAN_SST 0xBF#define SST_SST39VF400_ID 0x2780/* Command codes for the flash_command routine */#define FLASH_SELECT 0 /* no command; just perform the mapping */#define FLASH_RESET 1 /* reset to read mode, SW ID exit */#define FLASH_READ 1 /* reset to read mode, by any other name */#define FLASH_AUTOSEL 2 /* autoselect, SW ID entry */#define FLASH_PROG 3 /* program a word */#define FLASH_CERASE 4 /* chip erase */#define FLASH_BERASE 5 /* block erase */#define FLASH_SERASE 6 /* sector erase */#define FLASH_LASTCMD 6 /* used for parameter checking *//* Return codes from flash_status */#define STATUS_READY 0 /* ready for action */#define STATUS_BUSY 1 /* operation in progress */#define STATUS_ERROR 2 /* unclassified but unhappy status *//* Low level flash device Instructions and Commands */#define FL_RESET 0xF0 /* Generic command bus cycle addresses *//* All addresses reflect 16 bit accesses */#define FL_SEQ_ADD_1 0x5555#define FL_SEQ_ADD_2 0x2AAA#define FL_SEQ_ADD_3 0x5555 /* Generic command bus cycle data */#define FL_WORD_COM_1 0xAA#define FL_WORD_COM_2 0x55 /* Command specific data for cycle 3 */#define FL_AUTO_SELECT 0x90#define FL_PROGRAM 0xA0 /* Erase function addresses and data */#define FL_ERASE_ADD_4 0x5555#define FL_ERASE_ADD_5 0x2AAA#define FL_CHIP_ERASE_ADD_6 0x5555#define FL_ERASE_3 0x80#define FL_ERASE_4 0xAA#define FL_ERASE_5 0x55#define FL_SECTOR_ERASE_6 0x30#define FL_BLOCK_ERASE_6 0x50#define FL_CHIP_ERASE_6 0x10/* Macros */#define GET_ROM_SIZE() (MAX_SECTOR_SIZE * NUM_SECTORS_400)#define GET_SECTOR_START(a) ((a)&~(SST39_SECTOR_SIZE-1))#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -