📄 at91sam7a3flash.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 : AT91SAM7A3Flash.h
//* Object : Flash constan description
//* Creation : JPP 07/Mar/2005
//*
//*----------------------------------------------------------------------------
#ifndef Flash_h
#define Flash_h
#define true -1
#define false 0
#define AT91C_MC_CORRECT_KEY ((unsigned int) 0x5A << 24) // (MC) Correct Protect Key
/*-------------------------------*/
/* Flash Status Field Definition */
/*-------------------------------*/
#define AT91C_MC_FVR ((AT91_REG *) 0xFFFFFF6C) // (MC) MC Flash Version Register
#define AT91C_MC_FLASH_VERSION (0x00000110) // (MC) MC Flash Version Register for SAM7S64 first
/*-------------------------------*/
/* Flash Status Field Definition */
/*-------------------------------*/
#define AT91C_MC_FSR_MVM ((unsigned int) 0xFF << 8) // (MC) Status Register GPNVMx: General-purpose NVM Bit Status
#define AT91C_MC_FSR_LOCK ((unsigned int) 0xFFFF << 16) // (MC) Status Register LOCKSx: Lock Region x Lock Status
#define ERASE_VALUE 0xFFFFFFFF
#define AT91C_PAGE_MASK ((unsigned int) 0x000003FF ) //
/*-----------------------*/
/* Flash size Definition */
/*-----------------------*/
/* 64 Kbytes of Internal High-speed Flash, Organized in 512 Pages of 256 Bytes */
#define FLASH_PAGE_SIZE_BYTE 256
#define FLASH_PAGE_SIZE_LONG 32
#define FLASH_MASK_ADD_PAGE 0x0FF
#define FLASH_LOCK_BITS_SECTOR 16
#define FLASH_SECTOR_PAGE 32
#define FLASH_LOCK_BITS 16 /* 16 lock bits, each protecting 16 sectors of 32 pages*/
#ifndef FLASH_BASE_ADDRESS
#define FLASH_BASE_ADDRESS 0x00100000
#endif
#define FLASH_ADDRESS 0x00100000
#endif /* Flash_h */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -