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

📄 spiflash.h

📁 ADI 公司的DSP ADSP21369 EZ-KIT LITE开发板的全部源代码
💻 H
字号:
/*--------------------------------------------------------------------------------------------
SPIflash.h
This file contains the commands specified for the SPI Flash Being used.

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

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

//Flash commands
#define SPI_WREN            (0x06)  //Set Write Enable Latch
#define SPI_WRDI            (0x04)  //Reset Write Enable Latch
#define SPI_RDSR            (0x05)  //Read Status Register
#define SPI_WRSR            (0x01)  //Write Status Register
#define SPI_READ            (0x03)  //Read data from memory
#define SPI_PP              (0x02)  //Program Data into memory
#define SPI_SE              (0x52)  //Erase one sector in memory
#define SPI_CE              (0x62)  //Erase all memory
#define SPI_RDID            (0x15)  //Read Device ID

//Flash Properties
#define WIP                 BIT_0
#define PAGE_LENGTH         32  //(in 32-bit words) This should be half of the 
                                //Page length allowed by the device in order to 
                                //handle the bit error problem described in the 
                                //declaration of flash_data_out.end in buffers.asm

//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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -