[go: up one dir, main page]

CN101814009B - Flash device, data storage system and method for transmitting special command to flash device - Google Patents

Flash device, data storage system and method for transmitting special command to flash device Download PDF

Info

Publication number
CN101814009B
CN101814009B CN2009100466176A CN200910046617A CN101814009B CN 101814009 B CN101814009 B CN 101814009B CN 2009100466176 A CN2009100466176 A CN 2009100466176A CN 200910046617 A CN200910046617 A CN 200910046617A CN 101814009 B CN101814009 B CN 101814009B
Authority
CN
China
Prior art keywords
flash memory
memory device
command
sign indicating
symbol
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN2009100466176A
Other languages
Chinese (zh)
Other versions
CN101814009A (en
Inventor
李维卿
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huiguo (Shanghai) Software Technology Co Ltd
Silicon Motion Inc
Original Assignee
Huiguo (Shanghai) Software Technology Co Ltd
Silicon Motion Inc
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 Huiguo (Shanghai) Software Technology Co Ltd, Silicon Motion Inc filed Critical Huiguo (Shanghai) Software Technology Co Ltd
Priority to CN2009100466176A priority Critical patent/CN101814009B/en
Publication of CN101814009A publication Critical patent/CN101814009A/en
Application granted granted Critical
Publication of CN101814009B publication Critical patent/CN101814009B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本发明提供一种闪存装置、资料储存系统、以及传送特殊命令至闪存装置的方法。于一实施例中,该闪存装置与一主机相耦接,且该闪存装置包括一闪存以及一控制器。该闪存储存多个文件,并储存一命令-符码对应表,其中每一文件具有一相对应的数字,该命令-符码对应表纪录多个符码与多个命令的对应关系,且每一符码由多个数字所组成。该控制器自该主机接收一连串存取命令,当所述存取命令是存取所述多个文件时,依序产生所述存取命令所存取的文件所对应的多个数字而形成一数字串,依据该命令-符码对应表转换该数字串为对应的多个特殊命令,并依据所述多个特殊命令执行对应的动作。

Figure 200910046617

The invention provides a flash memory device, a data storage system, and a method for sending special commands to the flash memory device. In one embodiment, the flash memory device is coupled to a host, and the flash memory device includes a flash memory and a controller. The flash memory stores a plurality of files, and stores a command-symbol correspondence table, wherein each file has a corresponding number, and the command-symbol correspondence table records the correspondence between a plurality of symbols and a plurality of commands, and each A code is composed of multiple numbers. The controller receives a series of access commands from the host, and when the access command accesses the plurality of files, sequentially generates a plurality of numbers corresponding to the files accessed by the access command to form a The number string is converted into corresponding multiple special commands according to the command-symbol code correspondence table, and corresponding actions are executed according to the multiple special commands.

Figure 200910046617

Description

闪存装置、资料储存系统、以及传送特殊命令至闪存装置的方法Flash memory device, data storage system, and method for sending special commands to flash memory device

技术领域 technical field

本发明是有关于存储器,特别是有关于闪存(flash memory)。The present invention relates to memory, in particular to flash memory (flash memory).

背景技术 Background technique

闪存为一种可由电编程及清除其资料的非挥发性存储器。闪存主要用来作存储卡及通用串行总线(Universal Serial Bus,USB)装置,以供电脑及其他数字产品的一般性资料储存。闪存的制造成本远低于电气可擦拭可编程只读存储器(Electrically-Erasable Programmable Read-Only Memory,EEPROM)的成本,因此成为市场上的主流产品。闪存的应用范围包括掌上型电脑(PDA)、笔记本电脑、数字音乐播放器、数码相机、以及移动电话。Flash memory is a non-volatile memory that can be programmed and erased electrically. Flash memory is mainly used as a memory card and a Universal Serial Bus (USB) device for general data storage of computers and other digital products. The manufacturing cost of flash memory is much lower than the cost of Electrically Erasable Programmable Read-Only Memory (EEPROM), so it has become a mainstream product in the market. Applications for flash memory include PDAs, notebook computers, digital music players, digital cameras, and mobile phones.

一般而言,闪存是包含于一独立的资料储存装置中以供储存资料,该资料储存装置称之为闪存装置,例如前述的存储卡。闪存装置再耦接到一主机上,以为该主机储存资料,其中该主机可为电脑、数码相机、或数字音乐播放器。当主机需存取闪存时,主机直接发送命令至闪存装置,再由闪存装置的控制器依据由主机所收到的命令存取闪存。Generally speaking, the flash memory is included in an independent data storage device for storing data, and the data storage device is called a flash memory device, such as the aforementioned memory card. The flash memory device is coupled to a host to store data for the host, wherein the host can be a computer, a digital camera, or a digital music player. When the host needs to access the flash memory, the host directly sends a command to the flash memory device, and then the controller of the flash memory device accesses the flash memory according to the command received by the host.

然而,为了种种原因,主机有时必须要求闪存装置执行具有特定功能的特殊动作。例如,厂商为了对刚产出的闪存装置产品进行检测,而启动闪存装置的自我测试功能。再举一例,厂商为了对送修的闪存装置产品进行故障排除,而启动闪存装置的自我修复功能。由于在一般情况下,闪存装置并不会执行此类特定功能,因此主机必须经由非正常的模式发送命令给闪存,以避免闪存于平时错误的启动特殊动作的执行。因此,需要一种传送特殊命令至闪存装置的方法,以使闪存装置依据特殊命令执行对应的特殊动作。However, for various reasons, the host must sometimes require the flash memory device to perform special actions with specific functions. For example, the manufacturer activates the self-test function of the flash memory device in order to test the newly produced flash memory device product. As another example, the manufacturer activates the self-repair function of the flash memory device in order to troubleshoot the product of the flash memory device sent for repair. Because in general, the flash memory device does not perform such specific functions, the host must send commands to the flash memory in an abnormal mode, so as to prevent the flash memory from erroneously starting the execution of special actions in normal times. Therefore, there is a need for a method for transmitting special commands to the flash memory device, so that the flash memory device performs corresponding special actions according to the special commands.

发明内容 Contents of the invention

有鉴于此,本发明的目的在于提供一种传送特殊命令至闪存装置的方法,以解决现有技术存在的问题。于一实施例中,该闪存装置与一主机相耦接。首先,于该闪存装置储存多个文件,每一这些文件具有一相对应的数字。接着,于该闪存装置储存一命令-符码对应表,其中该命令-符码对应表纪录多个符码与多个命令的对应关系,且每一这些符码由多个数字所组成。接着,当该主机欲传送多个特殊命令至该闪存装置时,使该主机向该闪存装置发送存取这些文件的一连串存取命令。接着,使该闪存装置依序产生这些存取命令所存取的文件对应的多个数字,而形成一第一数字串。接着使该闪存装置依据该命令-符码对应表转换该数字串为对应的多个特殊命令。最后,使该闪存装置依据这些特殊命令执行对应的动作。In view of this, the object of the present invention is to provide a method for transmitting a special command to a flash memory device, so as to solve the problems existing in the prior art. In one embodiment, the flash memory device is coupled to a host. First, a plurality of files are stored in the flash memory device, and each of these files has a corresponding number. Then, a command-symbol correspondence table is stored in the flash memory device, wherein the command-symbol correspondence table records correspondences between a plurality of symbols and a plurality of commands, and each of these symbols is composed of a plurality of numbers. Then, when the host intends to send a plurality of special commands to the flash memory device, the host computer sends a series of access commands for accessing these files to the flash memory device. Then, make the flash memory device sequentially generate a plurality of numbers corresponding to the files accessed by the access commands to form a first number string. Then make the flash memory device convert the number string into a plurality of corresponding special commands according to the command-symbol correspondence table. Finally, make the flash memory device execute corresponding actions according to these special commands.

本发明提供一种闪存装置。于一实施例中,该闪存装置与一主机相耦接,且该闪存装置包括一闪存(flash memory)以及一控制器。该闪存储存多个文件,并储存一命令-符码对应表,其中每一这些文件具有一相对应的数字,该命令-符码对应表纪录多个符码与多个命令的对应关系,且每一这些符码由多个数字所组成。该控制器自该主机接收一连串存取命令,当这些存取命令是存取这些文件时,依序产生这些存取命令所存取的文件所对应的多个数字而形成一数字串,依据该命令-符码对应表转换该数字串为对应的多个特殊命令,并依据这些特殊命令执行对应的动作。The invention provides a flash memory device. In one embodiment, the flash memory device is coupled to a host, and the flash memory device includes a flash memory and a controller. The flash memory stores a plurality of files, and stores a command-code correspondence table, wherein each of these files has a corresponding number, and the command-symbol code correspondence table records the correspondence between a plurality of symbols and a plurality of commands, and Each of these symbols consists of a number of digits. The controller receives a series of access commands from the host, and when the access commands access the files, sequentially generates a plurality of numbers corresponding to the files accessed by the access commands to form a number string, according to the The command-symbol code correspondence table converts the number string into corresponding multiple special commands, and executes corresponding actions according to these special commands.

本发明更提供一种资料储存系统。于一实施例中,该资料储存系统包括一主机以及一闪存装置。当该主机欲传送多个特殊命令至一闪存装置时,该主机向该闪存装置发送存取多个文件的一连串存取命令,其中每一这些文件具有一相对应的数字。该闪存装置储存这些文件及一命令-符码对应表,依序产生这些存取命令所存取的文件对应的多个数字而形成一第一数字串,依据该命令-符码对应表转换该数字串为对应的多个特殊命令,并依据这些特殊命令执行对应的动作。其中该命令-符码对应表纪录多个符码与多个命令的对应关系,且每一这些符码由多个数字所组成。The invention further provides a data storage system. In one embodiment, the data storage system includes a host and a flash memory device. When the host wants to send a plurality of special commands to a flash memory device, the host sends a series of access commands to the flash memory device to access a plurality of files, wherein each of these files has a corresponding number. The flash memory device stores these files and a command-code correspondence table, sequentially generates a plurality of numbers corresponding to the files accessed by these access commands to form a first number string, and converts the number according to the command-symbol correspondence table The number strings correspond to multiple special commands, and corresponding actions are executed according to these special commands. Wherein the command-symbol code correspondence table records the corresponding relationship between multiple codes and multiple commands, and each of these codes is composed of multiple numbers.

附图说明 Description of drawings

为让本发明的上述目的、特征和优点能更明显易懂,以下结合附图对本发明的具体实施方式作详细说明,其中:In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and understandable, the specific embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings, wherein:

图l为依据本发明的资料储存系统的区块图;FIG. 1 is a block diagram of a data storage system according to the present invention;

图2为依据本发明的辨识闪存装置的方法的流程图;2 is a flowchart of a method for identifying a flash memory device according to the present invention;

图3A显示文件0~N对应的数字的实施例;Figure 3A shows an embodiment of the numbers corresponding to files 0-N;

图3B显示依据本发明的命令-符码对应表的一实施例;FIG. 3B shows an embodiment of a command-symbol correspondence table according to the present invention;

图4为依据本发明的主机发送特殊命令的方法的流程图;以及Fig. 4 is the flow chart of the method for sending special command according to the host computer of the present invention; And

图5为依据本发明的闪存装置解译特殊命令的方法的流程图。FIG. 5 is a flowchart of a method for interpreting a special command by a flash memory device according to the present invention.

主要元件符号说明:Description of main component symbols:

(图1)(figure 1)

100~资料储存系统;100~data storage system;

102~主机;102~host;

104~闪存装置;104~flash memory device;

106~控制器;106~controller;

108~闪存;以及108 ~ flash memory; and

110~区块110~block

112、103~命令-符码对应表。112, 103~command-symbol code correspondence table.

具体实施方式 Detailed ways

图1为依据本发明的资料储存系统100的区块图。资料储存系统100包括主机102及闪存装置104。于一实施例中,主机102为一电脑,而闪存装置104为一存储卡。闪存装置104包括控制器106以及闪存108。闪存108储存多个文件0~N,每一这些文件0~N具有一相对应的数字。于一实施例中,文件0~文件N均储存于闪存108的一区块(block)中。图3A显示文件0~N对应的数字的实施例。文件0、文件1、文件2、…、文件8、文件9分别对应于数字0、1、2、…、8、9。因此,文件0~9可完整对应到十进位制的所有数字0~9。FIG. 1 is a block diagram of a data storage system 100 according to the present invention. The data storage system 100 includes a host 102 and a flash memory device 104 . In one embodiment, the host 102 is a computer, and the flash memory device 104 is a memory card. The flash memory device 104 includes a controller 106 and a flash memory 108 . The flash memory 108 stores a plurality of files 0-N, and each of these files 0-N has a corresponding number. In one embodiment, files 0 to N are all stored in a block of the flash memory 108 . FIG. 3A shows an embodiment of numbers corresponding to files 0-N. File 0, file 1, file 2, ..., file 8, and file 9 correspond to numbers 0, 1, 2, ..., 8, 9, respectively. Therefore, the files 0-9 can completely correspond to all numbers 0-9 in the decimal system.

控制器106控制闪存108的资料存取。当主机102欲存取闪存108中储存的资料时,主机102首先发送存取命令至控制器106。控制器106接着依据自主机102收到的存取命令存取闪存108。例如,当存取命令为写入命令时,控制器106将自主机102收到的资料写入命令中指定的闪存108的逻辑地址。当存取命令为读取命令时,控制器106依据自主机102收到的逻辑地址读取闪存108,再将读取所得的资料传递至主机102。The controller 106 controls data access of the flash memory 108 . When the host 102 wants to access data stored in the flash memory 108 , the host 102 first sends an access command to the controller 106 . The controller 106 then accesses the flash memory 108 according to the access command received from the host 102 . For example, when the access command is a write command, the controller 106 writes the data received from the host 102 into the logical address of the flash memory 108 specified in the command. When the access command is a read command, the controller 106 reads the flash memory 108 according to the logical address received from the host 102 , and then transmits the read data to the host 102 .

然而,闪存装置104除了依据主机102的一般存取命令存取其内闪存108所储存的资料以外,更可以接收主机102所发出的多个特殊命令,并执行对应这些特殊命令的动作。于递送这些特殊命令时,主机102不会直接发送至闪存装置104。相反的,主机102会向闪存装置104发送存取文件0~文件N的存取命令。此时闪存存储器装置104并不会依据存取命令而实际对于文件0~文件N进行存取,而会将存取命令解读为特殊命令,并执行对应于特殊命令的动作。主机102发送特殊命令的详细步骤将于图4说明,而闪存装置104解读特殊命令的详细步骤将于图5说明。However, in addition to accessing the data stored in the flash memory 108 according to the general access commands of the host 102, the flash memory device 104 can also receive multiple special commands issued by the host 102 and execute actions corresponding to these special commands. When delivering these special commands, the host 102 does not send directly to the flash memory device 104 . On the contrary, the host 102 sends access commands to the flash memory device 104 to access the files 0-file N. At this time, the flash memory device 104 does not actually access files 0 to N according to the access command, but interprets the access command as a special command and executes an action corresponding to the special command. The detailed steps for the host 102 to send the special command will be illustrated in FIG. 4 , and the detailed steps for the flash memory device 104 to interpret the special command will be illustrated in FIG. 5 .

图2为依据本发明的辨识闪存装置104的方法200的流程图。当一闪存装置耦接至主机102时,主机102必须辨识是否该闪存装置可接收主机102所发出的特殊命令,才能对该闪存装置发送特殊命令。否则,若闪存装置无法辨识主机102所发出的特殊命令,主机102发出的特殊命令将会被闪存装置当作一般的存取命令。当主机102检测到闪存装置104的存在时(步骤202),主机102首先读取闪存装置104(步骤204),以确定是否闪存装置104储存有文件0~文件N(步骤206)。于一实施例中,主机102借比对文件0~文件N的档案名称,以确定是否闪存装置104储存有文件0~文件N。此时,若闪存装置104储存有文件0~文件N,则主机102可确定闪存装置可接收特殊命令(步骤208)。反之,若闪存装置104并不储存有文件0~文件N,则主机102可确定闪存装置无法接收特殊命令(步骤210)。FIG. 2 is a flowchart of a method 200 for identifying a flash memory device 104 according to the present invention. When a flash memory device is coupled to the host 102, the host 102 must identify whether the flash memory device can receive the special command sent by the host 102 before sending the special command to the flash memory device. Otherwise, if the flash memory device cannot recognize the special command sent by the host 102, the special command sent by the host 102 will be regarded as a general access command by the flash memory device. When the host 102 detects the existence of the flash memory device 104 (step 202), the host 102 first reads the flash memory device 104 (step 204) to determine whether the flash memory device 104 stores files 0˜files N (step 206). In one embodiment, the host 102 determines whether the flash memory device 104 stores the files 0-file N by comparing the file names of the files 0-file N. At this time, if the flash memory device 104 stores files 0 - file N, the host 102 can determine that the flash memory device can receive special commands (step 208 ). On the contrary, if the flash memory device 104 does not store the files 0-file N, the host 102 can determine that the flash memory device cannot receive the special command (step 210).

于一实施例中,主机102与闪存110各储存有同样的命令-符码对应表103与112,以供发送与接收特殊命令的参考。图3B显示依据本发明的命令-符码对应表350的一实施例。命令-符码对应表350纪录多个符码(symbol)与多个命令的对应关系。另外,每一符码由固定数目的多个数字(digit)所组成。假设一符码由两个十进位数字组成,由于两个十进位数字共有10×10=100种组合,因此共有00~99等100种符码可表示100种特殊命令。举例来说,命令-符码对应表350中的符码18由数字1及数字8组成,表示一传送密码命令。命令-符码对应表350中的符码99由数字9及数字9组成,表示一传送资料结束命令。In one embodiment, the host 102 and the flash memory 110 each store the same command-symbol table 103 and 112 for reference in sending and receiving special commands. FIG. 3B shows an embodiment of a command-symbol correspondence table 350 according to the present invention. The command-symbol correspondence table 350 records the correspondence between multiple symbols and multiple commands. In addition, each symbol is composed of a fixed number of digits. Assuming that a symbol code is made up of two decimal digits, since the two decimal digits have 10×10=100 combinations, there are 100 kinds of symbol codes such as 00~99 to represent 100 special commands. For example, the symbol 18 in the command-symbol mapping table 350 is composed of a number 1 and a number 8, which represents a password transmission command. The code 99 in the command-code correspondence table 350 is composed of the number 9 and the number 9, and represents a data transmission end command.

图4为依据本发明的主机发送特殊命令的方法400的流程图。当主机102欲传送一特殊命令至闪存装置104时,主机102便依据方法400向闪存装置104发送存取文件0~文件9的一连串存取命令。首先,主机依据图3B的命令-符码对应表350转换该特殊命令为对应的一符码,其中该符码包括第一数字与第二数字(步骤402)。接着,主机102向闪存装置104发送写入对应第一数字的文件0~9的写入命令(步骤404),再向闪存装置104发送写入对应第二数字的文件0~9的写入命令(步骤406)。FIG. 4 is a flowchart of a method 400 for a host to send a special command according to the present invention. When the host 102 intends to send a special command to the flash memory device 104 , the host 102 sends a series of access commands to the flash memory device 104 according to the method 400 for accessing files 0 - 9 . First, the host converts the special command into a corresponding symbol according to the command-symbol correspondence table 350 in FIG. 3B , wherein the symbol includes a first number and a second number (step 402 ). Next, the host 102 sends to the flash memory device 104 a write command for writing files 0-9 corresponding to the first number (step 404), and then sends a write command for writing files 0-9 corresponding to the second number to the flash memory device 104 (step 406).

此时,若该特殊命令不需传送资料(步骤408),则特殊命令已传送完毕。反之,若该特殊命令需一并传送资料(步骤408),则主机102依序向闪存装置104发送读取对应该资料的多个数字的文件0~9的读取命令(步骤410)。当该资料的数字皆已传送完毕后(步骤412),主机102更向闪存装置104发送两次写入的文件9的命令(步骤414),以表示传送资料结束。上述的方法400中,主机102是以发送写入命令的方式传送命令的符码包含的数字,而以发送读取命令的方式传送命令的资料包含的数字。于另一实施例中,主机102以发送读取命令的方式传送命令的符码包含的数字,而以发送写入命令的方式传送命令的资料包含的数字。At this time, if the special command does not need to transmit data (step 408), the special command has been transmitted. Conversely, if the special command needs to transmit data together (step 408), the host 102 sequentially sends a read command to read files 0-9 corresponding to a plurality of numbers of the data to the flash memory device 104 (step 410). After all the numbers of the data have been transmitted (step 412), the host computer 102 further sends the command to write the file 9 twice to the flash memory device 104 (step 414), to indicate the end of data transmission. In the above method 400, the host 102 transmits the number contained in the symbol code of the command by sending the write command, and transmits the number contained in the data of the command by sending the read command. In another embodiment, the host 102 transmits the number contained in the symbol code of the command by sending a read command, and transmits the number contained in the data of the command by sending a write command.

举例来说,假设主机102欲发送第3B图的命令-符码对应表350中的传送密码命令,而传送密码命令对应于符码18。因此,主机102首先向闪存装置104发送写入对应数字1的文件1的写入命令(步骤404),再向闪存装置104发送写入对应第数字8的文件8的写入命令(步骤406)。接着,假设密码为9876,该密码将以传送密码命令的附带资料进行传送。因此主机102依序向闪存装置104发送读取对应该密码9876的数字9、数字8、数字7、及数字6的文件9、文件8、文件7、文件6的4个读取命令(步骤410)。最后,主机102再向闪存装置104发送两次写入的文件9的命令(步骤414),以表示传送资料结束。For example, assume that the host 102 wants to send the transmit password command in the command-symbol correspondence table 350 of FIG. 3B , and the transmit password command corresponds to the symbol 18 . Therefore, the host 102 first sends to the flash memory device 104 a write command to write the file 1 corresponding to the number 1 (step 404), and then sends a write command to the flash memory device 104 to write the file 8 corresponding to the number 8 (step 406) . Next, assuming that the password is 9876, the password will be sent with the accompanying data of the command to send the password. Therefore host computer 102 sends to flash memory device 104 in order to read 4 read orders of the number 9 of this password 9876, number 8, number 7 and number 6, file 9, file 8, file 7, file 6 (step 410 ). Finally, the host 102 sends the command to write the file 9 twice to the flash memory device 104 (step 414 ) to indicate the end of data transmission.

图5为依据本发明的闪存装置解译特殊命令的方法500的流程图。当闪存装置104自主机102收到存取文件0~文件9的存取命令时,便依据方法500转换这些存取命令为一特殊命令,并依据该特殊命令进行后续动作。首先,闪存装置104的控制器106自主机102接收多个存取命令(步骤502)。控制器106接着判断是否这些`存取命令对文件0~文件9进行存取(步骤504)。若这些存取命令并非对文件0~文件9进行存取,则控制器106依据存取命令以一般程序存取闪存108。若这些存取命令是对文件0~文件9进行存取,则控制器106判断是否这些存取命令是写入命令(步骤506)。FIG. 5 is a flowchart of a method 500 for interpreting special commands by a flash memory device according to the present invention. When the flash memory device 104 receives access commands for accessing files 0 - 9 from the host 102 , it converts these access commands into a special command according to the method 500 , and performs subsequent actions according to the special command. First, the controller 106 of the flash memory device 104 receives a plurality of access commands from the host 102 (step 502 ). The controller 106 then judges whether these access commands access files 0 to 9 (step 504). If the access commands do not access the files 0-9, the controller 106 accesses the flash memory 108 according to the access commands with a normal program. If these access commands are for accessing files 0 to 9, the controller 106 judges whether these access commands are write commands (step 506).

若这些存取命令是写入命令,则控制器106可判断主机102在发送特殊命令的符码。因此控制器106产生对应于这些存取命令所写入的文件的一连串的数字(步骤508),并依据命令-符码对应表305将这些数字所构成的符码转换为一特殊命令(步骤510)。于一实施例中,控制器106依据一符码数字数目分割步骤508产生的一连串的数字为多个符码,再将多个符码转换为多个特殊命令,其中该符码数字数目表示一符码所包含的数字的数目。反之,若这些存取命令是读取命令(步骤506),则控制器106可判断主机102是在发送特殊命令的资料。因此控制器106依序产生这些读取命令所读取的文件对应的多个数字,而形成一资料(步骤512)。最后,控制器106依据步骤512产生的资料执行步骤510产生的特殊命令所对应的动作。If these access commands are write commands, the controller 106 can determine that the host 102 is sending a symbol of a special command. Therefore the controller 106 produces a series of numbers (step 508) corresponding to the files written by these access commands, and converts the symbol code formed by these numbers into a special command (step 510) according to the command-symbol code correspondence table 305 ). In one embodiment, the controller 106 divides a series of numbers generated in step 508 into a plurality of symbols according to a digit number of a symbol, and then converts the plurality of symbols into a plurality of special commands, wherein the digit number of a symbol represents a The number of digits the code contains. On the contrary, if the access commands are read commands (step 506 ), the controller 106 can determine that the host 102 is sending data of special commands. Therefore, the controller 106 sequentially generates a plurality of numbers corresponding to the files read by these read commands to form a data (step 512 ). Finally, the controller 106 executes the action corresponding to the special command generated in step 510 according to the data generated in step 512 .

举例来说,闪存装置104自主机102收到6个写入文件0~9的存取命令,依序为写入文件1的写入命令、写入文件8的写入命令、以及读取文件9、文件8、文件7、文件6的4个读取命令。因此,控制器102产生写入命令所写入的文件1、文件8所对应的数字串18(步骤508),再依据命令-符码对应表305将数字串18所构成的符码转换为传送密码命令(步骤510)。接着,控制器102再产生读取命令所读取的文件9、文件8、文件7、文件6所对应的数字串9876,以得到资料9876(步骤512)。最后,控制器106便依据传送密码命令比对密码资料9876是否符合,若符合则让主机102拥有存取闪存装置104的资料的完整权限。For example, the flash memory device 104 receives 6 access commands for writing files 0-9 from the host computer 102, which are sequentially a write command for writing file 1, a write command for writing file 8, and a read file 9. Four read commands for file 8, file 7, and file 6. Therefore, the controller 102 generates the digital string 18 corresponding to the file 1 and the file 8 written in the write command (step 508), and then converts the symbol code formed by the digital string 18 into transmission according to the command-symbol correspondence table 305. Password command (step 510). Next, the controller 102 generates the number string 9876 corresponding to the file 9, file 8, file 7, and file 6 read by the read command to obtain the data 9876 (step 512). Finally, the controller 106 checks whether the password data 9876 matches according to the transmission password command, and if it matches, the host 102 has full authority to access the data of the flash memory device 104 .

虽然本发明已以较佳实施例揭示如上,然其并非用以限定本发明,任何本领域技术人员,在不脱离本发明的精神和范围内,当可作些许的修改和完善,因此本发明的保护范围当以权利要求书所界定的为准。Although the present invention has been disclosed above with preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art may make some modifications and improvements without departing from the spirit and scope of the present invention. Therefore, the present invention The scope of protection should be defined by the claims.

Claims (11)

1. method that transmits special command to flash device, this flash memory device couples mutually with a main frame, and this method comprises the following steps:
Store a plurality of files in this flash memory device, each file has a corresponding numeral;
Store an order-Fu sign indicating number corresponding tables in this flash memory device, wherein should a plurality of symbol sign indicating numbers of order-Fu sign indicating number corresponding tables record and the corresponding relation of a plurality of orders, and each symbol yard is formed by a plurality of digital;
When a plurality of special commands are sent in this main frame tendency to develop to this flash memory device, make this main frame send a succession of access command of the described a plurality of files of access to this flash memory device;
Make this flash memory device produce a plurality of numerals of the file correspondence of described access command institute access in regular turn, and form one first numeric string;
Make this flash memory device change this first numeric string and be corresponding described a plurality of special commands according to this order-Fu sign indicating number corresponding tables; And
Make this flash memory device carry out corresponding action according to described a plurality of special commands.
2. the method for transmission special command to flash device as claimed in claim 1 is characterized in that, this first numeric string to the conversion of described a plurality of special commands comprises:
When described access command is the write command that writes described a plurality of files, making this flash memory device change this first numeric string is a plurality of first symbol sign indicating numbers, and changes the described a plurality of special commands of described a plurality of first symbol sign indicating number for correspondence according to this order-Fu sign indicating number corresponding tables; And
When described access command is the reading order that reads described a plurality of files, making this flash memory device change this first numeric string is one first data.
3. the method for transmission special command to flash device as claimed in claim 2 is characterized in that, this method more comprises makes this flash memory device handle this first data.
4. the method for transmission special command to flash device as claimed in claim 2, it is characterized in that, this first numeric string comprises that to the conversion of described a plurality of first symbol sign indicating numbers cutting apart this first numeric string according to a symbol yardage number of words order is described a plurality of first symbol sign indicating number, and wherein this symbol yardage number of words order is represented the number of the numeral that a symbol sign indicating number is comprised.
5. the method for transmission special command to flash device as claimed in claim 1 is characterized in that, the transmission of described access command comprises:
Make this main frame change the second symbol sign indicating number that described a plurality of special command is a plurality of correspondences according to this order-Fu sign indicating number corresponding tables;
Make this main frame produce one second numeric string according to described a plurality of second symbol sign indicating numbers; And
Make this main frame send the described access command of access to this flash memory device in regular turn corresponding to described a plurality of files of the numeral of this second numeric string.
6. the method for transmission special command to flash device as claimed in claim 5 is characterized in that, described access command is the write command that writes described a plurality of files, and this method more comprises:
When one second data is sent in this main frame tendency to develop to this flash memory device, make this main frame send a succession of reading order of the described a plurality of files that read the numeral that is comprised corresponding to this second data to this flash memory device.
7. the method for transmission special command to flash device as claimed in claim 5 is characterized in that, described access command is the reading order that reads described a plurality of files, and this method more comprises:
When one second data is sent in this main frame tendency to develop to this flash memory device, make this main frame send a succession of write command of the described a plurality of files that write the numeral that is comprised corresponding to this second data to this flash memory device.
8. the method for transmission special command to flash device as claimed in claim 1 is characterized in that, this method more comprises:
When this main frame detected existing of this flash memory device, this main frame read this flash memory device to confirm whether to store described a plurality of file in this flash memory device;
When this flash memory device stored described a plurality of file, this flash memory device of this host acknowledgement can receive described access command; And
When this flash memory device did not store described a plurality of file, this flash memory device of this host acknowledgement can't receive described access command.
9. flash memory device, this flash memory device couples mutually with a main frame, and this flash memory device comprises:
One flash memory stores a plurality of files, and stores an order-Fu sign indicating number corresponding tables, and wherein each file has a corresponding numeral, the corresponding relation of a plurality of symbol sign indicating numbers of this order-Fu sign indicating number corresponding tables record and a plurality of orders, and each symbol sign indicating number is made up of a plurality of numerals; And
One controller, receive a succession of access command from this main frame, when described access command is the described a plurality of file of access, produce the pairing a plurality of numerals of file of described access command institute access in regular turn and form a numeric string, change this numeric string according to this order-Fu sign indicating number corresponding tables and be corresponding a plurality of special commands, and carry out corresponding action according to described a plurality of special commands.
10. flash memory device as claimed in claim 9, it is characterized in that, when described access command is when writing the write command of described a plurality of files, it is a plurality of first symbol sign indicating numbers that this controller is changed this numeric string, and changes the described a plurality of special commands of described a plurality of first symbol sign indicating number for correspondence according to this order-Fu sign indicating number corresponding tables; And when described access command be when reading the reading order of described a plurality of files, it is one first data that this controller is changed this numeric string.
11. flash memory device as claimed in claim 10, it is characterized in that, it is the described first symbol sign indicating number that this controller is cut apart this numeric string according to a symbol yardage number of words order, and to change this numeric string to the described first symbol sign indicating number, wherein this symbol yardage number of words order is represented the number of the numeral that a symbol sign indicating number is comprised.
CN2009100466176A 2009-02-25 2009-02-25 Flash device, data storage system and method for transmitting special command to flash device Active CN101814009B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2009100466176A CN101814009B (en) 2009-02-25 2009-02-25 Flash device, data storage system and method for transmitting special command to flash device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2009100466176A CN101814009B (en) 2009-02-25 2009-02-25 Flash device, data storage system and method for transmitting special command to flash device

Publications (2)

Publication Number Publication Date
CN101814009A CN101814009A (en) 2010-08-25
CN101814009B true CN101814009B (en) 2011-12-21

Family

ID=42621275

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2009100466176A Active CN101814009B (en) 2009-02-25 2009-02-25 Flash device, data storage system and method for transmitting special command to flash device

Country Status (1)

Country Link
CN (1) CN101814009B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104899070B (en) * 2015-05-19 2018-11-02 京信通信系统(中国)有限公司 Implementation method, system and the device of device command row
CN118689406B (en) * 2024-08-26 2024-11-26 珠海妙存科技有限公司 Storage device, storage device identification code and definition method thereof

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2662333Y (en) * 2003-10-27 2004-12-08 群联电子股份有限公司 Portable Multimedia Devices with Personal Computer Memory Card International Association Interface
US7316007B2 (en) * 1999-11-12 2008-01-01 Sun Microsystems, Inc. Optimization of n-base typed arithmetic expressions

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7316007B2 (en) * 1999-11-12 2008-01-01 Sun Microsystems, Inc. Optimization of n-base typed arithmetic expressions
CN2662333Y (en) * 2003-10-27 2004-12-08 群联电子股份有限公司 Portable Multimedia Devices with Personal Computer Memory Card International Association Interface

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
JP特开2000-322294A 2000.11.24

Also Published As

Publication number Publication date
CN101814009A (en) 2010-08-25

Similar Documents

Publication Publication Date Title
US9146854B2 (en) Restoring storage devices based on flash memories and related circuit, system, and method
TWI480733B (en) Data writing mehod, and memory controller and memory storage device using the same
US8954705B2 (en) Memory space management method and memory controller and memory storage device and memory storage using the same
TWI423026B (en) Data writing method, memory controller and memory storage apparatus
US8255656B2 (en) Storage device, memory controller, and data protection method
TWI479314B (en) Method of storing system data, and memory controller and memory storage apparatus using the same
TWI451248B (en) Data protecting method, memory controller and memory storage apparatus
TWI454912B (en) Data processing method, memory controller and memory storage device
CN103377129B (en) Data writing method, memory controller and memory storage device
TWI459202B (en) Data processing method, memory controller and memory storage device
TWI489272B (en) Data protecting method, and memory controller and memory storage device using the same
CN102890645B (en) Memory storage device, memory controller and data writing method
CN103578566B (en) Memory storage device and repair method thereof
CN103218300B (en) Data processing method, memory controller and memory storage device
US8966161B2 (en) Memory storage device and restoring method thereof
TWI396090B (en) Flash memory apparatus, data storage system, and method for sending special instructions to a flash memory apparatus
TWI533309B (en) Data writing method, memory storage device and memory control circuit unit
US11500721B2 (en) Solid-state disk and reading and writing method thereof
CN101814009B (en) Flash device, data storage system and method for transmitting special command to flash device
CN103106148A (en) Block management method, memory controller and memory storage device
CN103870408B (en) Data processing method, memory controller and memory storage device
CN102736985B (en) data merging method, controller and storage device
CN102467459B (en) Data writing method, memory controller and memory storage device
CN103377149B (en) Method for protecting data, memory controller and memory storage device
CN103425594B (en) Data processing method, memory controller and memory storage device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant