您好,
我们在客户电路板上测试了两个 Winbond SPI-NAND 闪存 W25N02 (QSPI)和 W35N02 (OSPI)、两者都遇到了坏块问题。 起初读写没有问题,但经过几天的测试,出现了许多坏块。 读取和写入命令如下
mtd erase ospi_nand.tiboot3
ext4load mmc 0:2 ${loadaddr} /home/root/tiboot3.bin
mtd write ospi_nand.tiboot3 ${loadaddr} 0 $filesize
mtd read ospi_nand.tiboot3 ${cmpaddr} 0 $filesize
W25N02中、一些块已成为坏块。
=> mtd list
List of MTD devices:
* spi-nand0
- device: flash@0
- parent: spi@fc40000
- driver: spi_nand
- path: /bus@f0000/bus@fc00000/spi@fc40000/flash@0
- type: NAND flash
- block size: 0x20000 bytes
- min I/O: 0x800 bytes
- OOB size: 64 bytes
- OOB available: 24 bytes
- 0x000000000000-0x000010000000 : "spi-nand0"
- 0x000000000000-0x000000100000 : "ospi_nand.tiboot3"
- 0x000000100000-0x000000300000 : "ospi_nand.tispl"
- 0x000000300000-0x000000700000 : "ospi_nand.u-boot"
- 0x000000700000-0x000000740000 : "ospi_nand.env"
......
- 0x00000ffc0000-0x000010000000 : "ospi_nand.phypattern"
=> mtd erase ospi_nand.tiboot3
Erasing 0x00000000 ... 0x000fffff (8 eraseblock(s))
Skipping bad block at 0x00020000
Skipping bad block at 0x00040000
=> mtd erase ospi_nand.tispl
Erasing 0x00000000 ... 0x001fffff (16 eraseblock(s))
Skipping bad block at 0x00180000
Skipping bad block at 0x001a0000
Skipping bad block at 0x001c0000
Skipping bad block at 0x001e0000
=> mtd erase ospi_nand.u-boot
Erasing 0x00000000 ... 0x003fffff (32 eraseblock(s))
Skipping bad block at 0x00000000
Skipping bad block at 0x00020000
Skipping bad block at 0x00040000
Skipping bad block at 0x00060000
Skipping bad block at 0x00080000
=>
在 W35N02中,所有块都成为坏块。
=> mtd list
List of MTD devices:
* spi-nand0
- device: flash@0
- parent: spi@fc40000
- driver: spi_nand
- path: /bus@f0000/bus@fc00000/spi@fc40000/flash@0
- type: NAND flash
- block size: 0x40000 bytes
- min I/O: 0x1000 bytes
- OOB size: 128 bytes
- OOB available: 80 bytes
- 0x000000000000-0x000010000000 : "spi-nand0"
- 0x000000000000-0x000000080000 : "ospi_nand.tiboot3"
- 0x000000080000-0x000000280000 : "ospi_nand.tispl"
- 0x000000280000-0x000000680000 : "ospi_nand.u-boot"
- 0x000000680000-0x0000006c0000 : "ospi_nand.env"
......
- 0x00000ffc0000-0x000010000000 : "ospi_nand.phypattern"
=> mtd erase ospi_nand.tiboot3
Erasing 0x00000000 ... 0x0007ffff (2 eraseblock(s))
Skipping bad block at 0x00000000
Skipping bad block at 0x00040000
=> mtd erase ospi_nand.tispl
Erasing 0x00000000 ... 0x001fffff (8 eraseblock(s))
Skipping bad block at 0x00000000
Skipping bad block at 0x00040000
Skipping bad block at 0x00080000
Skipping bad block at 0x000c0000
Skipping bad block at 0x00100000
Skipping bad block at 0x00140000
Skipping bad block at 0x00180000
Skipping bad block at 0x001c0000
=> mtd erase ospi_nand.u-boot
Erasing 0x00000000 ... 0x003fffff (16 eraseblock(s))
Skipping bad block at 0x00000000
Skipping bad block at 0x00040000
Skipping bad block at 0x00080000
Skipping bad block at 0x000c0000
Skipping bad block at 0x00100000
Skipping bad block at 0x00140000
Skipping bad block at 0x00180000
Skipping bad block at 0x001c0000
Skipping bad block at 0x00200000
Skipping bad block at 0x00240000
Skipping bad block at 0x00280000
Skipping bad block at 0x002c0000
Skipping bad block at 0x00300000
Skipping bad block at 0x00340000
Skipping bad block at 0x00380000
Skipping bad block at 0x003c0000
=>
在正常情况下、在过去几天的测试中、闪存中不应有太多坏块。
1.是否使用 MTD 读取/写入命令在 uboot 下操作闪存? 我可以使用其他指令吗?
2.有这么多的坏块,特别是在 W35N02,分区已经成为坏块。 它被怀疑是错误的标记。 是否有办法清除坏块标记?
3.是否有任何建议的用于调试闪存的工具? uboot 和 Linux 均可用
此致、
斯蒂芬