红牛板Flash驱动AT45D161D--命令及资源定义

typedef enum
{
    BUFFER_1 = 0,
    BUFFER_2   
}E_Ext_FlashBuffer;

typedef enum
{
    BUSYING = 0,
    NOT_BUSY
}E_Ext_FlashBusy;

/* Private typedef -----------------------------------------------------------*/
/* Private define ------------------------------------------------------------*/

/* For AT45DB161D , SPI Flash supported commands */

/*---------------------------------------------*/
/* erase instructions */
/*---------------------------------------------*/

/* chip erase instruction */
#define CMD_CHIP_ERASE_FIRST_CMD            0xC7
#define CMD_CHIP_ERASE_SECOND_CMD            0x94
#define CMD_CHIP_ERASE_THIRD_CMD            0x80
#define CMD_CHIP_ERASE_FOUR_CMD            0x9A

/* sector erase instruction */
#define CMD_SECTOR_ERASE                        0x7C 
/* block erase instruction */
#define CMD_BLOCK_ERASE                        0x50
/* page erase instruction */
#define CMD_PAGE_ERASE                        0x81

/*---------------------------------------------*/
/* write instructions */
/*---------------------------------------------*/

/* write to buffer 1 instruction */
#define CMD_BUFFER_1_WRITE                     0x84   
/* write to buffer 2 instruction */
#define CMD_BUFFER_2_WRITE                     0x87   
/* write buffer 1 to main memory page in build-in erase mode  */
#define CMD_B1_TO_MM_PAGE_WITH_ERASE         0x83   
/* write buffer 2 to main memory page in build-in erase mode  */
#define CMD_B2_TO_MM_PAGE_WITH_ERASE         0x86   

/* write buffer 1 to main memory page in non-erase mode  */
#define CMD_B1_TO_MM_PAGE_NO_ERASE         0x88   
/* write buffer 2 to main memory page in non-erase mode  */
#define CMD_B2_TO_MM_PAGE_NO_ERASE         0x89   

/*---------------------------------------------*/
/* read instructions */
/*---------------------------------------------*/

/* read main memory page to buffer 1 */
#define CMD_MM_PAGE_TO_B1                    0x53
/* read main memory page to buffer 2 */
#define CMD_MM_PAGE_TO_B2                    0x55
/* read main memory page to SRAM buffer directly  */
#define CMD_MM_PAGE_TO_DATA_DIRECT            0xD2

/* read to array in SRAM from buffer 1 of ext flash , high frequency mode */
#define CMD_B1_HIGH_FREQ_READ                0xD4
/* read to array in SRAM from buffer 2 of ext flash , high frequency mode */
#define CMD_B2_HIGH_FREQ_READ                0xD6
/* read to array in SRAM from buffer 1 of ext flash , low frequency mode */
#define CMD_B1_LOW_FREQ_READ                0xD1
/* read to array in SRAM from buffer 1 of ext flash , low frequency mode */
#define CMD_B2_LOW_FREQ_READ                0xD3


/* Read identification */
#define CMD_READ_ID                              0x9F
 /* Read Status Register instruction  */
#define CMD_READ_STATUS                          0xD7

/*---------------------------------------------*/
/* other value or status defines */
/*---------------------------------------------*/

/* busying flag in Status Register */
#define WRITE_BUSYING_FLAG                  0x80  /* Write busy flag */
/* dummy write value */
#define DUMMY_WRITE_BYTE                    0x00

/* buffer array define  */
#define EXT_FLASH_PAGE_SIZE                528

/* page nums define  */
#define EXT_FLASH_PAGE_NUMS            4096

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值