物理结构:
●NAND Flash把整个memory分成若干个Block,一个Block包含若干个Page,一个Page又包含512(+16)Byte或2048(+64)Byte. 以Toshiba的TC58NWM9S3B NAND flash为例,它的容量是512Mbits,它总共有512个Block, 一个Block包含64个Page,而一个page是(2048+64)Byte.
●NOR Flash把整个memory分成若干个Sector.
Program & Erase:
●NOR和NAND flash的program都只能将数据位从1写到0,而不能将0写成1,所以在对flash进行写入之前必须对flash进行erase操作。
●NOR和NAND flash的erase操作就是将某一擦除块的内容都写成1,擦写操作的最小单位是一个区块(NAND:block, NOR:sector或block),而不能是单个字节。NOR flash的erase通常包括两种,sector/block erase(块擦除), chip erase(芯片擦除);块擦除就是把某一擦除块的内容写成1,而芯片擦除则是把整个flash的内容都变成1。
操作指令:
●NOR Flash 除了读,其它的操作都不能像RAM那样直接对目标地址进行总线操作, 而是必须输入一串特殊的指令才能擦除或将数据写入到NOR Flash中.
●NAND Flash 的所有操作也是需要输入特定的命令(command)才能完成的.还是以Toshiba的TC58NWM9S3B NAND flash为例,
Page Program: 80h(CMD), Column Address M(页内偏移地址), Page Address N, Data, 1 0h(CMD)
block erase: 60h(CMD), Block address input:2cycle, D0h(erase start cmd)
read: 00h(CMD), Column Address M, Page Address N, 30h(CMD)
ID read : 90h(ID Read CMD), 00h(Address 00)
status read: 70h(CMD)
Reset: FF(CMD)
NOR flash spec 摘要
if a program/erase operation fails, the device remains in the programming/erasing state and does not automatically return to Read Mode, In this case, either a software reset or a hardware reset is required to return the device to Read Mode.
DQ7(Data#Polling)
during program operation, DQ7 outputs the complement of the data.
when program operation completed, DQ7 outputs the data.
during erase operation, DQ7 outputs 0.
when erase operation completed, DQ7 outputs 1.
if program or erase operation fails, DQ7 outputs the data.
DQ6 (Toggle bit 1)
DQ5 (time-out)
if program or erase operates normally, DQ5 outputs 0.
if the internal timer times out during program or erase operation (indicates that the operation
has not been completed ), DQ5 outputs 1.
any attempt to program a 1 into a cell containing a 0 will fail (only erase operation can
change 0 back to 1), DQ5 outputs 1.
NOTE: In the case of internal time-out, reset command is required to return the device to Read
mode.
DQ3 (Sector/Block Erase)
if sector/block erase operation starts, DQ3 outputs 1.
DQ2 (Toggle bit 2)