WO2018040924A1 - Write method and write system utilized in nand flash production - Google Patents

Write method and write system utilized in nand flash production Download PDF

Info

Publication number
WO2018040924A1
WO2018040924A1 PCT/CN2017/097818 CN2017097818W WO2018040924A1 WO 2018040924 A1 WO2018040924 A1 WO 2018040924A1 CN 2017097818 W CN2017097818 W CN 2017097818W WO 2018040924 A1 WO2018040924 A1 WO 2018040924A1
Authority
WO
WIPO (PCT)
Prior art keywords
partition
nandflash
terminal
programming
partition table
Prior art date
Application number
PCT/CN2017/097818
Other languages
French (fr)
Chinese (zh)
Inventor
吴旋
Original Assignee
福建联迪商用设备有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 福建联迪商用设备有限公司 filed Critical 福建联迪商用设备有限公司
Publication of WO2018040924A1 publication Critical patent/WO2018040924A1/en

Links

Classifications

    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C29/00Checking stores for correct operation ; Subsequent repair; Testing stores during standby or offline operation
    • G11C29/70Masking faults in memories by using spares or by reconfiguring
    • G11C29/88Masking faults in memories by using spares or by reconfiguring with partially good memories
    • G11C29/883Masking faults in memories by using spares or by reconfiguring with partially good memories using a single defective memory device with reduced capacity, e.g. half capacity
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C29/00Checking stores for correct operation ; Subsequent repair; Testing stores during standby or offline operation
    • G11C29/04Detection or location of defective memory elements, e.g. cell constructio details, timing of test signals
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C29/00Checking stores for correct operation ; Subsequent repair; Testing stores during standby or offline operation
    • G11C29/04Detection or location of defective memory elements, e.g. cell constructio details, timing of test signals
    • G11C2029/0403Detection or location of defective memory elements, e.g. cell constructio details, timing of test signals during or with feedback to manufacture

Definitions

  • the present invention relates to the field of PCs, and in particular, to a method for programming a NANDFLASH production stage and a programming system thereof.
  • NANDFLASH has the advantages of large capacity, low cost, and fast rewriting speed, it has been gradually used in embedded devices such as payment terminals, car navigation, industrial control devices, and set-top boxes, replacing the status of original N ORFLASH and other storage devices. .
  • Chinese Patent Application No. CN201210157878.7 discloses a bad block management method for flash storage, which divides a memory space into a first area and a second area, and maps bad blocks in the first area to the first A normal block in the two regions, and the BBT recording such a mapping relationship is stored in the block of the second region.
  • the method saves the mapping relationship by using multiple bad block tables to avoid the loss of the mapping relationship due to the block damage of the bad block table.
  • the technical problem to be solved by the present invention is: Providing a programming method for a NANDFLASH production stage and a programming system thereof, solving a bad block generated by a NANDFLASH in a production stage, causing a bad block concentration in a certain partition, an effective area
  • the technical solution adopted by the present invention is: Providing a method for NANDFLA
  • the method of programming in the SH production stage includes the following steps:
  • the PC-side burning program sends the terminal burning program to the NANDFLASH of the terminal
  • S2 the terminal burning program detects a bad block distribution in the NANDFLASH, and sends the bad block distribution to
  • S3 the PC-side burning program according to the received bad block distribution and the preset first partition table, the first partition table describes the size of the area that each partition actually needs to use; Area size
  • S4 The PC-side burning program sequentially writes a mirror of each partition in the NANDFLASH of the terminal according to the second partition table. Burning program The burning program is programmed.
  • the partition table is preset in the PC-side burning program according to the image to be burned into the NANDFLASH, and the bad block distribution in the NANDFLASH is detected by the terminal executing the burning program sent by the PC. Then, according to the distribution of bad blocks, the space occupied by the bad blocks in the area is added in each area in the preset partition table, and a new partition table is set to guide the subsequent image burning process and system operation of each partition; Avoid some terminal terminals brought by fixed partition table can not be used or NANDFLASH space The problem of decreasing usage rate not only ensures the quality of production, but also improves the utilization of storage space, and controls the cost.
  • FIG. 1 is a flow chart showing the steps of a method for programming a NANDFLASH production stage according to an embodiment of the present invention
  • FIG. 2 is a block diagram showing a module for a programming method of a NANDFLASH production stage according to an embodiment of the present invention.
  • the most critical idea of the present invention is: according to the distribution of bad blocks, the space occupied by the bad blocks of the area is added in each area in the preset partition table, and a new partition table is set to guide the mirroring of the subsequent partitions. Into the process and system operation.
  • the present invention provides a method for programming a NANDFLASH production stage, which includes the following steps:
  • the PC-side burning program sends the terminal burning program to the NANDFLASH of the terminal
  • S2 the terminal burning program detects a bad block distribution in the NANDFLASH, and sends the bad block distribution to a PC end burning program;
  • S3 the PC-side burning program according to the received bad block distribution and the preset first partition table, the first partition table describes the size of the area that each partition actually needs to use; Area size
  • S4 The PC-side burning program sequentially writes a mirror of each partition in the NANDFLASH of the terminal according to the second partition table. Burning program
  • the partition table is preset in the PC-side burning program according to the image to be burned into the NANDFLASH, and the burning program program sent by the PC is detected by the terminal to detect the NANDFLASH.
  • Bad block distribution according to the distribution of bad blocks, the space occupied by the bad blocks in the area is added to each area in the preset partition table, and a new partition table is set to guide the subsequent image burning process and system operation of each partition; This way, some terminals that are brought by the fixed partition table are not used or NANDF is avoided.
  • the problem of reduced LASH space utilization not only ensures the quality of production, but also improves the utilization of storage space and controls the cost.
  • step S1 the PC-side burning program runs under the Linux operating system.
  • Linux is an operating system that releases source code. In addition to Kernel free, many of its system programs are free software and are available for free from the Internet.
  • the PC-side burning program adds the second partition table to the Uboot environment variable partition to generate a partition mirror and writes the NANDFLASH of the terminal.
  • Uboot is the abbreviation of Universal Boot Loader. It is a source code project that complies with the GPL. Its source directory and compiled form are similar to the Linux kernel. Many Uboot source code is simplified according to the corresponding Linu X kernel source. Formed, Uboot is a small program executed before the operating system runs. It initializes the hardware device and establishes an appropriate hardware and software environment to prepare for the final call of the operating system kernel.
  • the PC end connects the terminal through the USB, and sends the terminal burning program to the NANDFLASH of the terminal.
  • the USB connection mode has the characteristics of being hot-swappable, portable, standard, and capable of connecting multiple devices.
  • step S3 the PC-side burning program adds a bad block in the area in each area in the first partition table according to the received bad block distribution and the preset first partition table.
  • the size of the occupied area calculate the size of the area actually occupied by each partition, and generate a second partition table.
  • the space occupied by the bad blocks is added in the corresponding area of the preset partition table, and the mirroring of each partition can be ensured while ensuring the space utilization of each area is maximized and the cost is saved. Complete burn write to NANDFLASH.
  • step S4 the mirror of each partition is sequentially written in the NANDFLASH of the terminal, and the terminal is started, and the operating system sequentially loads the corresponding mirror operation according to the second partition table.
  • a programming system for a NANDFLASH production stage comprising: [0033] sending module: used to send a burning program of the PC end to the NANDFLASH of the terminal;
  • detecting module configured to detect a bad block distribution in the NANDFLASH, and send to the PC end;
  • a partition table generation module configured to calculate, according to the received bad block distribution and the preset first partition table, the size of the area actually occupied by each partition according to the PC-side burning program, thereby generating a Second partition table
  • the programming module is configured to sequentially write a mirror of each partition in the NANDFLASH of the terminal according to the second partition table.
  • the programming system for the NANDFLASH production stage further includes a PC-side programming program running module, configured to run the PC-side programming program under the Linux operating system.
  • the programming system for the NANDFLASH production stage further includes a mirror generation module, configured to generate a partition mirror by adding a second partition table to the Uboot environment variable partition.
  • the programming system for the NANDFLASH production stage further includes a mirroring running module, configured to sequentially load the corresponding mirroring operation according to the second partition table in the operating system.
  • a programming method for the NANDFLASH production stage including the following steps: [0042] SI: The PC end connects to the terminal through the USB, and the PC end burning program sends the terminal burning program to the NAN of the terminal.
  • S2 the terminal burning program detects a bad block distribution in the NANDFLASH, and sends the bad block distribution to
  • S3 the PC-side burning program adds the size of the area occupied by the bad block in the area in each area in the first partition table according to the received bad block distribution and the preset first partition table, and calculates The size of the area actually occupied by each partition, thereby generating a second partition table;
  • S4 The PC-side burning program divides the second partition table into a Uboot environment variable partition, generates a partition mirror, and writes the NANDFLASH of the terminal; sequentially writes a mirror of each partition in the NANDFLASH of the terminal, and then starts The terminal, the operating system sequentially loads the corresponding mirror operation according to the second partition table.
  • a programming system for a NANDFLASH production stage includes:
  • sending module used to send a burning program of the PC end to the NANDFLASH of the terminal;
  • detecting module configured to detect a bad block distribution in the NANDFLASH, and send to the PC end;
  • a partition table generating module configured to calculate, according to the received bad block distribution and the preset first partition table, the size of the area actually occupied by each partition according to the PC-side burning program, thereby generating a Two partition table.
  • the method for programming a NANDFLASH production stage pre-sets a partition table in a PC-side burning program according to a mirror that needs to be burned into the NANDFLASH, and performs a PC-side transmission through the terminal.
  • the burning program detects the distribution of bad blocks in NANDFLASH, and then adds the space occupied by the bad blocks in the area in the preset partition table according to the distribution of bad blocks, and sets a new partition table for guiding subsequent partition mirrors.
  • the burning process and the system operation avoids the problem that some terminals caused by the fixed partition table cannot be used or the NANDFLASH space utilization rate is reduced, which not only ensures the production quality, but also improves the utilization of the storage space and controls the cost.
  • Linux is an open source operating system. In addition to Kernel free, many of its system programs are free software and are available for free from the Internet.
  • Uboot is the abbreviation of Universal Boot Loader. It is a source code project that complies with the GPL. Its source directory and compiled form are similar to the Linux kernel. Many Uboot source code is simplified according to the corresponding Linu X kernel source. Formed, Uboot is a small program executed before the operating system runs. It initializes the hardware device and establishes an appropriate hardware and software environment to prepare for the final call of the operating system kernel.
  • the USB connection mode has the characteristics of being hot-swappable, portable, standard, and capable of connecting multiple devices.
  • the space occupied by the bad blocks is added in the corresponding area of the preset partition table, and the mirroring of each partition can be ensured in the same space to ensure the space utilization of each area and the cost saving. Complete burn write to NANDFLASH.

Abstract

The invention relates to the field of personal computers (PC), and specifically, to a write method and a write system utilized in a NAND flash production stage. The write method comprises the following steps: S1: a PC terminal data write program transmits, to a NAND flash of the terminal, a terminal write program; S2: the terminal write program detects bad block locations in the NAND flash, and transmits, to the PC terminal write program, the bad block locations; S3: the PC terminal write program computes, according to the received bad block locations and a preconfigured first partition table, an actual used size of each of partitions, so as to generate a second partition table of the partitions, wherein the first partition table includes an actual required size of each of the partitions; and S4: the PC terminal write program writes, to the NAND flash of the terminal, and according to the second partition table, an image file of each of the partitions. The embodiments ensure production quality and increase a utilization rate of storage space, keeping costs in control.

Description

一种用于 NANDFLASH生产阶段的烧写方法及其烧写系 统  A programming method for NANDFLASH production stage and its burning system
技术领域  Technical field
[0001] 本发明涉及 PC领域, 特别涉及一种用于 NANDFLASH生产阶段的烧写方法及 其烧写系统。  [0001] The present invention relates to the field of PCs, and in particular, to a method for programming a NANDFLASH production stage and a programming system thereof.
背景技术  Background technique
[0002] 由于 NANDFLASH具有容量大、 成本低、 改写速度快的优点, 已经逐渐在支付 终端、 车载导航、 工控设备、 机顶盒等嵌入式设备上的得到使用, 替代了原来 N ORFLASH等存储设备的地位。  [0002] Because NANDFLASH has the advantages of large capacity, low cost, and fast rewriting speed, it has been gradually used in embedded devices such as payment terminals, car navigation, industrial control devices, and set-top boxes, replacing the status of original N ORFLASH and other storage devices. .
[0003] 大部分嵌入式设备都需要把 FLASH划分为不同区域实现不同功能。 常见的分区 有 Uboot分区、 Linux内核分区、 LOGO分区、 系统配置分区等。 而在生产阶段, 大部分分区都需要预先写入不同的镜像, 而在写入吋, 需要根据分区表进行写 入。 分区表描述了 FLASH上的各区域分布, 包括起始地址、 大小等。  [0003] Most embedded devices need to divide FLASH into different areas to achieve different functions. Common partitions include Uboot partition, Linux kernel partition, LOGO partition, system configuration partition, and so on. In the production phase, most partitions need to be written to different images in advance, and after writing, they need to be written according to the partition table. The partition table describes the distribution of each area on the FLASH, including the starting address, size, and so on.
[0004] 目前在生产烧入吋, 多使用固定的分区表, 规定了每个分区的实际大小。 对于 NANDFLASH, 这种方式存在问题。 NANDFLASH芯片的工艺决定了其存在着 一定数量的坏块; 对于每片 NANDFLASH, 坏块的数量和分布都是不同的。 这 样, 如果使用固定的分区表, 就存在因为某个分区所在区域坏块过多导致有效 区域变小, 无法烧入完整的镜像; 这样使得一些终端无法正常使用。 如果这些 分区预留较多区域, 则会存在浪费区域的情况, 使 FLASH空间利用率降低, 甚 至导致被迫选用更大容量的 FLASH而导致成本上升。  [0004] At present, in the production of burn-in, a fixed partition table is used, and the actual size of each partition is specified. For NANDFLASH, there is a problem with this approach. The process of the NANDFLASH chip determines that there are a certain number of bad blocks; for each NANDFLASH, the number and distribution of bad blocks are different. In this way, if a fixed partition table is used, there is a problem that the effective area becomes smaller because there are too many bad blocks in the area where a partition is located, and the complete image cannot be burned; thus, some terminals cannot be used normally. If these partitions reserve more areas, there will be wasted areas, which will reduce the utilization of FLASH space, and even lead to the forced use of larger capacity FLASH, resulting in increased costs.
[0005] 申请号为 CN201210157878.7的中国专利公幵了一种闪速存储的坏块管理办法, 将存储器空间划分为第一区域和第二区域, 将第一区域中的坏块映射到第二区 域中的正常块, 并将记录这样的映射关系的 BBT存储在第二区域的块中。 该方法 通过使用多个坏块表来保存映射关系, 以避免由于坏块表所在的块损坏造成映 射关系的丢失。 但该专利的坏块管理办法存在问题, 由于坏块表和数据都会存 放在第二区域的块中, 如果使用标志位来区分块中存储的是坏块表还是数据, 则在每次访问 NAND闪存设备吋, 都需要遍历整个第二区域来査找坏块表, 降低 访问效率, 如果在第二区域中划分特定的空间来保存坏块表, 虽然能减少遍历 块的数量, 但特定空间内的块只能用于保存坏块表, 不能用于存放数据, 浪费 了存储空间。 [0005] Chinese Patent Application No. CN201210157878.7 discloses a bad block management method for flash storage, which divides a memory space into a first area and a second area, and maps bad blocks in the first area to the first A normal block in the two regions, and the BBT recording such a mapping relationship is stored in the block of the second region. The method saves the mapping relationship by using multiple bad block tables to avoid the loss of the mapping relationship due to the block damage of the bad block table. However, there is a problem with the bad block management method of the patent, since the bad block table and the data are stored in the block of the second area, if the flag bit is used to distinguish whether the block stores the bad block table or the data, After each access to the NAND flash device, it is necessary to traverse the entire second region to find the bad block table, thereby reducing the access efficiency. If the specific space is divided in the second region to save the bad block table, the number of traversed blocks can be reduced. , but the blocks in a specific space can only be used to save bad block tables, can not be used to store data, and waste storage space.
技术问题  technical problem
[0006] 本发明所要解决的技术问题是: 提供一种用于 NANDFLASH生产阶段的烧写方 法及其烧写系统, 解决 NANDFLASH在生产阶段产生的坏块造成某个分区内坏 块集中, 有效区域无法烧入完整镜像的问题, 以及在分区吋预留较多区域带来 空间利用率低, 成本上升的问题。  [0006] The technical problem to be solved by the present invention is: Providing a programming method for a NANDFLASH production stage and a programming system thereof, solving a bad block generated by a NANDFLASH in a production stage, causing a bad block concentration in a certain partition, an effective area The problem of not being able to burn into a full image, and the need to reserve more areas in the partition, result in low space utilization and rising costs.
问题的解决方案  Problem solution
技术解决方案  Technical solution
[0007] 为了解决上述技术问题, 本发明采用的技术方案为: 提供一种用于 NANDFLA [0007] In order to solve the above technical problem, the technical solution adopted by the present invention is: Providing a method for NANDFLA
SH生产阶段的烧写方法, 包括以下步骤: The method of programming in the SH production stage includes the following steps:
[0008] SI : PC端烧片程序发送终端烧片程序到终端的 NANDFLASH中; [0008] SI: the PC-side burning program sends the terminal burning program to the NANDFLASH of the terminal;
[0009] S2: 所述终端烧片程序检测 NANDFLASH中的坏块分布, 发送所述坏块分布到[0009] S2: the terminal burning program detects a bad block distribution in the NANDFLASH, and sends the bad block distribution to
PC端烧片程序; PC end burning program;
[0010] S3: PC端烧片程序根据收到的坏块分布和预置的第一分区表, 所述第一分区 表描述每个分区实际需要使用的区域大小; 算出每个分区实际占用的区域大小 [0010] S3: the PC-side burning program according to the received bad block distribution and the preset first partition table, the first partition table describes the size of the area that each partition actually needs to use; Area size
, 从而生成用于这个分区的第二分区表; , thereby generating a second partition table for this partition;
[0011] S4: PC端烧片程序根据第二分区表依次在终端的 NANDFLASH中烧写入每个 分区的镜像。 烧片程序烧片程序烧片程序。 [0011] S4: The PC-side burning program sequentially writes a mirror of each partition in the NANDFLASH of the terminal according to the second partition table. Burning program The burning program is programmed.
发明的有益效果  Advantageous effects of the invention
有益效果  Beneficial effect
[0012] 本发明的有益效果在于: 本发明根据所需烧入 NANDFLASH中的镜像在 PC端 烧片程序中预置分区表, 通过终端执行 PC端发送的烧片程序检测 NANDFLASH 中的坏块分布, 再根据坏块分布情况在预置的分区表中的各区内加上该区坏块 占用的空间, 设置新的分区表, 用于指导后续各分区镜像烧入过程和系统运行 ; 这种方式避免了固定分区表带来的部分终端无法使用或 NANDFLASH空间利 用率下降的问题, 既保证了生产质量, 又提高了存储空间利用率, 控制了成本 对附图的简要说明 [0012] The beneficial effects of the present invention are as follows: According to the invention, the partition table is preset in the PC-side burning program according to the image to be burned into the NANDFLASH, and the bad block distribution in the NANDFLASH is detected by the terminal executing the burning program sent by the PC. Then, according to the distribution of bad blocks, the space occupied by the bad blocks in the area is added in each area in the preset partition table, and a new partition table is set to guide the subsequent image burning process and system operation of each partition; Avoid some terminal terminals brought by fixed partition table can not be used or NANDFLASH space The problem of decreasing usage rate not only ensures the quality of production, but also improves the utilization of storage space, and controls the cost.
附图说明  DRAWINGS
[0013] 图 1为本发明具体实施方式的用于 NANDFLASH生产阶段的烧写方法的步骤流 程图;  1 is a flow chart showing the steps of a method for programming a NANDFLASH production stage according to an embodiment of the present invention;
[0014] 图 2为本发明具体实施方式的用于 NANDFLASH生产阶段的烧写方法的模块结 构图。  2 is a block diagram showing a module for a programming method of a NANDFLASH production stage according to an embodiment of the present invention.
具体实施方式 detailed description
[0015] 本发明最关键的构思在于: 根据坏块分布情况在预置的分区表中的各区内加上 该区坏块占用的空间, 设置新的分区表, 用于指导后续各分区镜像烧入过程和 系统运行。  [0015] The most critical idea of the present invention is: according to the distribution of bad blocks, the space occupied by the bad blocks of the area is added in each area in the preset partition table, and a new partition table is set to guide the mirroring of the subsequent partitions. Into the process and system operation.
[0016] 请参照图 1和图 2, 本发明提供一种用于 NANDFLASH生产阶段的烧写方法, 包 括以下步骤:  Referring to FIG. 1 and FIG. 2, the present invention provides a method for programming a NANDFLASH production stage, which includes the following steps:
[0017] SI : PC端烧片程序发送终端烧片程序到终端的 NANDFLASH中;  [0017] SI: the PC-side burning program sends the terminal burning program to the NANDFLASH of the terminal;
[0018] S2: 所述终端烧片程序检测 NANDFLASH中的坏块分布, 发送所述坏块分布到 PC端烧片程序; [0018] S2: the terminal burning program detects a bad block distribution in the NANDFLASH, and sends the bad block distribution to a PC end burning program;
[0019] S3: PC端烧片程序根据收到的坏块分布和预置的第一分区表, 所述第一分区 表描述每个分区实际需要使用的区域大小; 算出每个分区实际占用的区域大小 [0019] S3: the PC-side burning program according to the received bad block distribution and the preset first partition table, the first partition table describes the size of the area that each partition actually needs to use; Area size
, 从而生成用于这个分区的第二分区表; , thereby generating a second partition table for this partition;
[0020] S4: PC端烧片程序根据第二分区表依次在终端的 NANDFLASH中烧写入每个 分区的镜像。 烧片程序烧片程序烧片程序  [0020] S4: The PC-side burning program sequentially writes a mirror of each partition in the NANDFLASH of the terminal according to the second partition table. Burning program
[0021] 上述用于 NANDFLASH生产阶段的烧写方法中, 根据所需烧入 NANDFLASH中 的镜像在 PC端烧片程序中预置分区表, 通过终端执行 PC端发送的烧片程序检测 NANDFLASH中的坏块分布, 再根据坏块分布情况在预置的分区表中的各区内 加上该区坏块占用的空间, 设置新的分区表, 用于指导后续各分区镜像烧入过 程和系统运行; 这种方式避免了固定分区表带来的部分终端无法使用或 NANDF LASH空间利用率下降的问题, 既保证了生产质量, 又提高了存储空间利用率, 控制了成本。 [0021] In the above-mentioned programming method for the NANDFLASH production stage, the partition table is preset in the PC-side burning program according to the image to be burned into the NANDFLASH, and the burning program program sent by the PC is detected by the terminal to detect the NANDFLASH. Bad block distribution, according to the distribution of bad blocks, the space occupied by the bad blocks in the area is added to each area in the preset partition table, and a new partition table is set to guide the subsequent image burning process and system operation of each partition; This way, some terminals that are brought by the fixed partition table are not used or NANDF is avoided. The problem of reduced LASH space utilization not only ensures the quality of production, but also improves the utilization of storage space and controls the cost.
[0022] 进一步的, 所述步骤 S1中 PC端烧片程序在 Linux操作系统下运行。  [0022] Further, in the step S1, the PC-side burning program runs under the Linux operating system.
[0023] Linux是幵放源代码的操作系统, 除了 Kernel免费以外, 它的许多系统程序也是 自由软件, 可以从网上免费获得。  [0023] Linux is an operating system that releases source code. In addition to Kernel free, many of its system programs are free software and are available for free from the Internet.
[0024] 进一步的, 所述步骤 S4中 PC端烧片程序将第二分区表通过加入 Uboot环境变量 分区, 生成分区镜像, 并写入终端的 NANDFLASH。  [0024] Further, in the step S4, the PC-side burning program adds the second partition table to the Uboot environment variable partition to generate a partition mirror and writes the NANDFLASH of the terminal.
[0025] Uboot是 Universal Boot Loader的缩写, 是遵循 GPL条款的幵放源代码项目, 其 源码目录、 编译形式与 Linux内核很相似, 不少 Uboot源代码就是根据相应的 Linu X内核源程序进行简化形成的, Uboot是在操作系统运行前执行的一小段程序, 通过它初始化硬件设备, 建立适当的硬软件环境, 为最终调用操作系统内核做 好准备。  [0025] Uboot is the abbreviation of Universal Boot Loader. It is a source code project that complies with the GPL. Its source directory and compiled form are similar to the Linux kernel. Many Uboot source code is simplified according to the corresponding Linu X kernel source. Formed, Uboot is a small program executed before the operating system runs. It initializes the hardware device and establishes an appropriate hardware and software environment to prepare for the final call of the operating system kernel.
[0026] 进一步的, 所述步骤 S1中 PC端通过 USB连接终端, 发送终端烧片程序到终端的 NANDFLASH中。  [0026] Further, in the step S1, the PC end connects the terminal through the USB, and sends the terminal burning program to the NANDFLASH of the terminal.
[0027] USB连接方式具有可以热拔插、 携带方便、 标准统一、 可连接多个设备的特点 [0027] The USB connection mode has the characteristics of being hot-swappable, portable, standard, and capable of connecting multiple devices.
, 广泛用于 PC端与外设端的连接, 同样适用于 PC端与终端的连接。 It is widely used for connection between PC and peripheral, and is also suitable for connection between PC and terminal.
[0028] 进一步的, 所述步骤 S3中 PC端烧片程序根据收到的坏块分布和预置的第一分 区表, 在所述第一分区表中的各区内加上该区内坏块占用的区域大小, 算出每 个分区实际占用的区域大小, 从而生成第二分区表。 [0028] Further, in step S3, the PC-side burning program adds a bad block in the area in each area in the first partition table according to the received bad block distribution and the preset first partition table. The size of the occupied area, calculate the size of the area actually occupied by each partition, and generate a second partition table.
[0029] 根据 NANDFLASH中坏块的分布, 在预置的分区表中相应的区内加上坏块占用 的空间, 在保证各区空间利用最大化、 节约成本的同吋, 保证各分区的镜像能 够完整烧写入 NANDFLASH。 [0029] According to the distribution of bad blocks in the NANDFLASH, the space occupied by the bad blocks is added in the corresponding area of the preset partition table, and the mirroring of each partition can be ensured while ensuring the space utilization of each area is maximized and the cost is saved. Complete burn write to NANDFLASH.
[0030] 进一步的, 所述步骤 S4中依次在终端的 NANDFLASH中烧写入每个分区的镜像 后, 启动终端, 操作系统按照第二分区表依次加载相应的镜像运行。 [0030] Further, in the step S4, the mirror of each partition is sequentially written in the NANDFLASH of the terminal, and the terminal is started, and the operating system sequentially loads the corresponding mirror operation according to the second partition table.
[0031] 根据 NANDFLASH坏块分布情况重设的分区表, 在 NANDFLASH中烧写入镜像 后, 启动终端, 操作系统能够成功加载相应的镜像运行, 说明镜像的烧写是完 整的。 [0031] According to the partition table resetted by the NANDFLASH bad block distribution, after the image is written in the NANDFLASH, the terminal is started, and the operating system can successfully load the corresponding image operation, indicating that the image is completely written.
[0032] 一种用于 NANDFLASH生产阶段的烧写系统, 包括: [0033] 发送模块: 用于发送 PC端的烧片程序到终端的 NANDFLASH中; [0032] A programming system for a NANDFLASH production stage, comprising: [0033] sending module: used to send a burning program of the PC end to the NANDFLASH of the terminal;
[0034] 检测模块: 用于检测 NANDFLASH中的坏块分布, 并发送到 PC端; [0034] detecting module: configured to detect a bad block distribution in the NANDFLASH, and send to the PC end;
[0035] 分区表生成模块: 用于根据 PC端烧片程序根据收到的坏块分布和预置的第一分 区表, 算出每个分区实际占用的区域大小, 从而生成用于这个分区的第二分区 表;  [0035] a partition table generation module: configured to calculate, according to the received bad block distribution and the preset first partition table, the size of the area actually occupied by each partition according to the PC-side burning program, thereby generating a Second partition table
[0036] 烧写模块: 用于根据第二分区表依次在终端的 NANDFLASH中烧写入每个分区 的镜像。  [0036] The programming module is configured to sequentially write a mirror of each partition in the NANDFLASH of the terminal according to the second partition table.
[0037] 进一步的, 用于 NANDFLASH生产阶段的烧写系统还包括 PC端烧写程序运行 模块, 用于在 Linux操作系统下运行所述 PC端烧写程序。  [0037] Further, the programming system for the NANDFLASH production stage further includes a PC-side programming program running module, configured to run the PC-side programming program under the Linux operating system.
[0038] 进一步的, 用于 NANDFLASH生产阶段的烧写系统还包括镜像生成模块, 用于 将第二分区表通过加入 Uboot环境变量分区, 生成分区镜像。 [0038] Further, the programming system for the NANDFLASH production stage further includes a mirror generation module, configured to generate a partition mirror by adding a second partition table to the Uboot environment variable partition.
[0039] 进一步的, 用于 NANDFLASH生产阶段的烧写系统还包括镜像运行模块, 用于 在操作系统中按照第二分区表依次加载相应的镜像运行。 [0039] Further, the programming system for the NANDFLASH production stage further includes a mirroring running module, configured to sequentially load the corresponding mirroring operation according to the second partition table in the operating system.
[0040] 实施例 1 Embodiment 1
[0041] 请参照图 1, 一种用于 NANDFLASH生产阶段的烧写方法, 包括以下步骤: [0042] SI : PC端通过 USB连接终端, PC端烧片程序发送终端烧片程序到终端的 NAN [0041] Please refer to FIG. 1, a programming method for the NANDFLASH production stage, including the following steps: [0042] SI: The PC end connects to the terminal through the USB, and the PC end burning program sends the terminal burning program to the NAN of the terminal.
DFLASH中, 所述 PC端烧片程序在 Linux操作系统下运行; In DFLASH, the PC-side burning program runs under the Linux operating system;
[0043] S2: 所述终端烧片程序检测 NANDFLASH中的坏块分布, 发送所述坏块分布到[0043] S2: the terminal burning program detects a bad block distribution in the NANDFLASH, and sends the bad block distribution to
PC端烧片程序; PC end burning program;
[0044] S3: PC端烧片程序根据收到的坏块分布和预置的第一分区表, 在所述第一分 区表中的各区内加上该区内坏块占用的区域大小, 算出每个分区实际占用的区 域大小, 从而生成第二分区表;  [0044] S3: the PC-side burning program adds the size of the area occupied by the bad block in the area in each area in the first partition table according to the received bad block distribution and the preset first partition table, and calculates The size of the area actually occupied by each partition, thereby generating a second partition table;
[0045] S4: PC端烧片程序将第二分区表通过加入 Uboot环境变量分区, 生成分区镜像 , 并写入终端的 NANDFLASH; 依次在终端的 NANDFLASH中烧写入每个分区 的镜像后, 启动终端, 操作系统按照第二分区表依次加载相应的镜像运行。 [0045] S4: The PC-side burning program divides the second partition table into a Uboot environment variable partition, generates a partition mirror, and writes the NANDFLASH of the terminal; sequentially writes a mirror of each partition in the NANDFLASH of the terminal, and then starts The terminal, the operating system sequentially loads the corresponding mirror operation according to the second partition table.
[0046] 请参照图 2, 一种用于 NANDFLASH生产阶段的烧写系统, 包括: [0046] Referring to FIG. 2, a programming system for a NANDFLASH production stage includes:
[0047] 发送模块: 用于发送 PC端的烧片程序到终端的 NANDFLASH中; [0047] sending module: used to send a burning program of the PC end to the NANDFLASH of the terminal;
[0048] 检测模块: 用于检测 NANDFLASH中的坏块分布, 并发送到 PC端; [0049] 分区表生成模块: 用于根据 PC端烧片程序根据收到的坏块分布和预置的第一分 区表, 算出每个分区实际占用的区域大小, 从而生成用于这个分区的第二分区 表。 [0048] detecting module: configured to detect a bad block distribution in the NANDFLASH, and send to the PC end; [0049] a partition table generating module: configured to calculate, according to the received bad block distribution and the preset first partition table, the size of the area actually occupied by each partition according to the PC-side burning program, thereby generating a Two partition table.
[0050] 综上所述, 本发明提供的一种 NANDFLASH生产阶段的烧写方法, 根据所需烧 入 NANDFLASH中的镜像在 PC端烧片程序中预置分区表, 通过终端执行 PC端发 送的烧片程序检测 NANDFLASH中的坏块分布, 再根据坏块分布情况在预置的 分区表中的各区内加上该区坏块占用的空间, 设置新的分区表, 用于指导后续 各分区镜像烧入过程和系统运行; 这种方式避免了固定分区表带来的部分终端 无法使用或 NANDFLASH空间利用率下降的问题, 既保证了生产质量, 又提高 了存储空间利用率, 控制了成本。  [0050] In summary, the method for programming a NANDFLASH production stage provided by the present invention pre-sets a partition table in a PC-side burning program according to a mirror that needs to be burned into the NANDFLASH, and performs a PC-side transmission through the terminal. The burning program detects the distribution of bad blocks in NANDFLASH, and then adds the space occupied by the bad blocks in the area in the preset partition table according to the distribution of bad blocks, and sets a new partition table for guiding subsequent partition mirrors. The burning process and the system operation; this way avoids the problem that some terminals caused by the fixed partition table cannot be used or the NANDFLASH space utilization rate is reduced, which not only ensures the production quality, but also improves the utilization of the storage space and controls the cost.
[0051] Linux是幵放源代码的操作系统, 除了 Kernel免费以外, 它的许多系统程序也是 自由软件, 可以从网上免费获得。  [0051] Linux is an open source operating system. In addition to Kernel free, many of its system programs are free software and are available for free from the Internet.
[0052] Uboot是 Universal Boot Loader的缩写, 是遵循 GPL条款的幵放源代码项目, 其 源码目录、 编译形式与 Linux内核很相似, 不少 Uboot源代码就是根据相应的 Linu X内核源程序进行简化形成的, Uboot是在操作系统运行前执行的一小段程序, 通过它初始化硬件设备, 建立适当的硬软件环境, 为最终调用操作系统内核做 好准备。  [0052] Uboot is the abbreviation of Universal Boot Loader. It is a source code project that complies with the GPL. Its source directory and compiled form are similar to the Linux kernel. Many Uboot source code is simplified according to the corresponding Linu X kernel source. Formed, Uboot is a small program executed before the operating system runs. It initializes the hardware device and establishes an appropriate hardware and software environment to prepare for the final call of the operating system kernel.
[0053] USB连接方式具有可以热拔插、 携带方便、 标准统一、 可连接多个设备的特点 [0053] The USB connection mode has the characteristics of being hot-swappable, portable, standard, and capable of connecting multiple devices.
, 广泛用于 PC端与外设端的连接, 同样适用于 PC端与终端的连接。 It is widely used for connection between PC and peripheral, and is also suitable for connection between PC and terminal.
[0054] 根据 NANDFLASH中坏块的分布, 在预置的分区表中相应的区内加上坏块占用 的空间, 在保证各区空间利用最大化、 节约成本的同吋, 保证各分区的镜像能 够完整烧写入 NANDFLASH。 [0054] According to the distribution of bad blocks in the NANDFLASH, the space occupied by the bad blocks is added in the corresponding area of the preset partition table, and the mirroring of each partition can be ensured in the same space to ensure the space utilization of each area and the cost saving. Complete burn write to NANDFLASH.
[0055] 根据 NANDFLASH坏块分布情况重设的分区表, 在 NANDFLASH中烧写入镜像 后, 启动终端, 操作系统能够成功加载相应的镜像运行, 说明镜像的烧写是完 整的。 [0055] According to the partition table resetted by the NANDFLASH bad block distribution, after the image is written in the NANDFLASH, the terminal is started, and the operating system can successfully load the corresponding image operation, indicating that the image is completely written.
[0056]  [0056]

Claims

权利要求书 Claim
[权利要求 1] 一种用于 NANDFLASH生产阶段的烧写方法, 其特征在于, 包括以下 步骤:  [Claim 1] A method for programming a NANDFLASH production stage, comprising the steps of:
SI : PC端烧片程序发送终端烧片程序到终端的 NANDFLASH中; S2: 所述终端烧片程序检测 NANDFLASH中的坏块分布, 发送所述 坏块分布到 PC端烧片程序;  SI: the PC-side burning program sends the terminal burning program to the NANDFLASH of the terminal; S2: the terminal burning program detects the bad block distribution in the NANDFLASH, and sends the bad block distribution to the PC-side burning program;
S3: PC端烧片程序根据收到的坏块分布和预置的第一分区表, 所述 第一分区表描述每个分区实际需要使用的区域大小; 算出每个分区实 际占用的区域大小, 从而生成用于这个分区的第二分区表;  S3: The PC-side burning program according to the received bad block distribution and the preset first partition table, the first partition table describes the size of the area actually needed for each partition; and calculates the size of the area actually occupied by each partition, Thereby generating a second partition table for this partition;
S4: PC端烧片程序根据第二分区表依次在终端的 NANDFLASH中烧 写入每个分区的镜像。  S4: The PC-side burning program sequentially burns the image of each partition in the NANDFLASH of the terminal according to the second partition table.
[权利要求 2] 根据权利要求 1所述的用于 NANDFLASH生产阶段的烧写方法, 其特 征在于, 所述步骤 S 1中 PC端烧片程序在 Linux操作系统下运行。  [Claim 2] The programming method for the NANDFLASH production stage according to claim 1, wherein the PC-side burning program in the step S1 is run under the Linux operating system.
[权利要求 3] 根据权利要求 1所述的用于 NANDFLASH生产阶段的烧写方法, 其特 征在于, 所述步骤 S4中 PC端烧片程序将第二分区表通过加入 Uboot环 境变量分区, 生成分区镜像, 并写入终端的 NANDFLASH。  [Claim 3] The method for programming a NANDFLASH production stage according to claim 1, wherein in the step S4, the PC-side burning program divides the second partition table by adding a Uboot environment variable partition to generate a partition. Mirror, and write to the terminal's NANDFLASH.
[权利要求 4] 根据权利要求 1所述的用于 NANDFLASH生产阶段的烧写方法, 其特 征在于, 所述步骤 S1中 PC端通过 USB连接终端, 发送终端烧片程序 SJ终端的 NANDFLASH中。  [Claim 4] The programming method for the NANDFLASH production stage according to claim 1, wherein in the step S1, the PC end is connected to the NANDFLASH of the terminal burning program SJ terminal through the USB connection terminal.
[权利要求 5] 根据权利要求 1所述的用于 NANDFLASH生产阶段的烧写方法, 其特 征在于, 所述步骤 S3中 PC端烧片程序根据收到的坏块分布和预置的 第一分区表, 在所述第一分区表中的各区内加上该区内坏块占用的区 域大小, 算出每个分区实际占用的区域大小, 从而生成第二分区表。  [Claim 5] The method for programming a NANDFLASH production stage according to claim 1, wherein the PC-side burning program in the step S3 is based on the received bad block distribution and the preset first partition. The table adds the size of the area occupied by the bad block in the area in the first partition table, and calculates the size of the area actually occupied by each partition, thereby generating a second partition table.
[权利要求 6] 根据权利要求 1所述的用于 NANDFLASH生产阶段的烧写方法, 其特 征在于, 所述步骤 S4中依次在终端的 NANDFLASH中烧写入每个分 区的镜像后, 启动终端, 操作系统按照第二分区表依次加载相应的镜 像运行。  [Claim 6] The method for programming a NANDFLASH production stage according to claim 1, wherein in the step S4, the mirror of each partition is sequentially written in the NANDFLASH of the terminal, and the terminal is started. The operating system loads the corresponding image run in turn according to the second partition table.
[权利要求 7] —种用于 NANDFLASH生产阶段的烧写系统, 其特征在于, 包括: 发送模块: 用于发送终端烧片程序到终端的 NANDFLASH中; 检测模块: 用于检测 NANDFLASH中的坏块分布, 并发送到 PC端; 分区表生成模块: 用于根据 PC端烧片程序程序根据收到的坏块分布 和预置的第一分区表, 算出每个分区实际占用的区域大小, 从而生成 用于这个分区的第二分区表; [Claim 7] A programming system for a NANDFLASH production stage, comprising: Transmitting module: used for transmitting the terminal burning program to the NANDFLASH of the terminal; detecting module: for detecting the bad block distribution in the NANDFLASH and transmitting to the PC end; the partition table generating module: for using the PC-based burning program according to the program Receiving the bad block distribution and the preset first partition table, calculating the size of the area actually occupied by each partition, thereby generating a second partition table for the partition;
烧写模块: 用于根据第二分区表依次在终端的 NANDFLASH中烧写入 每个分区的镜像。 The programming module is configured to sequentially write a mirror of each partition in the NANDFLASH of the terminal according to the second partition table.
根据权利要求 7所述的用于 NANDFLASH生产阶段的烧写系统, 其特 征在于, 还包括 PC端烧写程序运行模块, 用于在 Linux操作系统下运 行所述 PC端烧写程序。 The programming system for a NANDFLASH production stage according to claim 7, further comprising a PC-side programming program running module for operating the PC-side programming program under a Linux operating system.
根据权利要求 7所述的用于 NANDFLASH生产阶段的烧写系统, 其特 征在于, 还包括镜像生成模块, 用于将第二分区表通过加入 Uboot环 境变量分区, 生成分区镜像。 The programming system for a NANDFLASH production stage according to claim 7, further comprising: a mirror generation module, configured to generate a partition mirror by adding a second partition table to the Uboot environment variable partition.
根据权利要求 7所述的用于 NANDFLASH生产阶段的烧写系统, 其特 征在于, 还包括镜像运行模块, 用于在操作系统中按照第二分区表依 次加载相应的镜像运行。 The programming system for the NANDFLASH production stage of claim 7, further comprising a mirroring running module for sequentially loading the corresponding mirroring operation in the operating system according to the second partitioning table.
PCT/CN2017/097818 2016-08-31 2017-08-17 Write method and write system utilized in nand flash production WO2018040924A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610785837.0A CN106339246A (en) 2016-08-31 2016-08-31 Programming method and programming system used in production phase of NANDFLASH
CN201610785837.0 2016-08-31

Publications (1)

Publication Number Publication Date
WO2018040924A1 true WO2018040924A1 (en) 2018-03-08

Family

ID=57822353

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/097818 WO2018040924A1 (en) 2016-08-31 2017-08-17 Write method and write system utilized in nand flash production

Country Status (2)

Country Link
CN (1) CN106339246A (en)
WO (1) WO2018040924A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106339246A (en) * 2016-08-31 2017-01-18 福建联迪商用设备有限公司 Programming method and programming system used in production phase of NANDFLASH

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102999436A (en) * 2012-11-28 2013-03-27 华为终端有限公司 Method and device for generating dynamic partition information in Nand flash memory
CN103049298A (en) * 2013-01-17 2013-04-17 四川省安全科学技术研究院 Nandflash burning writing method
CN106339246A (en) * 2016-08-31 2017-01-18 福建联迪商用设备有限公司 Programming method and programming system used in production phase of NANDFLASH

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100337285C (en) * 2004-07-13 2007-09-12 海信集团有限公司 A system for simulating physical damage of NAND flash memory and method thereof
CN202404205U (en) * 2011-12-31 2012-08-29 成都因纳伟盛科技股份有限公司 Low-cost and high-efficiency bad block detection tool for Flash chips
TWI515733B (en) * 2013-12-27 2016-01-01 緯創資通股份有限公司 Method for programming flash memory and computer-readable medium
CN105702300B (en) * 2016-01-11 2018-10-16 浙江大学 A kind of NAND Flash tolerant systems based on FPGA

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102999436A (en) * 2012-11-28 2013-03-27 华为终端有限公司 Method and device for generating dynamic partition information in Nand flash memory
CN103049298A (en) * 2013-01-17 2013-04-17 四川省安全科学技术研究院 Nandflash burning writing method
CN106339246A (en) * 2016-08-31 2017-01-18 福建联迪商用设备有限公司 Programming method and programming system used in production phase of NANDFLASH

Also Published As

Publication number Publication date
CN106339246A (en) 2017-01-18

Similar Documents

Publication Publication Date Title
US11042297B2 (en) Techniques to configure a solid state drive to operate in a storage mode or a memory mode
JP2020074079A (en) Extended usage range for memory apparatus
US20170228160A1 (en) Method and device to distribute code and data stores between volatile memory and non-volatile memory
WO2018157588A1 (en) Firmware burning method, system, computer device and storage medium
JP2012069100A (en) Dynamic allocation of electric power budget of system having nonvolatile memory
US20100169546A1 (en) Flash memory access circuit
JP5422652B2 (en) Avoiding self-eviction due to dynamic memory allocation in flash memory storage
US20040193864A1 (en) System and method for actively booting a computer system
US10769074B2 (en) Computer memory content movement
CN115658160B (en) Multi-operating system upgrading method, device and system based on multi-core heterogeneous SOC
JP2017527877A (en) Method and apparatus for reading / writing data from / to flash memory and user equipment
TW201945920A (en) Status management in storage backed memory package
US10025598B2 (en) Storage device, booting procedure acceleration method and storage controller
CN110825421B (en) Firmware upgrading method, system and readable storage medium
US9904622B2 (en) Control method for non-volatile memory and associated computer system
JP2016167215A (en) Memory device
KR102116096B1 (en) Multisystem, and method of booting the same
US20150261616A1 (en) Method of controlling memory swap operation and data processing system using same
KR20140073955A (en) Memory system and method for operating the same
WO2018040924A1 (en) Write method and write system utilized in nand flash production
KR20110078171A (en) Bootable volatile memory appratus, memory module having it, and processing system, and method for booting processing system using it
US20170083235A1 (en) Device capable of using external volatile memory and device capable of releasing internal volatile memory
US9916103B2 (en) Memory control device, memory device, and memory control method
TW201409468A (en) Memory data managing system and method
CN111045962B (en) SD card data confidentiality method, system, equipment and computer medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17845226

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17845226

Country of ref document: EP

Kind code of ref document: A1