spiflash.h

来自「ADI 公司的DSP ADSP21262 EZ-KIT LITE开发板的全部源代」· C头文件 代码 · 共 41 行

H
41
字号
/*--------------------------------------------------------------------------------------------
SPIflash.h
This file contains the commands specified for the SPI Flash Being used.

--------------------------------------------------------------------------------------------*/
#include <def21262.h>

//There is an error in the definition for the Master/Slave SPI setting
//We will redefine MS to SPIMS to avoid a conflict with a conditional flag
//This will be fixed in VDSP 3.5
//Comment out this definition if you are using VDSP 3.5
//#define SPIMS MS

//Filename holding data to be programmed
//Change this as needed, but always include the quotation marks
#define FILENAME "spiovlyascii.ldr"
//#define FILENAME "Blink.ldr"


//Flash commands
#define SPI_WREN            (0x06)
#define SPI_WRDI            (0x04)
#define SPI_RDSR            (0x05)
#define SPI_WRSR            (0x01)
#define SPI_READ            (0x03)
#define SPI_FAST_READ       (0x0B)
#define SPI_PP              (0x02)
#define SPI_SE              (0xD8)
#define SPI_BE              (0xC7)
#define SPI_DP              (0xB9)
#define SPI_RES             (0xAB)

//Flash Properties
#define WIP                 BIT_0
#define PAGE_LENGTH         64  //(in 32-bit words)

//Application definitions.
#define COMMON_SPI_SETTINGS (SPIEN|SPIMS|SENDZ|CPHASE|CLKPL)
#define COMMON_SPI_DMA_SETTINGS (INTEN|SPIDEN)
#define BITREV_ADDRESS_MASK (0xFFFFFF00)
#define BAUD_RATE_DIVISOR 100

⌨️ 快捷键说明

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