当前位置: 首页 > 工具软件 > knl-flash-ui > 使用案例 >

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

费承载
2023-12-01

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)---位宽

 类似资料: