nandecc--am335x
u-boot支持下列NAND ECC算法:
1.S/W ECC(Hamming code),软件ECC校验。
2.H/W ECC(Hamming code,BCH8)。
BCH Flash OOB Layout
For any ECC scheme we need to add some extra data while writing so as to detect and correct (if possible) the errors introduced by the NAND part. In case of BCH scheme some bytes are needed to store the ECC related info.
The section of NAND memory where addition info like ECC data is stored is referred to as Out Of Band or OOB section.
The first 2 bytes are used for Bad block marker – 0xFFFF => Good block
The next ‘N’ bytes is used for BCH bytes
N = B * <Number of 512-byte sectors in a page>
>>B = 8 bytes per 512 byte sector in BCH4
>>B = 14 bytes per 512 byte sector in BCH8
>>B = 26 bytes per 512 byte sector in BCH16
So for a 2k page-size NAND flash with 64-byte OOB size, we will use BCH8. This will consume 2 + (14*4) = 58 bytes out of 64 bytes available.
The NAND flash part used in EVM does not have enough spare area to support BCH16.

To select ECC algorithm for NAND:
U-Boot# 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.

注:am335x采用NandFlash:K9F2G08UOC,此flash特性:
page: 2K=2048 bytes
oob: 64 bytes
block: 128K = 64page
从目前u-boot命令可知,u-boot在烧写nandflash时,MLO、U-boot、Linux、Rootfs都采用了BCH8(nandecc hw 2),而EVM和Log采用了Hamming(nandecc hw 0)。yaffs2文件系统本身占用oob空间28字节(实际25字节),而oob空间共64字节,显然不能采用BCH8(空间不足)。yaffs2中oob布局为:2bytes + 28bytes tags + 16ECC(根据好的yaffs镜像推测)。具体如何实现需找到源码后进一步确认。
参考:AM335x U-Boot User's Guide
http://blog.csdn.net/pengrui18/article/details/18326275
http://read.pudn.com/downloads128/sourcecode/embed/541512/yaffs2/utils/mkyaffs2image.c__.htm
nandecc--am335x的更多相关文章
- AM335x kernel4.4.12 LCD 时钟翻转设置记录
TI AM335x kernel 4.4.12 LCD display 时钟翻转记录 因为公司硬件上已经确定LCD 转LVDS 转换芯片上确认以上升沿时钟为基准,所以只能在软件上调整相关东西. 入口在 ...
- AM335x tscadc platform driver 相关代码跟踪
TI AM335x ti am335x_tsc.c 代码跟踪 在kernel 首层目录: 先运行make ARCH=arm tags 这个作用是建立tags文件,只含有arm架构的,利用ctag即可进 ...
- am335x watchdog 设备出错
问题描述: am335x watchdog 设备节点打开失败. 如果是直接将omap_wdt 直接编译成uImage,这样会出现打开文件节点失败的情况. 如果单独编译成模块在后面文件系统内插入则不会. ...
- am335x 虚拟机环境变量的设置及注释
我用的还是老的Linux3.2.0的内核,只是借用了TI am335x SDK 3.0里面的工具. 首先下载TI官方的SDK,上一章已经安装了一个Ubuntu14.04的虚拟机. TI 最新的SDK下 ...
- am335x UART1输入u-boot 调试信息代码修改
AM335x 调试信息UART1输出代码修改1. 关于pin_mux 的配置代码修改位置:/board/forlinx/ok335x/mux.c void enable_uart0_pin_mux( ...
- am335x 更改调试串口
/********************************************************************* * am335x 更改调试串口 * * am335x的调试 ...
- Ubuntu 14.04 AM335x TI-RTOS 编译
/************************************************************************************* * Ubuntu 14.0 ...
- 为AM335x移植Linux内核主线代码
/********************************************************************** * 为AM335x移植Linux内核主线代码 * 说明: ...
- ti processor sdk linux am335x evm setup.sh hacking
#!/bin/sh # # ti processor sdk linux am335x evm setup.sh hacking # 说明: # 本文主要对TI的sdk中的setup.sh脚本进行解读 ...
- ti processor sdk linux am335x evm Makefile hacking
# # ti processor sdk linux am335x evm Makefile hacking # 说明: # 本文主要对TI的sdk中的Makefile脚本进行解读,是为了了解其工作机 ...
随机推荐
- 2.2多线程(java学习笔记)线程状态及线程操作的相关方法
一.线程的状态 线程一般具有五种状态,即创建.就绪.运行.阻塞.终止. 它们之间的关系: 二.线程操作相关方法 1.设置和取得线程名称. 如果不设置线程名称,系统会自动分配线程名,一般格式为Threa ...
- 第一讲work(axe)
1,Dao package com.songyan.Dao; public interface Axe { public void chop(); } package com.songyan.Dao; ...
- 集合框架(Collection和Collections的区别)
1.Collection: java.util.Collection 是一个集合接口. 它提供了对集合对象进行基本操作的通用接口方法.Collection接口在Java 类库中有很多具体的实现.Col ...
- thinkphp3.0增加setInc、setDec方法
thinkphp3.0增加setInc.setDec方法 thinkphp3.0增加setInc.setDec方法,今天查看thinkphp2.0的方法setInc.setDec时是这样写的: 而对于 ...
- 跟着Sedgewick学算法(week 1 ElementarySort)
链接https://www.evernote.com/shard/s408/sh/dbe0167f-20e0-41c4-a49b-75717ad98695/461148482ffb6add092be ...
- Android获取视频音频的时长的方法
android当中获取视频音频的时长,我列举了三种. 1:获取视频URI后获取cursor cursor.getLong(cursor.getColumnIndexOrThrow(MediaStore ...
- 设计模式之模板模式(PHP实现)
github地址:https://github.com/ZQCard/design_pattern * 在模板模式(Template Pattern)中,一个抽象类公开定义了执行它的方法的方式/模板. ...
- 设计模式之桥接模式(php实现)
github地址:https://github.com/ZQCard/design_pattern /** * 桥接模式 * 优点: * 1.分离抽象接口及其实现部分.提高了比继承更好的解决方案. * ...
- 3、列表 list
列表 >>> list=['aaa','bbb','ccc'] >>> print list ['aaa', 'bbb', 'ccc'] >>> ...
- mongodb修改器(转)
MongoDB 修改器 对文档中的某些字段进行更新 $inc 专门用来增加(或减少)数字的,只能用于整数,长整数或双精度浮点型的值$inc键的值必须为数字,不能使用字符串,数组或其他非数字的值如果键不 ...