红牛板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

内容概要:本文详细介绍了使用KGDB(Kernel GNU Debugger)调试Linux内核的方法及其重要性。文章首先强调了Linux内核作为系统核心的重要性及其调试的必要性,随后介绍了KGDB的基本原理和优势,包括其基于调试stub和GDB串行协议的工作机制。接着,文章详细描述了使用KGDB调试内核的具体步骤,包括准备工作、内核配置、设置启动参数、建立调试连接和进行调试操作。文中还通过一个实战案例展示了KGDB在解决实际问题中的应用,并总结了使用KGDB时的注意事项和常见问题的解决方法。最后,文章展望了KGDB未来的发展方向和应用场景,如优化调试性能、支持新型硬件架构以及在嵌入式系统、云计算和大数据领域的应用。 适合人群:具备一定Linux系统开发经验的研发人员,尤其是那些需要调试和优化Linux内核的工程师。 使用场景及目标:①帮助开发者深入了解Linux内核的运行状态,精准定位并修复内核问题;②优化内核性能,提高系统的稳定性和可靠性;③适用于嵌入式系统开发、远程服务器维护等场景,特别是在硬件资源有限或无法直接接触设备的情况下。 其他说明:在使用KGDB进行调试时,需特别注意串口设置的一致性、内核版本的兼容性以及调试信息的完整性。同时,要解决常见的连接失败、断点无效等问题,确保调试过程顺利进行。未来,KGDB有望在技术上不断优化,并拓展到更多应用场景中,为Linux系统的持续发展提供支持。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值