📄 flash_uploader_appl.h
字号:
//*----------------------------------------------------------------------------
//* ATMEL Microcontroller Software Support - ROUSSET -
//*----------------------------------------------------------------------------
//* The software is delivered "AS IS" without warranty or condition of any
//* kind, either express, implied or statutory. This includes without
//* limitation any warranty or condition with respect to merchantability or
//* fitness for any particular purpose, or against the infringements of
//* intellectual property rights of others.
//*----------------------------------------------------------------------------
//* File Name : Flash_uploader_appl.h
//* Object : Flash uploader Definition File.
//*
//* 1.0 9/04/02 NL : Creation
//*----------------------------------------------------------------------------
#ifndef flash_uploader_appl_h
#define flash_uploader_appl_h
//*----------------------------------------------------------------------------
//* Structure
//*----------------------------------------------------------------------------
//* Constants
//* EBI Initialization
#define CSR0 0xFFE00000
#define EBI_CSR0_MASK 0xFFFF0000
#define SF_CHIP_ID 0xFFF00000
#define SF_CIDR_MASK 0x0FFFFF00
#define REMAP_CTRL_REG 0x20
#define REMAP_CMD 0x00000001
#define MEM_CTRL_VAL 0x00000006
//* Flash
#define FLASH_BASE_ADDR 0x1000000
#define WAIT 300000 //* Wait used for Pause()
#define FLASH_CODE_MASK 0x000000FF
//*Flash AT49 codes
#define ATMEL_MANUFACTURED 0x001F
#define FLASH_AT49BV_UNKNOW 0xFFFF
#define FLASH_AT49BV8011 0x00CB
#define FLASH_AT49BV8011T 0x004A
#define FLASH_AT49BV16x4 0x00C0
#define FLASH_AT49BV16x4T 0x00C2
//*Flash AT29 codes
#define FLASH_AT29LV1024 0X26
#define FLASH_AT29C020 0XDA
//* Flash Program information
#define FLASH_PRG_SIZE 0x800 //* 2Kbytes
#define FLASH_PRG_DEST 0x20 //* Address on the target
#define START_PRG 0x20
//* Parameter for Flash_XV_Send_Data functions
#define ERASE 1
#define PROGRAM 0
#define MIRROR 1
#define NO_MIRROR 0
#define ERASE_DATA 0
//* Load program parameters
#define NB_REG 13
#define SIZE_DATA 4
//* Flash LV Send Data parameters
#define SIZE_256_BYTES 0x100
#define PACKET_SIZE 64
#define NB_PRG 3
//*----------------------------------------------------------------------------
//* Functions
int Recognize_Target(u_int id);
void Initialize_Periph(u_int periph);
u_int Identify_Flash(u_int *code);
void Load_Program(u_int *program);
u_int Flash_LV_Send_Data(u_int *program, u_short erase);
u_int Flash_BV_Send_Data(u_int *program, u_int code, u_short erase);
void JTAG_Flash_uploader(u_short erase, u_short mirror);
#endif /* flash_uploader_appl_h */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -