关于norflash

http://en.wikipedia.org/wiki/Flash_memory#NOR_flash

 

下面这段很重要:摘自维基百科

NOR memories

Reading from NOR flash is similar to reading from random-access memory, provided the address and data bus are mapped correctly. Because of this, most microprocessors can use NOR flash memory asexecute in place (XIP) memory, meaning that programs stored in NOR flash can be executed directly from the NOR flash without needing to be copied into RAM first. NOR flash may be programmed in a random-access manner similar to reading. Programming changes bits from a logical one to a zero. Bits that are already zero are left unchanged. Erasure must happen a block at a time, and resets all the bits in the erased block back to one. Typical block sizes are 64, 128, or 256 KB.

Bad block management is a relatively new feature in NOR chips. In older NOR devices not supporting bad block management, the software ordevice driver controlling the memory chip must correct for blocks that wear out, or the device will cease to work reliably.

The specific commands used to lock, unlock, program, or erase NOR memories differ for each manufacturer. To avoid needing unique driver software for every device made, specialCommon Flash Memory Interface (CFI) commands allow the device to identify itself and its critical operating parameters.  (所以这样看CFI一般主要是针对norflash的,而不是针对nandflash

Besides its use as random-access ROM, NOR flash can also be used as a storage device, by taking advantage of random-access programming. Some devices offer read-while-write functionality so that code continues to execute even while a program or erase operation is occurring in the background. For sequential data writes, NOR flash chips typically have slow write speeds, compared with NAND flash.

Typical NOR flash does not need an error correcting code.[31]

 

================

再摘一点:

单来说,flash按照内部访问接口不同,分为两种:nor flash和nand flash。

nor flash:像访问SDRAM一样,按照数据/地址总线直接访问;

nand flash:只有8位/16位/32位甚至更多位宽的总线,每次访问,都要将长地址分为几部分,一点点的分布传入才能访问nand flash。

Nand和Nor的使用寿命,块擦除的速度,数据存储的出错几率等,都有很大区别。

 

其中的Nor Flash,根据外部接口分,又有普通的接口和SPI接口。
而普通接口的Nor Flash,多数支持CFI接口,所以,一般也叫做CFI接口。
CFI接口,相对于串口的SPI来说,也被称为parallel接口,并行接口;
另外,CFI接口是JEDEC定义的,所以,有的又成CFI接口为JEDEC接口。
所以,可以简单理解为:对于Nor Flash来说,CFI接口=JEDEC接口=Parallel接口

 

最近在用的AT45DB161D就属于nor flash中的spi flash。

对于Nor Flash来说,CFI接口 = JEDEC接口 = Parallel接口。

 

普通的parallel/CFI/JEDEC接口的的Nor Flash的针脚比较多,芯片比较大。之所有会有SPI接口的,主要是相对CFI/Parallel的Nor,可以减少针脚数目,减少芯片封装大小,采用了SPI后的Nor Flash,针脚只有8个。


另外,文件系统的移植不是仅仅实现底层存储介质的读写函数即可,还需要考虑坏块管理,内存管理以及平均读写次数等等。下面接着研究fatfs文件系统中以上三个问题。

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值