读者应当具备一些nand flash基础知识。

首先bootrom会配置一个safe NAND timings(这个最开始的safe timing在ONFI文档中有介绍,简单来说就是nand flash命令,数据写入时都能符合时序hold,set要求的时序参数。)在nand flash块里面搜索 Firmware Configuration Block(FCB)(搜索方法和zynq的bootrom找FSBL类似,应该都是寻找对应字符)。

先让我们来介绍一下,FCB,这个名字可能看到后面就忘了具体代指什么了,从这开始,就直接叫固件配置块了。

固件配置块,里面有什么呢?1,最优的nand timing。最好的nand读写配置时序。2,Discover Bad Block Table page address(DBBT).是的你没看错,nxp在烧录nand的数据里面有坏块表(或者说系统启动时能直接得到坏块表)。3,start page address of primary and secondary firmware.(两份后续固件的地址,其实两份内容是一样的,冗余的作用)。

固件配置块的信息当然也是受到ecc保护的。并且用软件ecc算法确定固件配置块是有效的还是无效的。

如果ecc出错 或者 没找到匹配的固件配置块。将会跳转Search Stride number of pages去接着找。直到SearchCount pages 。

如果一直失败,bootrom将会返回an error,并且boot ROM enters the serial download mode.

The DBBT is searched in the DBBT Search Area,
just like the FCB is searched.

This figure shows the state diagram of the FCB search:

When the FCB is found, the boot ROM searches for the Discovered Bad Blocks Table
(DBBT). If the DBBT Search Area is 0 in the FCB, the ROM assumes that there are no
bad blocks on the NAND device boot area.

See this figure for the DBBT search flow:

If there is a page with a number of errors higher than ECC can correct during the primary image read, the boot ROM turns on the PERSIST_SECONDARY_BOOT bit and
performs the software reset (After the software reset, the secondary image is used)

If there is a page with number of errors higher than ECC can correct during secondary image read, the boot ROM goes to the serial loader

This table shows the flash control block structure:




接下来是DBBT

让我们看点有意思的。

To preserve the BI (bad block information), the flash updater or gang programmer
applications must swap the Bad Block Information (BI) data to byte 0 of the metadata
area for every page before programming the NAND flash.

在写入之前,需要将spare区域存储的坏块mask swap到metadata area。也就是首地址,依此来判断是不是坏块?这个操作我似乎没在onfi,或者其他nand datasheet手册里面见过。

接下来就是read-retry。

Read-retry handling in the ROM
The read-retry is used to recover the bit errors beyond the ECC correction threshold from
NAND. If reading of a page failed and the read_retry_enable field in FCB is set to 1, the
ROM issues a read-retry command sequence to shift the read level before reading the
page again. If the previous reading failed, the ROM continues to shift the read level until
the reading succeeds or all levels were tried. The state diagram of the read-retry is shown
in this figure:

这部分内容看起来是在ONFI比较高版本中的内容。没接触过,看起来挺有趣的。

接下来就是一种和其他文档不同的数据分配方式的说明。



参考: IMX6ULL参考手册

【IMX6ULL bootrom对nandflash支持分析】相关推荐

  1. 20150311 NandFlash驱动分析

    20150311 NandFlash驱动分析 2015-03-11 李海沿 一.结构体详解 MTD体系结构: 在linux中提供了MTD(Memory Technology Device,内存技术设备 ...

  2. mybatis和spring jdbc持久层框架事务支持分析

    mybatis和spring jdbc持久层框架事务支持分析 ​ 持久层框架中的事务支持指的是持久层框架如何支持数据库事务,我们先梳理出原生数据库事务操作的主线脉络,它是通过java.sql 包下的C ...

  3. IDC MarketScape《决策支持分析数据平台供应商评估》报告发布,亚马逊云科技位列“领导者”

    随着科学技术的不断发展,人们的生活方式也在不断改变.现在,人们可以通过互联网获得更多的信息,也可以通过智能手机随时随地与他人进行交流.此外,人工智能技术的进步也使得机器能够完成一些复杂的任务,从而提高 ...

  4. norflash/nandflash 启动分析

     S3C2440和S5PV210是很多 嵌入式爱好者入门的arm处理器,网上的资料也很多.今天我们就来聊聊S3C2440和S5PV210的启动流程,上一篇博客我介绍了uboot在norflah上的 ...

  5. NandFlash 驱动分析与基础功能实现

    NandFlash 一.写作目的及参考来源说明 二.NandFlash的简介 三.引脚功能 四.Array Organization(组织阵列) 1 . 最小读写单元 2 . 最小擦除单元 3 . N ...

  6. norflash/nandflash 启动分析 转

    S3C2440和S5PV210是很多 嵌入式爱好者入门的arm处理器,网上的资料也很多.今天我们就来聊聊S3C2440和S5PV210的启动流程,上一篇博客我介绍了uboot在norflah上的启动流 ...

  7. i.MX6ULL终结者Linux I2C驱动实验IMX6ULL的I2C总线驱动分析

    在上一节中我们了解了I2C框架分为I2C核心.I2C总线驱动和I2C设备驱动三部分.其中I2C总线驱动就是SOC的I2C控制器驱动,一般来说都是SOC厂家实现好的.而I2C设备驱动是用户根据自己不同的 ...

  8. imx6ull:uboot顶层Makefile分析

    版本号 MAKEFLAGES变量 20 MAKEFLAGS += -rR --include-dir=$(CURDIR) Makefile有两个特殊的变量:"SHELL"和&quo ...

  9. S5PV210体系结构与接口11:NandFlash SD卡编程

    目录 1. Flash ROM简介 1.1 概述 1.2 Nor & Nand Flash比较 1.2.1 接口对比 1.2.2 容量和成本对比 1.2.3 可靠性对比 1.2.4 使用寿命对 ...

最新文章

  1. 使用Tape和Vue Test Utils编写快速的Vue单元测试
  2. Javascript与正则表达式
  3. Boost:基于Boost的HTTP客户端的程序
  4. Jupyter notebook入门
  5. react使用setState注意事项
  6. 网络层常见知识点剖析
  7. 康乐php一键脚本,kangle一键脚本
  8. 使用 jQuery Mobile 与 HTML5 开发 Web App (七) —— jQuery Mobile 列表
  9. Netty架构与原理详解
  10. 【es】如何使用 Kerberos 确保您 Elasticsearch 集群的安全
  11. 通用sqlserver分页存储过程
  12. MySQL用命令行运行sql文件
  13. 小白学 Python 爬虫(14):urllib 基础使用(四)
  14. Excel隔行插入空白行小技巧
  15. 201709-2公共钥匙盒
  16. 全面屏下的沉浸式状态栏的返回键、home键、菜单键的显示。
  17. C++ 字符串和数字拼接
  18. 电脑照片太大怎么压缩?如何调整照片kb?
  19. 在JSRUN写一段王者荣耀段位代码
  20. 学习诸如 Oculus Rift 等虚拟现实设备开发需要掌握哪些知识和技术?

热门文章

  1. scad的oracle性质,变量选择之SCAD算法
  2. Fisher information解释和数学意义
  3. 动态规划-多边形游戏算法
  4. 网红电商剧烈洗牌,机会将属于拥有“头部网红矩阵”的MCN机构?
  5. 查询显卡状态 Tesla M40
  6. 112.Android 简单的群发微信,群发文本和图片,一键群发
  7. 月份查询(指针数组)
  8. 计算机学哪个编程好,达内机器人编程VS计算机编程,学哪个最好
  9. 尚硅谷_Spring5
  10. ChinaSkills-高职组网络系统管理大赛-WinSer 2019 互联网网卡检测服务笔记