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

📄 nor.h

📁 基于一款32位嵌入式微处理器的Norflash接口的测试代码
💻 H
字号:
/*************************************************************************************
*	Copyright (c) 2005 by National ASIC System Engineering Research Center.
*	PROPRIETARY RIGHTS of ASIC are involved in the subject matter of this 
*	material.  All manufacturing, reproduction, use, and sales rights 
*	pertaining to this subject matter are governed by the license agreement.
*	The recipient of this software implicitly accepts the terms of the license.
*
*	File Name: nor.c
*
*	File Description:
*			just for nor erase, write and read expriment.
*
*	Function Description:
*
*	Created by Wuer 
*************************************************************************************/

#include "typedef.h"

/* define micro of command word of stanard nor flash */
#define NOR_RESET		0xff00ff
#define NOR_STATUSCHK 	0x700070
#define NOR_STATUSCLR 	0x500050
#define NOR_ERASE1 		0x200020
#define NOR_ERASE2 		0xd000d0
#define NOR_WRITE		0x400040
#define NOR_UNLOCK1		0x600060
#define NOR_UNLOCK2		0xd000d0



/* define nor flash READY status macro*/
#define NOR_READY 			0x800080
#define NOR_WRITE_DELAY		0x600
#define	NOR_ERASE_DELAY		0x10000
#define	NOR_IDLE_COUNTER	0x1000

/* declaration of function */
void InitEMI(void);
STATUS ModuleNor(void);
STATUS NorFlash_bolck_erase(U32 blockadd);
STATUS NorFlash_idlejud(U32 address);
STATUS NorFlash_clearSR(U32 blockadd);
STATUS NorFlash_Normal(U32 address);
STATUS NorFlash_unlock( U32 address);
STATUS NorFlash_read(U32 noradd, U32 destadd, U32 length);
STATUS NorFlash_write(U32 noradd, U32 dataadd, U32 length);
STATUS NorCheck( U32 addhead, U8 data, U32 num);

⌨️ 快捷键说明

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