首页|嵌入式系统|显示技术|模拟IC/电源|元件与制造|其他IC/制程|消费类电子|无线/通信|汽车电子|工业控制|医疗电子|测试测量
首页 > 分享下载 > 消费类电子 > 【经典】Nor Flash的测试程序

【经典】Nor Flash的测试程序

资料介绍
Nor Flash的测试程序
板子的配置和我前一篇的bootloader全程详解中的一样,先来看看flash的写操作,flash
型号是StrataFlash Memory (J3) NOR Flash
写Flash需要用到以下的命令:
1.Read Array
2.Read Status Register
3.Clear Status Register
4.Write to Buffer
5.Block Erase
6.Clear Block Lock-Bits
具体如何操作 请看代码分析或者手册
写Flash “Byte/Word Program Flowchart”为2个总线周期
流程如下: 
Start-> Write 40H, Address-> Read Status Register-> SR.7 =?-
> Full Status Check if Desired-> Byte/Word Program Complete
其中Write 40H, Address的指令如下:
Word/Byte Program SCS/BCS 2 (周期1Write X 0x40 or 0x10)( 周期2Write PA PD) 1
,12,13
PA = Address of memory location to be programmed.
PD = Data to be programmed at location PA. Data is latched on the rising edg
e of WE#.
下面是代码解释:
#define U32 unsigned int
#define U16 unsigned short
#define S32 int
#define S16 short int
#define U8 unsigned char
#define S8 char
//My 
标签:Flash的测试程
【经典】Nor Flash的测试程序
本地下载

评论