关于如何写nand flash
之前的工作不是我做的,我只是现在接手,以前从来没有做过
使用的flash是s29gl,我接手的时候读flash是正常的,但没有写的功能.
我看了data sheet,对于flash的写操作不是很明白.读的话是直接读地址就可以的了,但写好像不行,还要有一系列的命令.....
data sheet上一个command definitions的表里列出了一系列的命令.我觉得应该是用"write to buffer"这个.
write to buffer有6个步骤:
1. 555 AA (往地址555写0xAA ?)
2. 2AA 55
3. SA 25
4. SA WC
5. PA PD
6. WBL PD
下面是注释
X = Don’t care
RA = Read Address of memory location to be read.
RD = Read Data read from location RA during read operation.
PA = Program Address. Addresses latch on falling edge of WE# or CE# pulse,
whichever happens later.
PD = Program Data for location PA. Data latches on rising edge of WE# or CE#
pulse, whichever happens first.
SA = Sector Address of sector to be verified (in autoselect mode) or erased.
Address bits A21–A15 uniquely select any sector.
WBL = Write Buffer Location. Address must be within same write buffer page as
PA.
WC = Word Count. Number of write buffer locations to load minus 1.
这里的SA,WC,PA,PD,WBL分别是什么?该如何计算?
比如SA,data sheet里面有好多张sector addresses的表,分别对应很多的 model Rx,我该用哪张?
我需要的功能很简单,就是往一个指定的地址写数据.因为以前从来没做过硬件驱动开发,最好有式例程序可以参考下,谢谢
分不够可以再加....