nandflash操作命令
??nandflash操作命令主要是flash擦除,读,写,ecc校验等命令 ??nand?info?:??查看nandflash芯片信息包括数据线位宽一般8或者是16等 ??nand?erase:??nandflash使用之前必须先擦除,遇到坏块会标记以下是使用实例 ?????????????nand?erase?0x00280000?0x300000 ? ? ? ? 作用:擦除nandflash上起始地址为0x00280000,长度为0x300000的flash空间 ??nand?scrub:?作用和nand?erase差不多,但是会将坏块信息也擦除掉 ??nand?write:??将数据从ddr上的某个地址写入flash中间比如 ?????????????nand?write?0x81000000?0x00280000?0x300000 ? ? ? ? 作用:将DDR地址为0x81000000上的数据写入到nandflash?地址0x00280000上,写入长度为0x30000 ??nandecc??:?在读写flash之前需要先设置好该flash的ecc校验方法,否则可能导致很严重的错误, ? ? ? ?以下是设置ecc校验的命令 ? ? ? ? ? ? ? ? nandecc?hw?2设置nandflash的ecc校验是硬件校验具体为BCH8(4位校验码) ????????????nandecc?hw?0设置nandflash的校验方法是硬件校验具体是汉明码(1位校验码) ????????????nandecc?sw?设置nandflash的校验方法是软件校验
|
ECC type | Usage |
---|---|
S/W ECC | Not used |
H/W ECC - Hamming Code | Should use this scheme while flashing any image/binary which will be used by Linux. This is also used for the U-Boot ENV variables. |
H/W ECC – BCH8 | Only while flashing U-Boot from U-Boot already running out of OCMC RAM1. After flashing revert back to hamming code H/W ECC |
To select ECC algorithm for NAND:
TI8148_EVM# nandecc [sw | hw <hw_type>]
Usage:
sw - Set software ECC for NAND hw <hw_type> - Set hardware ECC for NAND <hw_type> - 0 for Hamming code 1 for bch4 2 for bch8 3 for bch16 Currently we support only Software,Hamming Code and BCH8. We do not support BCH4 and BCH16
(编辑:李大同)
【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!