编程器烧写NAND flash的一些说明

2023-11-11

注意事项:

1.大小端模式,也即在使用编程器时需不需要做字节反序

2.Spare area处理方式,需要还是不需要,是否含有私有ECC算法。

3.坏块处理方式。

摘要一段说明如下:(虽然针对西尔特SUPERPRO/9000U的文章,但也对许多其他的适用)

2.关于NAND FLASH技术以及烧录模式使用说明

2. How Nand Devices are programmed on Xeltek programmer
1)NAND FLASH的特点。
1) An introduction to Nand flash
A. NAND FLASH同NOR FLASH相比,NANDFLASH有着容量大、价格低等优势。
A. Compared with NOR FLASH, Nand flash devices have the advantages of large capacity with lower cost. 
B.由于NAND生产工艺的原因,出厂芯片中会随机出现坏块。坏块在出厂时已经被初始化,并在特殊区域中标记为不可用,在使用过程中如果出现坏块,也需要进行标记。
B. Since the manufacturing method, te NAND flash may include invalid blocks when they are first shipped.  Bad blocks have been initialized before shipping and marked in the specific area. New bad blocks can be generated during usage so the system will have to identify these blocks.
C. NAND FLASH更易出现位反转的现象,如果位反转出现在关键文件上,会导致系统挂机。所以在使用NAND FLASH的同时,建议使用ECC/EDC算法确保可靠性。
C. Bit inverse is easier to be found in Nand flash. If bit inverse happens in the important file, it will cause system shut-down. Therefore, ECC/EDC algorithms are suggested to use to keep reliability when programming Nand Flash.
2)NAND FLASH的坏块处理  NAND FLASH的坏块处理方式有很多,用户可以根据自己的需要选择那一种方法,或者按照自己的要求向我们公司定做。目前我们公司比较成熟、已经被使用验证过的5~6种,下面主要对最常见的三种模式进行一下说明:
2) How to handle the bad blocks
There are many methods to handle the bad blocks. The customer can choose one method according to their own requirements or request Xeltek to customize the algorithms for their own solutions. Currently, we have 5 to 6 methods to handle the bad blocks.  Three common methods are introduced here.

A. 直接跳过(Skip Bad Block)

  这种处理方法是最为简单,也是最常见的方法。即读取辨认坏块标志后,如果此为坏块的话,将内容写入到下一个好块中。如果是读操作的话,不处理当前坏块,跳到下一个好块进行读(如图2)。如果使用这种方式,客户需要关注图(1)中的UBA start block、Size of UBA blocks ( RBA start block、Size of RBA blocks是针对Reserved block的。Boot start block、Size of Boot blocks是检查启动代码区有没有坏块使用的)。UBA start block表示程序文件从第几block开始进行烧录,默认是从0000开始。Size of UBA blocks表示程序文件要烧录多少个block。
   The skip bad block method is the simplest and most common method. This method is very straightforward. It is to just skip over the bad blocks and place the data in the good blocks. When reading a chip, the program just skip over the bad blocks and read the data in the next good blocks. Using this method, the customer needs to check User Block Area (UBA) start block、Size of UBA blocks in the figure 1. The Reserved Block Area (RBA) start block and the size of RBA blocks are used for reserved block method. Boot start block and Size of Boot blocks are used to check if there are bad blocks used in boot area. UBA start block shows the staring address to program the chip. The default address is 0000. The size of UBA blocks is the number of blocks to be programmed. 
  例如:程序的文件为19M,从第0个block开始烧录,目标芯片为K9F1208U0B,每个block大小为16K(大页模式为128K),则要烧写的block=19*1024/16=1216=0x4C0,为安全起见,建议留一点余量,加上0x10个block。所以UBA start block填0000, Size of UBA blocks填0x4D0.
  For example, the file size is 19M and programming starts from the first block. The target chip is K9F1208U0B. Each block is 16K (Large mode is 128K). The blocks for programming = 19*1024/16=1216=0x4C0. It is suggested to add 0x10 block to make sure to have enough space. Therefore, UBA start block is 0000 and Size of UBA blocks is 0x4D0.

 B. 保留替代(Reserved)

B. Reserved Block

使用这种方式编程时,将生成一个存储地址替代表。即当用户程序区出现坏块的时候,编程器软件会在Reserved区找一个好块替代它,并最终生成一张替代表,放在一个区域保留。在读写操作时,遇到坏块就读一下替代表,再读替代块的内容,这样的好处是让系统在逻辑上感觉存储器依然是连续的区域。
In this method, a mapping table will be generated. When a bad block is identified, the software will reserve a good block to replace it and creating a mapping table saved in a reserved area. When a bad block is detected during reading a chip, software will read the mapping table and then read the replaced block. The advantage is the storage area is logically continuous.
使用这种方式编程时,将生成一个存储地址替代表。即当用户程序区出现坏块的时候,编程器软件会在Reserved区找一个好块替代它,并最终生成一张替代表,放在一个区域保留。在读写操作时,遇到坏块就读一下替代表,再读替代块的内容,这样的好处是让系统在逻辑上感觉存储器依然是连续的区域。
In this method, a mapping table will be generated. When a bad block is identified, the software will reserve a good block to replace it and creating a mapping table saved in a reserved area. When a bad block is detected during reading a chip, software will read the mapping table and then read the replaced block. The advantage is the storage area is logically continuous.

如图3,UBA区是存放用户代码区的,RBA区是存放替代表的,Reserved for Replacement区是存放用户代码区出现坏块替代的内容的。
如图1中填写的话。UBA区是从0000~0EFF, RBA区是从0F80~0F8F, Reserved for Replacement区是从0F00~0F7F。Reserved for Replacement区是UBA与RBA中间的一段区域。
In figure 3, UBA is User Block Area. RBA is Reserved Block Area.  Reserved for Replacement
Between the starting address of UBA and RBA, there are some reserved for replacement blocks used for replacing the bad blocks.

 C.分区模式(Partition)
  分区模式是由一张分区表对NAND进行定位烧写的。在烧录准备前,先要装载或编辑一张分区表如图4&图5。
C. Partition

Partition is used to Nand programming based on a partition table. A partition table is loaded and edited before programming, shown in Figure 4 and Figure 5.

(图4)Figure 4

  在分区表中,每16个字节代表一个分区,16个字节中的第1~4个字节表示该分区的起始块地址,第5~8个字节表示该分区的结束块地址,第9~12个字节表示该分区实际使用到的块大小,第13~16个字节为保留字节。当遍历到分区的起始块地址为FF FF FF FF时,遍历结束。当在烧录过程中遇到坏块时,按Skip Bad Block处理。故如图5所示,该目标芯片要烧录三个分区,第一个分区的起始块地址为0000,结束块地址为007F,实际使用的块大小为0001。
In the partition table, every 16-byte represents a partition, in which the bytes from 1st to 4th  represents the starting block address, the bytes from the 5th to 8th represent the ending block address, the bytes form 9th to 12th represent the block size actually used, the bytes from 13th to 16th is the conserved bytes. The address searching will end until the starting address is FF FF FF FF. The skip bad block method is used during programming. For example, there are three partitions need to be programmed for this chip. The starting address and the ending address for the first
partition are 0000 and 007F.  The actual block size is 0001.
3)NAND FLASH的Spare Area的使用。
关于Spare Area的使用在如图1中的Spare Area(ECC)中设置。如果您要烧录的文件中已经包含了Spare Area的信息,请选择Used选项;如果您要烧录的文件中没有包含Spare Area的信息并且Spare Area也不需要任何处理,请选择Reserved, ECC disabled;如果您选择了Reserved, ECC enabled,表示您使用编程器计算出来的ECC算法。我们编程器默认使用的为512B ECC算法,以如下表的结构分布的。

0~4th

5th

6~8th

9~12th

13~15th

Reserved

Bad Mark

ECC0

ECC1

ECC2

Reserved

ECC0

ECC1

ECC2


如果您希望XELTEK编程器为您计算Spare区要存放的数据,请将您的要求详细告诉我们.

3) Spare Area in NAND FLASH
About the usage of Spare Area, we need to set the Spare Area (ECC) in Figure 1. If the file for programming includes Spare Area information, please select “Used”. If there is no Spare Area information in the file for programming, please select “Reserved, ECC disabled”. If you select “Reserved ,ECC enabled”, you will use the ECC algorithm generated by the software. The default algorithm used by our programmer is 512B ECC algorithm. Table 1 shows the format.

Table 1


0~4th

5th

6~8th

9~12th

13~15th

Reserved

Bad Mark

ECC0

ECC1

ECC2

Reserved

ECC0

ECC1

ECC2


If you want XELTEK programmer to calculate the data for saving to Spare Area, please tell us the requirement in details.

4)关于Boot Block Check。
一般情况,程序的Boot区是不允许有坏块的,所以在使用NAND芯片时,检查一下boot区的坏块情况是有必要的,如果您的Boot区安排在第0个block,一般情况下不需要检察坏块,因为芯片在出厂时已经保证了第0个block不是坏块。检查的设置如图1,其中Boot start block表示启动代码区的起始块,Size of Boot blocks启动代码区的大小。如果设置Size of Boot blocks为All blocks(全部块大小),就可以检查出整个NAND的坏块情况。
4) Generally, bad blocks are not allowed to reside in boot area. Therefore it is necessary to check if there are bad blocks in boot area when programming NAND chips. If your boot area is in the first block, there is no need to check the bad block since most NAND manufacturers guarantee that the first block is good. Figure 1 show the boot area configuration. Boot start block shows the starting address of boot area. Size of Boot blocks is the size of boot area. Size of Boot blocks is set to be the size of all blocks in order to check all bad blocks of the Nand chip.

5)坏块标志位。
一般情况,大页模式的坏块标志位为每个block的第2048个字节,小页模式的坏块标志位为每个block的第517个字节,所以在烧录文件中坏块标志位的内容必须为FF,如果您的程序中使用了非标准处理方法,请联系我们,我们会按您的要求提供算法。
5) Bad block mark
In general, the bad block mark for large page mode is in the 2948 byte of every block and in the 517 byte of every block. Therefore, the content of the bad block mark in the programming file is FF. If you didn’t use standard processing method in your file, please contact us. We will customize the algorithm according to your requirements.

6)关于新烧录模式、文件系统和Spare区特殊信息等的开发支持
如果您有如下的开发需求,请给我们提供详细的说明,我们会努力满足您的需求。
A.新的坏块处理方法。
B.非标准的坏块标志位。
C.使用ECC512B&ECC256W以外的ECC算法。
D. Spare区存放扇区,块使用次数,程序文件的其他信息。
E.需要文件系统(FFS)的支持。
....................................
6) About support for new programming mode, file system and specific information of spare area
Please provide the detail description about your development requirements. We will try to fulfill your requirements.

  1. New bad block processing method.
  2. Non standard bad block mark.
  3. Using ECC algorithm except ECC512B & ECC256W.
  4. Saving sector, block usage time, programming file or other information to Spare Area.
  5. Need FFS support.

 

3.NAND FLASH烧录常见问题解答
3. NAND FLASH programming FAQ
1) Config Error错误,不允许继续操作。
出现这样的情况是由于器件配置字(Dev.Config)中的参数设置不当。正确的设置应该是这样的:UBA start block应该是小于All Blocks,Size of UBA blocks应该小于或者等于All Blocks减去UBA start block。Boot start block应该是小于All Blocks,Size of Boot blocks小于或者等于All Block减去UBA start block。
如果在Reserved模式下面,UBA start block应该是小于RBA start block ,Size of UBA blocks 也应该是小于RBA start block减去UBA start block,RBA start block应该大于UBA start block加Size of UBA blocks、并且小于All Blocks,Size of RBA blocks应该小于All Blocks减去RBA start block。
1) Config Error, not allow to continue operation
The problem happens because the variables in Dev. Config is not set properly.
Correct setting is: UBA start block < All Blocks, 
Size of UBA blocks <= (All Blocks - UBA start block)
Boot start block < All Blocks
Size of Boot blocks <= (All Block - UBA start block)

2)编程中提示Good blocks not enough.
这是由于要烧录的数据超过了芯片好块的大小,所以设置器件配置字(Dev.Config)还应该结合芯片的实际情况,如果检查出芯片中有16个坏块,那实际的好块 (ALL Blocks)应该相应减去0x10.
有时在读写母片时也会出现这样的情况,而且检查坏块多少时发现有很多的坏块。这是因为母片中的坏块标志位被转移到其他的地方。默认的坏块标志位被写成有效的数据。

2) Programming message problem about “Good blocks not enough”
This problem happens because the programming file is larger than the size of all good blocks in the chip. Therefore, setting the value in Dev. Config should consider the actual size of the chip. If 16 bad blocks is detected in the chip, the actual good block size should be equal to (All Blocks – 0x10).
The similar problem could happen while reading and programming the master chip. More bad blocks will properly be detected, since the bad block mark of the mother chip is moved to other places. The default bad block mark is written as effective data.

 

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

编程器烧写NAND flash的一些说明 的相关文章

  • 为什么我的 Project Euler Problem 12 算法这么慢?

    我已经在 Scala 中为 PE P12 创建了解决方案 但速度非常非常慢 有人可以告诉我为什么吗 如何优化这个 calculateDevisors 简单的方法和calculateNumberOfDivisors 除数函数具有相同的速度 i
  • 所有可能的骑士在普罗梅拉的棋盘上移动

    是否有可能用马从初始位置 I J 绕过大小为 N N 的棋盘 并且只访问每个方格一次 define A True A I J false active proctype method bit I 4 bit J 3 bit K 1 bit
  • 如何返回 Solidity 中的结构数组?

    我正在为以太坊智能合约设计一个解决方案bidding 用例包括保留名称 例如 myName 并分配给一个地址 然后 人们可以竞标该名称 在本例中为 myName 可以有多个名称发生多次此类出价 struct Bid address bidO
  • 将整数列表划分为总和相等的 K 个子列表

    类似的问题还有1 https stackoverflow com questions 27322804 partition of a set into k disjoint subsets with equal sum and 2 http
  • 用于基本要素匹配的最坏情况 NlogN 算法

    查找两个相同大小数组的元素之间的唯一映射 https stackoverflow com questions 4411940 find the unique mapping between elements of two same size
  • StackOverflowError 计算 BigInteger 的阶乘?

    我正在尝试编写一个Java程序来计算大数的阶乘 它似乎BigInteger无法容纳这么大的数量 下面是我编写的 简单的 代码 public static BigInteger getFactorial BigInteger num if n
  • 数组中最远的相等元素

    假设你有一个未排序的数组 你如何找到两个相等的元素 使它们成为数组中最远的元素 例如8 7 3 4 7 5 3 9 3 7 9 0ans 将是7 9 7 1 8 我想到了以下几点 initialise max 0 using hashing
  • 计算具有 3 个循环的算法的复杂度

    我尝试解决以下练习 以下代码片段最坏情况运行时间的增长顺序是什么 作为 N 的函数 int sum 0 for int i 1 i lt N i for int j 1 j lt i i j for int k 1 k lt j j k s
  • 使用 Numba 加速矢量距离计算

    以下是我为 3 D 环形几何中的距离 平方 计算编写的一些函数 用于该 3 D 空间中的粒子集合 import itertools import time import numpy as np import scipy import num
  • 一种良好且简单的随机性测量方法

    获取一长整数序列 例如 100 000 个 并返回序列随机性的测量值的最佳算法是什么 该函数应返回单个结果 如果序列并非完全随机 则返回 0 如果完全随机 则返回 1 如果序列有点随机 它可以给出介于两者之间的东西 例如0 95 可能是一个
  • 计算字符串的所有子串中子序列的出现次数

    我想编写一个算法来计算字符串的所有子字符串中字符子序列 不相交 出现的总数 下面是一个例子 字符串 jabcohnnyjohnny 后续 约翰尼 包含子序列的子字符串 jabcohnny jabcohnnyj jabcohnnyjo jab
  • 素数生成器算法

    我一直在尝试解决素数生成算法的SPOJ问题 这是问题 彼得想为他的密码系统生成一些素数 帮助 他 你的任务是生成两个给定之间的所有素数 数字 Input 输入以单行中测试用例的数量 t 开始 t Output 对于每个测试用例 打印所有素数
  • 自动跟踪算法

    我正在尝试写一个simple跟踪例程来跟踪电影中的某些点 本质上我有一系列 100 帧长的电影 在黑暗背景上显示一些亮点 我每帧有大约 100 150 个点 它们在电影的过程中移动 我想跟踪它们 所以我正在寻找一些有效的 但可能不会过度实施
  • 数独算法,暴力破解[关闭]

    这个问题不太可能对任何未来的访客有帮助 它只与一个较小的地理区域 一个特定的时间点或一个非常狭窄的情况相关 通常不适用于全世界的互联网受众 为了帮助使这个问题更广泛地适用 访问帮助中心 help reopen questions 我正在尝试
  • 初学者 Actionscript 参考

    我八岁的儿子要求 教他 Flash 编程 有人可以参考好的在线 Actionscript 学习资源吗 我们拥有的 Flash 版本是 Flash MX 先感谢您 看看这是否符合您的要求 http www scribd com doc 940
  • 通过Javascript捕获右键单击,无需节点

    当使用英语以外的任何其他语言时 Flash 播放器在 Firefox Chrome 中使用 wmode window 以外的任何内容时都会出现错误 此错误已报告但尚未修复 http bugs adobe com jira browse FP
  • 浏览器视口大小(以设备像素为单位)

    Goal 我希望 Flash 能够获得有关浏览器视口宽度和高度 以设备像素为单位 的准确信息初始化 调整大小或浏览器缩放事件时 规格 我需要将 flash 嵌入到在 chrome safari firefox 等中运行的 html 页面中
  • AS3如何在角色死亡动画结束时转到MainTimeline中的下一帧

    所以我需要知道我的角色 鸟 是否用管道 hitTestObject 在动画结束后播放骰子动画 它需要在主时间轴中转到游戏结束帧 if bird hitTestObject pipe1 bird gotoAndStop 3 frame 3 w
  • 测试 python Counter 是否包含在另一个 Counter 中

    如何测试是否是pythonCounter https docs python org 2 library collections html collections Counter is 包含在另一个中使用以下定义 柜台a包含在计数器中b当且
  • 无法理解Peterson算法的正确性

    我在这里讨论彼得森算法的一个场景 flag 0 0 flag 1 0 turn P0 flag 0 1 turn 1 while flag 1 1 turn 1 busy wait

随机推荐

  • 比较级的用法

    文章目录 1 比较级 最高级的变换规则 2 比较级 最高级在句子中的应用 1 比较级 最高级的变换规则 通常在形容词和副词后面加 er est 最高级前面要加the hard harder the hardest 词尾是不发音的单音节e时
  • 使用 Python 的支持向量回归 (SVR):预测建模的实用方法

    介绍 支持向量回归 SVR 是一种用于解决回归问题的强大算法 它是支持向量机 SVM 的一部分 用于变量之间的非线性关系 在本文中 我们将学习如何使用 python 语言实现它 了解 SVR SVR 的目标是找到最适合数据点的超平面 同时允
  • 部署gitlab以及迁移代码仓库方案

    作者 JohnLi 未经允许 禁止转载 一 关闭防火墙与内核 systemctl stop firewalld setenforce 0 二 配置yum源并下载依赖 root gitlab cd etc yum repos d root g
  • 深度选择器{/deep/ ; >>> ; ::v-deep }在vue前端项目中使用注意事项

    官网地址 https vue loader vuejs org zh guide scoped css html E6 B7 B1 E5 BA A6 E4 BD 9C E7 94 A8 E9 80 89 E6 8B A9 E5 99 A8
  • linux gvim使用教程,Vim编辑器使用教程

    Vim是一个类似Vi的著名的功能强大 高度可定制的文本编辑器 在Vi的基础上改进和增加了许多的功能 Vim是自由软件 今天我们就来讲讲Vim的使用方法 本文是基于CentOS7上的vim编辑器演示的 默认CentOS7没有安装Vim 可以使
  • 解压后还原jar包

    解压后还原jar包 记一次 jar 包还原 JAR 文件就是 Java Archive Java 档案文件 它是 Java 的一种文档格式 JAR 文件非常类似 ZIP 文件 准确的说 它就是 ZIP 文件 所以叫它文件包 JAR 文件与
  • vue-charts 的图片自定义导出

    chart 图
  • [YOLO专题-27]:YOLO V5 小目标检测遇到的问题与常见解决办法

    作者主页 文火冰糖的硅基工坊 文火冰糖 王文兵 的博客 文火冰糖的硅基工坊 CSDN博客 本文网址 https blog csdn net HiWangWenBing article details 122348281 目录 第1章 前言
  • 使用android studio进行springboot项目的开发

    B站视频 Step 1 Modify build gradle Module Dir apply plugin org springframework boot apply plugin java dependencies implemen
  • MATLAB—医学图像读取(1)

    基于matlab的医学图像处理 图像读取 1 1 一般图像读取 2 医学图像读取操作 图像读取 1 1 一般图像读取 imread指令 读取图像文件 BMP GIF PNG JPEG and TIFF imshow指令 显示图像 imwri
  • 逆向爬虫26 各种加密逻辑

    逆向爬虫26 各种加密逻辑 一 什么是加密 加密就是输入一段得懂的东西 明文 通过一系列数学算法加工后 输出一段看不懂的东西 密文 二 为什么要加密 什么情况下需要加密 当我们想在网络上传输私密数据时 就需要用到加密 加密可以使数据变得更安
  • 从事研发管理的心得

    从事管理工作的心得 前言 职业生涯中 从技术走向管理似乎已成为普遍并达成共识的职业规划套路 但要完成这样的转变过程是需要一定的思考的 它肯定不会也不应该如同开关切换一样简单 因为在技术与管理之间肯定不是断崖 即使是也应该有一个安全可靠且宽阔
  • 芯片封装测试流程详解,一文带你了解清楚

    芯片封装是指芯片在框架或基板上布局 粘贴固定和连接 经过接线端后用塑封固定 形成立体结构的工艺 下面就带大家来了解一下芯片封装 什么是芯片 想要了解芯片封装测试 首先应该了解芯片 芯片其实是半导体元件产品的统称 很多时候我们把集成电路 In
  • [jQuery自定义插件] 2 自定义消息弹窗插件-jQueryToast

    用多了市面上的各种ui框架 各种的消息弹窗类型 我选择其中的一种 我觉得比较好看的 去模仿实现了 先上源码 再解释 目录结构 1 jQueryToast css ftoast position fixed top 0 width 351px
  • [Hive]一篇带你读懂Hive是什么

    作者简介 大家好 我是Philosophy7 让我们一起共同进步吧 个人主页 Philosophy7的csdn博客 系列专栏 哲学语录 承认自己的无知 乃是开启智慧的大门 如果觉得博主的文章还不错的话 请点赞 收藏 留言 支持一下博 gt
  • 组合优化问题求解算法思路的整理(VRP、SDVRP,container loading)

    一 技术背景与合作的必要性 解决合作问题现有的技术路线 挑战与不足 拟采用的技术路线 合作引进 这种技术的有益效果 缺 求解组合优化问题可以通过利用各种数学方法 寻找离散事件的最优编排 分组 次 序或筛选等 目前常用的优化算法可以分为以下四
  • 【LaTeX 教程】04. LaTeX 插入数学公式与符号

    LaTeX 教程 04 LaTeX 插入符号与数学公式 LaTeX 公式 我将把握最近文章里用到的数学公式格式都放上来供大家参考学习 首先 最简单的数学模式 xxx 一个 符号 中间的内容是行内模式 xxx 两个 符号 中间的内容是行间模式
  • 使用wxml2canvas将微信小程序页面转为图片

    最近有个微信小程序项目 需要将页面转为图片 微信小程序提供的Api是wx canvasToTempFilePath 这个方法是将画布指定区域的内容导出生成指定大小的图片 但是我们是将页面导出图片 所以可以使用wxml2canvas解决 1
  • WINRAR常用命令

    这段时间因为工作的需要 研究了一下关于WINRAR的操作 一下是关于它的一些常用命令 一 压缩命令1 将temp txt压缩为temp rarrar a temp rar temp txt 2 将当前目录下所有文件压缩到temp rarra
  • 编程器烧写NAND flash的一些说明

    注意事项 1 大小端模式 也即在使用编程器时需不需要做字节反序 2 Spare area处理方式 需要还是不需要 是否含有私有ECC算法 3 坏块处理方式 摘要一段说明如下 虽然针对西尔特SUPERPRO 9000U的文章 但也对许多其他的