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

📄 buffers.asm

📁 ADI 公司的DSP ADSP21262 EZ-KIT LITE开发板的全部源代码
💻 ASM
字号:
///////////////////////////////////////////////////////////////////////////////////////
//NAME:     buffers.asm (ST SPI Flash)
//DATE:     2/20/04
//PURPOSE:  Program the SPI Flash for the ADSP-21262
//
//USAGE:    This file contains the buffer declarations for use in this project.
//
////////////////////////////////////////////////////////////////////////////////////////
#include "SPIflash.h"

.global flash_curr_page;
.global sector_base_addr;
.global read_base_addr;
.global read_buffer_addr;
.global read_buffer_length;
.global write_buffer_addr;
.global write_base_addr;
.global write_buffer_length;
.global file_data;
.global file_data_verf;
.global flash_data_out;
.global flash_data_verf;
.global spi_setting;
.global spi_dma_setting;
.global status_register;
.global electronic_signature;
.global curr_command;
.global verf_errors;

.section/dm seg_dmda;
//Buffer to hold the (byte) address to send to the SPI Flash
//Used in bit_reverse_command subroutine and those that call it
.var flash_curr_page;

//Buffer to hold the (byte) address to indicate which sector to erase
//Used in sector_erase
.var sector_base_addr;

//Buffer to hold the (byte) address to indicate where to begin reading from the flash
//Used in read_data_bytes
.var read_base_addr;

//Buffer to hold the (normal word) address of the buffer to store after reading
//Used in read_data_bytes
.var read_buffer_addr;

//Buffer to hold the length (in 32-bit words) of the buffer to store after reading
//Used in read_data_bytes
.var read_buffer_length;

//Buffer to hold the (normal word) address of the buffer to write to the flash
//Used in page_program
.var write_buffer_addr;

//Buffer to hold the (byte) address to indicate where to begin writing to the flash
//Used in page_program
.var write_base_addr;

//Buffer to hold the length (in 32-bit words) of the buffer to send to the flash
//Used in page_program
.var write_buffer_length;

//Buffer initialized with the data to write to the flash
//Used in main.asm
.var file_data[]=FILENAME;

//Buffer to verify that the entire buffer was programmed as expected
//Length is one location more than file_data because the buffer will hold an extra word
//Corresponding to the read command and address.
//Used in main.asm
.var file_data_verf[]=FILENAME,0;

//Temporary buffer used to hold the current page to program to the flash
//First location is Write command + address
//Used in page_program
.var flash_data_out[PAGE_LENGTH+1];

//Temporary buffer used to verify the current page programmed to the flash
//First location corresponds Read command + address
//Used in page_program
.var flash_data_verf[PAGE_LENGTH+1];

//Buffer to hold the desired SPICTL setting
//Used in setup_spi
.var spi_setting;

//Buffer to hold the desired SPIDMAC setting
//Used in setup_spi_dma
.var spi_dma_setting;

//Buffer to hold the current value of the flash's status register on a read
//or the desired value of the flash's status register on a write.
//Used in read_status_register and write_status_register
.var status_register[2] =   0,  //dummy location for RX, command word for TX
                            0;  //status location

//Buffer to hold the product ID of the flash
//Used in read_device_id
.var electronic_signature[5] =  0,0,0,    //dummy locations
                                0,    //Manufacturer ID
                                0;    //Device code

//Buffer to hold the command to send to the flash
//Used in bit_reverse_command
.var curr_command;

//Buffer to hold the number of 32-bit words that don't match what was programmed
//Used in page_program
.var verf_errors=0;

⌨️ 快捷键说明

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