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脚本进行解读,是为了了解其工作机 ...
随机推荐
- Linux漏洞建议工具Linux Exploit Suggester
Linux漏洞建议工具Linux Exploit Suggester 在Linux系统渗透测试中,通常使用Nessus.OpenVAS对目标主机进行扫描,获取目标主机可能存在的漏洞.如果无法进行漏洞 ...
- 【bzoj1076】【SCOI2008】【奖励关】期望最优值dp
[pixiv] https://www.pixiv.net/member_illust.php?mode=medium&illust_id=60582219 Description 你正在玩你 ...
- Bean装配--xml
1,bean package com.songyan.zhangpei; import java.util.ArrayList; import com.sun.xml.internal.bind.v2 ...
- [android]加载大量图片避免OOM
原理是事先取得图片的长宽,直接读出缩略图. BitmapFactory.Options options = new BitmapFactory.Options(); options.inPreferr ...
- Java判断中文字符
package com.jsoft.test; import java.util.regex.Pattern; /** * 判断中文字符 * * @author jim * @date 2017-12 ...
- Ubuntu 16.04安装Shell管理工具PAC Manager
下载: (链接: https://pan.baidu.com/s/1nvqrVgH 密码: 45wz) 安装: sudo dpkg -i pac-4.5.5.7-all.deb
- 【spring boot】【mybatis】spring boot中mybatis打印sql语句
spring boot中mybatis打印sql语句,怎么打印出来?[参考:https://www.cnblogs.com/sxdcgaq8080/p/9100178.html] 在applicati ...
- html 打印代码,支持翻页
ylbtech_html_print html打印代码,支持翻页 <html> <head> <meta name=vs_targetSchema content=&qu ...
- Python从2.7.5升级到3.6.5
Python从2.7.5升级到3.6.5学习了:https://blog.csdn.net/liang19890820/article/details/51079633 wget https://ww ...
- perl学习笔记二
数组: 特殊的数组索引:加入对索引值超过数组尾端的元素进行赋值,数组将会根据需要自动扩大,只要有可用的内存分配给数组.意外增加的数组元素的值为undef. $a[0]="aa"; ...