linux下flash大小如何查看器,Flash 型号和block大小查看

Flash 型号:S29AL016D90TFI001

016是flash 的大小 16M bit, D90 是指flash 的速度。

Get the Flash Erase Block Size.

In boot:

EVM # flinfoBank # 1: MY AMD 29LV256M (256 Mbit)Size: 16 MB in 256 SectorsSector Start Addresses:020000000201000002020000(RO) 02030000(RO) 020400000205000002060000020700000208000002090000. .02FA000002FB000002FC000002FD000002FE000002FF0000

You can calculate the erase size in

Bytes by either:

1.(size/sectors) * 1024 * 1024 =

(16/256) * 1024 * 1024 = 65536 bytes (0x10000)

NOTE that

size and sectors are obtained from the "Size:" line in the flinfo

output

2.Observing the difference between

two adjacent sectors. i.e.

0x2010000 -

0x2000000 = 0x10000

In linux:

target$ cat /proc/mtddev:sizeerasesizenamemtd0: 00020000 00010000 "bootloader"mtd1: 00020000 00010000 "params"mtd2: 00400000 00010000 "kernel"mtd3: 00bc0000 00010000 "filesystem"

The above

output displays the erase block size for the various partitions in the

erasesize field. For this example the erase block size woulde be 0x10000.

开发板增加了一片flash

,现在有两片flash所以要修改boot .

# vi

package/devs/flash/arm/w90n740/current/src/arm_w90n740_flash.c

把#define CYGNUM_FLASH_INTERLEAVE(1)---flash的片数

改为#define CYGNUM_FLASH_INTERLEAVE(2)

该文件的其它宏:

#define CYGNUM_FLASH_BASE       (0xff000000u)---基地址#define CYGNUM_FLASH_WIDTH      (16)---位宽

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值