CN101576859A - Data writing method, memory system and controller for nonvolatile memory - Google Patents

Data writing method, memory system and controller for nonvolatile memory Download PDF

Info

Publication number
CN101576859A
CN101576859A CNA2008100962472A CN200810096247A CN101576859A CN 101576859 A CN101576859 A CN 101576859A CN A2008100962472 A CNA2008100962472 A CN A2008100962472A CN 200810096247 A CN200810096247 A CN 200810096247A CN 101576859 A CN101576859 A CN 101576859A
Authority
CN
China
Prior art keywords
write
nonvolatile memory
data
writing
unit
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.)
Pending
Application number
CNA2008100962472A
Other languages
Chinese (zh)
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.)
Phison Electronics Corp
Original Assignee
Phison Electronics Corp
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 Phison Electronics Corp filed Critical Phison Electronics Corp
Priority to CNA2008100962472A priority Critical patent/CN101576859A/en
Publication of CN101576859A publication Critical patent/CN101576859A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Read Only Memory (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

The invention relates to a data writing method for a nonvolatile memory, which comprises the following steps: firstly, executing a nonvolatile memory writing program which is stored in the nonvolatile memory in advance on a host, and managing data to be written in the nonvolatile memory through the nonvolatile memory writing program; then, executing a writing enabling instruction through the nonvolatile memory writing program to temporarily release the writing protection of the nonvolatile memory; and executing the writing instruction to write data to be written from the host to a writing unit with no recorded data in the nonvolatile memory by using the writing unit of the nonvolatile memory as a unit, wherein after finishing writing data, executing the writing protection instruction to enable the writing protection again. Thus, the nonvolatile memory can be prevented from being damaged by unexpected writing for many times.

Description

Data of nonvolatile storage wiring method, storage system and controller thereof
Technical field
The present invention is relevant for a kind of method for writing data, storage system and controller thereof, and is particularly to a kind of data of nonvolatile storage wiring method, nonvolatile memory stores system and controller thereof.
Background technology
In recent years, because digital camera, the mobile phone with camera function, MP3, and the growth of MP4 is very rapid, institute so that the consumer to the also sharply increase of demand of storage medium.Take a broad view of all now storage mediums, because nonvolatile memory (for example, flash memory (Flash Memory)) have that data are non-volatile, power saving, volume be little, and do not have characteristics such as mechanical structure, so be built in the most suitable in the above-mentioned multiple portable multimedia device of giving an example.Therefore, make that the market of flash memory is flourish.
In general, when above-mentioned be that the Portable (removable formula) of storage medium is when memory storage is coupled to host computer system with the flash memory, host computer system can be considered as external drive with this device, and directly this external disc driver is carried out access repeatedly by the file management system in the host computer system.Because the data on this type of storage medium can easily change, therefore be unsuitable for storing tool uniqueness or the nonvolatil digital content of tool.For example, system manufacturer may need the firmware code of generator to upgrade to the client, and system manufacturer can wish to use storage medium recorded this firmware code that only can write once, altered and the damage system by not clear personage to avoid firmware code.Therefore, if can develop a special write-in program of cover, can more enlarge the range of application of flash memory so that the flash memory that originally can repeat repeatedly to write and wipe only can carry out " write-once ".
In addition, in the production run of flash memory, because its technologic factor may be produced the bad flash memory that only can write few several.As mentioned above, because the market of the flash memory that need only can read is also arranged on the market, therefore if can develop the special write-in program of a cover when writing so that this badness flash memory is limited in the specific times, can will fully use former bad flash memory thus, and promote the output of flash memory.
Summary of the invention
The invention provides a kind of nonvolatile memory stores system, its performed data write-in program can prevent that nonvolatile memory from causing damage because of repeatedly writing.
The invention provides a kind of controller, its performed write-in program can prevent that nonvolatile memory from causing damage because of repeatedly writing.
The invention provides a kind of method for writing data, it can prevent that nonvolatile memory from causing damage because of repeatedly writing.
The present invention proposes a kind of method for writing data, and it is applicable to the nonvolatile memory with a plurality of writing units.This method for writing data is included in and carries out the nonvolatile memory write-in program on the main frame, and desires to write the data of nonvolatile memory so far by this nonvolatile memory write-in program management.This method for writing data also comprises by the nonvolatile memory write-in program carries out the write-enable instruction temporarily removing the write protection of this nonvolatile memory, and carries out by this nonvolatile memory write-in program that to write instruction be that unit write so far nonvolatile memory among not in the writing unit of record data with above-mentioned writing unit with the data desiring to write from main frame.At last, after finishing the writing of data, carry out the write protection instruction, to start the write protection of nonvolatile memory by the nonvolatile memory write-in program.
In one embodiment of this invention, each above-mentioned writing unit only can be written into once.
In one embodiment of this invention, above-mentioned method for writing data also comprises the indegree of writing that writes down writing unit respectively, and judge writing indegree and whether writing frequency threshold value of the writing unit desire to write data respectively less than default, wherein only the information of desiring to write is write to indegree and write in the writing unit of frequency threshold value less than default.
In one embodiment of this invention, above-mentioned writing unit is sector, page or leaf or block.
In one embodiment of this invention, above-mentioned method for writing data also comprises by the nonvolatile memory write-in program carries out erasing instruction, is recorded in all data on this nonvolatile memory with removing.
In one embodiment of this invention, the above-mentioned management step of desiring to write to the data of this nonvolatile memory comprise to these data collect operation with arrange operation at least one of them.
The present invention proposes a kind of nonvolatile memory stores system, and it comprises in order to the bus interface that is connected to main frame, nonvolatile memory, nonvolatile memory write-in program and controller.Nonvolatile memory has a plurality of writing units with the storage data.The nonvolatile memory write-in program is to be carried out to carry out a plurality of data write steps by main frame.Controller is coupled to bus interface and nonvolatile memory; carry out the write protection of nonvolatile memory in order to initialization ground; to start the write protection of nonvolatile memory, wherein these data write steps comprise that management desires to write to the data of nonvolatile memory with the write protection instruction of removing write protection and identification nonvolatile memory write-in program in the write-enable instruction of identification nonvolatile memory write-in program; the instruction of execution write-enable; it from main frame is that unit writes among the nonvolatile memory not in the writing unit of record data and carries out the write protection instruction with the writing unit with data that execution writes instruction.
In one embodiment of this invention, each above-mentioned writing unit only can be written into once.
In one embodiment of this invention, above-mentioned data write step also comprises the indegree of writing that writes down writing unit respectively, and judge writing indegree and whether writing frequency threshold value of the writing unit desire to write data respectively less than default, wherein only the information of desiring to write is write to indegree and write in the writing unit of frequency threshold value less than default.
In one embodiment of this invention, above-mentioned writing unit is sector, page or leaf or block.
In one embodiment of this invention, above-mentioned data write step comprises that also carrying out erasing instruction by the nonvolatile memory write-in program is recorded in all data on the nonvolatile memory with removing.
In one embodiment of this invention, above-mentioned nonvolatile memory write-in program is stored on the nonvolatile memory.
In one embodiment of this invention, the above-mentioned management step of desiring to write to the data of this nonvolatile memory comprise to these data collect operation with arrange operation at least one of them.
The present invention proposes a kind of controller, and it is applicable to the storage system with nonvolatile memory, and wherein this nonvolatile memory has a plurality of writing units.This controller comprises non-volatile memory interface, microprocessing unit and write protection module.Microprocessing unit is in order to the write-enable instruction and write protection instruction of identification nonvolatile memory write-in program.Non-volatile memory interface is coupled to microprocessing unit in order to the access nonvolatile memory.The write protection module is coupled to microprocessing unit; the write protection module is carried out write protection to prevent any write operation on the nonvolatile memory in order to initialization ground; temporarily remove write protection and start the write protection of nonvolatile memory according to the write protection instruction according to write-enable instruction; wherein the nonvolatile memory write-in program is to carry out carrying out a plurality of data write steps being connected on the main frame of above-mentioned storage system, and these data write steps comprise that management desires to write to the data of nonvolatile memory; the instruction of execution write-enable; it is unit with the writing unit with data from main frame that execution writes instruction; write among the nonvolatile memory not in the writing unit of record data by microprocessing unit and non-volatile memory interface; and carry out write protection and instruct.
In one embodiment of this invention, each above-mentioned writing unit only can be written into once.
In one embodiment of this invention, above-mentioned data write step also comprises the indegree of writing that writes down writing unit respectively, and judge writing indegree and whether writing frequency threshold value of the writing unit desire to write data respectively less than default, wherein only the information of desiring to write is write to indegree and write in the writing unit of frequency threshold value less than default.
In one embodiment of this invention, above-mentioned writing unit is sector, page or leaf or block.
In one embodiment of this invention, above-mentioned data write step comprises that also carrying out erasing instruction by this nonvolatile memory write-in program is recorded in all data on this nonvolatile memory with removing.
In one embodiment of this invention, above-mentioned nonvolatile memory is a flash memory.
The present invention proposes a kind of controller, and it is applicable to the storage system with nonvolatile memory, and wherein this nonvolatile memory has a plurality of writing units.This controller comprises non-volatile memory interface, microprocessing unit and write protection module.Microprocessing unit is in order to the write-enable instruction and write protection instruction of identification nonvolatile memory write-in program.Non-volatile memory interface is coupled to microprocessing unit in order to the access nonvolatile memory.The write protection module is coupled to microprocessing unit; the write protection module is carried out write protection to prevent any write operation on the nonvolatile memory in order to initialization ground; temporarily remove write protection and start the write protection of nonvolatile memory according to the write protection instruction according to write-enable instruction; wherein the nonvolatile memory write-in program is performed by the main frame that is connected to above-mentioned storage system, and microprocessor unit can be after the write protection module is temporarily removed write protection receives from main frame and desires to write to the data of nonvolatile memory with management and to be unit with the writing unit write to data among the nonvolatile memory not in those writing units of record data by non-volatile memory interface.
In one embodiment of this invention, each above-mentioned writing unit only can be written into once.
In one embodiment of this invention, above-mentioned microprocessor unit can write down respectively writing unit write indegree, respectively judge the writing unit of desiring to write data write indegree whether less than default write frequency threshold value and only the data of desiring to write write to indegree write in the writing unit of frequency threshold value less than default.
In one embodiment of this invention, above-mentioned writing unit is sector, page or leaf or block.
In one embodiment of this invention, above-mentioned microprocessor unit can be removed all data that are recorded on this nonvolatile memory according to the erasing instruction of nonvolatile memory write-in program.
In one embodiment of this invention, above-mentioned nonvolatile memory is a flash memory.
The present invention prevents the write operation of nonvolatile memory because of adopting write protection mechanism, and only can carry out write operation by the nonvolatile memory write-in program, prevents that thus nonvolatile memory from causing damage because of repeatedly writing.
Description of drawings
For above-mentioned feature and advantage of the present invention can be become apparent, preferred embodiment cited below particularly, and in conjunction with the accompanying drawings, be described in detail below.
Fig. 1 is the summary calcspar that the nonvolatile memory stores system is shown according to first embodiment of the invention.
Fig. 2 is the process flow diagram that information write-in method is shown according to first embodiment of the invention.
Fig. 3 illustrates part operation workflow figure about write operation aspect controller according to first embodiment of the invention.
Fig. 4 is the process flow diagram that information write-in method is shown according to second embodiment of the invention.
Fig. 5 illustrates about writing the part operation workflow figure with erase operations aspect controller according to second embodiment of the invention.
The primary clustering symbol description
100: flash memory storage system
110: flash memory control
110a: microprocessing unit
110b: non-volatile memory interface
110c: write protection module
120: bus interface
130: flash memory
130-0,130-1,130-2,130-N: physical blocks
S201, S203, S205, S207, S209: the step of method for writing data
S301, S303, S305, S307, S309, S311, S313, S315: the operation steps of controller
S401, S403, S405, S407, S409, S411: the step of method for writing data
S501, S503, S505, S507, S509, S511, S513, S515, S517: the operation steps of controller
Embodiment
Only can " write once " or " writing specific times " for reaching on the nonvolatile memory that originally can repeat to write and wipe, to limit, the present invention provides a software program (for example, nonvolatile memory write-in program) in the nonvolatile memory stores system.When the user desires to write data so far during the nonvolatile memory stores system, must just can carry out writing of data by on host computer system, carrying out this software program.In addition, by the coordination between the controller of this software program and nonvolatile memory stores system, with the indegree of writing of each writing unit of nonvolatile memory in the restriction nonvolatile memory stores system.Be described in more detail the present invention below with reference to accompanying drawing with a plurality of embodiment.
[first embodiment]
Fig. 1 is the summary calcspar that the nonvolatile memory stores system is shown according to first embodiment of the invention.
Please refer to Fig. 1, nonvolatile memory stores system 100 comprises controller 110, bus interface 120 and nonvolatile memory 130.Usually nonvolatile memory stores system 100 can use with main frame 200 in the mode of removable formula, so that main frame 200 can write to data nonvolatile memory stores system 100 or reading of data from nonvolatile memory stores system 100.In the present embodiment, nonvolatile memory stores system 100 is a memory card.But it must be appreciated that in another embodiment of the present invention, nonvolatile memory stores system 100 also can be carry-on dish.
Controller 110 can control bus interfaces 120 and the overall operation of nonvolatile memory 130, for example storage of data, read and wipe etc.Controller 110 comprises microprocessing unit 110a and non-volatile memory interface 110b.
Microprocessing unit 110a can control the running of non-volatile memory interface 110b and write protection module 110c.
Non-volatile memory interface 110b is electrically connected to microprocessing unit 110a and in order to access nonvolatile memory 130.Just, main frame 200 data of desiring to write to nonvolatile memory 130 can be converted to 130 receptible forms of nonvolatile memory via non-volatile memory interface 110b.
Write protection module 110c is electrically connected to microprocessing unit 110a and carries out write protection to prevent any write operation on the nonvolatile memory 130 in order to initialization ground.
In addition, though not shown in present embodiment, controller 110 can also comprise the general common functional module of flash memory control such as memory buffer, memory management module, error correction module and power management module.
Bus interface 120 is in order to be connected in main frame 200 by bus 300.In the present embodiment, bus interface 120 is the SD interface.Yet, it must be appreciated to the invention is not restricted to this that bus interface 120 can be USB interface, IEEE 1394 interfaces, SATA interface, MS interface, MMC interface, PCIExpress interface, CF interface, ide interface or other data transmission interface that is fit to.
Nonvolatile memory 130 is to electrically connect controller 110 and in order to the storage data.In this enforcement, nonvolatile memory 130 is multilevel-cell (Multi Level Cell, MLC) a NAND flash memory.Yet, it must be appreciated, the invention is not restricted to this.In another embodiment of the present invention, (Single Level Cell, SLC) the NAND flash memory also can be applicable to the present invention to single layer cell.
Nonvolatile memory 130 can be divided into a plurality of physical blocks (physical block) 130-0 to 130-N.Generally speaking, physical blocks is the least unit of wiping in flash memory.Also promptly, each physical blocks contains the unit that is wiped free of in the lump of minimal amount.Each physical blocks can be divided into several pages or leaves (page), for example 64 pages, 128 pages, 256 pages etc. usually.Page or leaf is generally the minimum unit of programmingization (program), but what specify is in some different flash memory design, minimum programming unit also can be a sector (sector) size, a plurality of sectors are promptly arranged in one page and serves as the minimum unit of programmingization with a sector.In other words, page or leaf is for writing the minimum unit of data or reading of data.Each page or leaf generally includes user data field D and redundant area R.User data field D is in order to storage user's data, and redundant area R is in order to data (for example, the error-correcting code (error correcting code, ECC)) of storage system.Be sector (sector) size corresponding to disc driver, generally speaking, user data field D is generally 512 bytes, and redundant area R is generally 16 bytes.Just, one page is a sector.Yet, also can form one page in a plurality of sectors, for example one page comprises 4 sectors.In the present embodiment, the writing unit of nonvolatile memory 130 is a page or leaf.In another embodiment of the present invention, the writing unit of nonvolatile memory 130 also can be designed to a block or a sector.What deserves to be mentioned is that each page of nonvolatile memory 130 or each block only can be repeated to write few number of times (for example, 100 times).Therefore, in the present embodiment this nonvolatile memory stores system 100 is designed to only can carry out " writing once ".
Particularly, according to the nonvolatile memory stores system 100 of the embodiment of the invention, the write protection module 110c of controller 110 can be set the write protection that prevents write non-volatile memory 130 in factory setting.Therefore; nonvolatile memory stores system 100 according to the embodiment of the invention also comprises nonvolatile memory write-in program (not shown); this nonvolatile memory write-in program can be carried out to finish the data write step according to the embodiment of the invention by main frame 200; wherein but the instruction of the write-enable of this nonvolatile memory write-in program is discerned with the microprocessing unit 110a of write protection instruction controlled device 110; and the write protection module 110c of controller 110 can instruct the write protection that starts or remove nonvolatile memory 130 according to instruction of this write-enable and write protection, will describe this information write step in detail in conjunction with Fig. 2 after a while.In other words, the nonvolatile memory stores system 100 according to the embodiment of the invention must just can carry out writing of data by carrying out above-mentioned nonvolatile memory write-in program.
In the present embodiment, above-mentioned nonvolatile memory write-in program is the same disk cut section that the data of storing with the user are stored in nonvolatile memory 130.Yet, in another embodiment of the present invention, also can in nonvolatile memory 130, independently cut apart a disk cut section and come the storage non-volatile memories write-in program to click and carry out with the user who makes things convenient for main frame 200.In addition, in another embodiment of the present invention, also the nonvolatile memory write-in program of being stored can be set at read-onlyly, delete to prevent user mistake.Moreover this program also can be stored in the storage medium independently, is installed in main frame 200 or the nonvolatile memory 130 for the user.
Fig. 2 is the process flow diagram that data write-in program (method) is shown according to first embodiment of the invention.
Please refer to Fig. 2, in step S201, the user is in carrying out the nonvolatile memory write-in program that is stored on the nonvolatile memory 130 on the main frame 200.Then, desire to write to the data of nonvolatile memory 130 in step S203 by nonvolatile memory write-in program (not shown) management, wherein to comprise data aggregation be the unit of writing to the management data of desiring to write to nonvolatile memory 130 and/or the sequence of addresses that writes of data arranged etc.For example, but nonvolatile memory write-in program display window (windows) interface, to provide the user to manage to desire to write to the data of nonvolatile memory 130.What deserves to be mentioned is, it is to carry out in the nonvolatile memory write-in program of carrying out on main frame 200 that management in the present embodiment desires to write to the step of the data of nonvolatile memory 130, yet in another embodiment of the present invention, main frame 200 also can directly be given controller 110 with data transfer, and manages the data of desiring to write to nonvolatile memory 130 by controller 110.
Afterwards, when the user of main frame 200 carries out the nonvolatile memory write-in program when beginning to write instruction, in step S205, the nonvolatile memory write-in program can be carried out the write-enable instruction temporarily to remove the write protection of nonvolatile memory 130.
After the write protection of removing nonvolatile memory 130; the nonvolatile memory write-in program can be carried out and write instruction in step S207; is that unit write in nonvolatile memory 130 with the writing unit with above-mentioned data from main frame 200; and can after finishing the writing of data, start the write protection of nonvolatile memory once more according to the write protection instruction of nonvolatile memory write-in program at the write protection module 110c of step S209 middle controller 110.
In addition, because the writing unit of nonvolatile memory 130 only can be written into once, therefore among can providing nonvolatile memory 130, step S207 middle controller 110 do not write down the writing unit of data in the present embodiment to write data.Particularly, may be in step S207 because of there not being the message of recordable space by controller 110 response write errors.Describe the running of controller 110 in detail below with reference to Fig. 3.
Fig. 3 illustrates part operation workflow figure about write operation aspect controller 110 according to first embodiment of the invention.
After 100 starts of nonvolatile memory stores system, controller 100 can be in the state that waits the instruction that comes from main frame 200.Please refer to Fig. 3, in step S301, can receive the instruction of main frame 200.Then, can judge that in step S303 the instruction that is received is the write-enable instruction or generally writes instruction.If in step S303, judge when the instruction that is received is the write-enable instruction, then in step S305, can temporarily remove the write protection of nonvolatile memory 130.
If judging the instruction that is received in step S303 is when generally writing instruction, then can judge whether the write protection of nonvolatile memory 130 starts in step S307.If in step S307, judge when the write protection of nonvolatile memory 130 has been activated, then can response main frame 200 1 write error messages in step S309.If in step S307, judge and then in step S311, can judge among the nonvolatile memory 130 whether have the not writing unit of record data when the write protection of nonvolatile memory 130 is not activated.If when in step S311, judging the writing unit that has record data not among the nonvolatile memory 130; then in step S313, data can be write to the not writing unit of record data, and the write protection that in step S315, can restart nonvolatile memory 130.If when in step S309, judging the writing unit that has record data not among the nonvolatile memory 130, execution in step S309 then.
[second embodiment]
The framework of the nonvolatile memory stores system of second embodiment of the invention is same as first embodiment (as Fig. 1), therefore in this no longer repeat specification.The difference of second embodiment and first embodiment is that the write-in program of the nonvolatile memory stores system of second embodiment can allow to repeat to write predefined number of times on the writing unit of nonvolatile memory.
Fig. 4 is the process flow diagram that data write-in program (method) is shown according to second embodiment of the invention.
Please refer to Fig. 4, the user is in carrying out the nonvolatile memory write-in program that is stored on the nonvolatile memory 130 on the main frame 200 in step S401.Then, in step S403, desire to write to the data of nonvolatile memory 130 by the management of nonvolatile memory write-in program.
Afterwards, when the user of main frame 200 carries out the nonvolatile memory write-in program when beginning to write instruction, the nonvolatile memory write-in program can be carried out the write-enable instruction temporarily to remove the write protection of nonvolatile memory 130 in step S405.
After the write protection of removing nonvolatile memory 130, the nonvolatile memory write-in program can be carried out and write instruction in step S407, is that unit write in nonvolatile memory 130 with the writing unit with above-mentioned data from main frame 200.In step S409, controller 110 can writing in the count value on writing the writing unit of data be counted (for example, adding 1 on count value).For example, count value is recorded in the redundant area R of each writing unit in the present embodiment, but it must be appreciated and the invention is not restricted to this.
At last, can start the write protection of nonvolatile memory once more according to the write protection instruction of nonvolatile memory write-in program at step S411 middle controller 110.What deserves to be mentioned is, in the present embodiment, because the writing unit of nonvolatile memory 130 only can be written into predetermined times, therefore in step S407, controller 110 can provide do not reach among the nonvolatile memory 130 write indegree writing unit to write data.Particularly, may be in step S407 because of there not being the message of recordable space by controller 110 response write errors.Describe the running of controller 110 in detail below with reference to Fig. 5.
Fig. 5 illustrates about writing the part operation workflow figure with erase operations aspect controller 110 according to second embodiment of the invention.
After 100 starts of nonvolatile memory stores system, controller 100 can be in the state that waits the instruction that comes from main frame 200.Please refer to Fig. 5, in step S501, can receive the instruction of main frame 200.Then, can judge that in step S503 the instruction that is received is the write-enable instruction or generally writes instruction.If in step S503, judge when the instruction that is received is the write-enable instruction, then in step S505, can temporarily remove the write protection of nonvolatile memory 130.
If judging the instruction that is received in step S503 is when generally writing instruction, then can judge whether the write protection of nonvolatile memory 130 starts in step S507.If in step S507, judge when the write protection of nonvolatile memory 130 has been activated, then can response main frame 200 1 error messages in step S509.If in step S507, judge when the write protection of nonvolatile memory 130 does not start, then in step S511, can judge whether have not record data (or protocol failure data) among the nonvolatile memory 130 and write indegree less than presetting the writing unit that writes frequency threshold value.There are not record data (or protocol failure data) and write indegree less than default when writing the writing unit of frequency threshold value if in step S511, judge, then in step S513, data can be write to the writing unit of record data not and in step S515, can write data writing unit write counting (for example, on count value, adding 1) on the count value.At last, in step S517, can restart the write protection of nonvolatile memory 130.If judging not have among the nonvolatile memory 130 in step S511 has not record data (or protocol failure data) and writes indegree less than default when writing the writing unit of frequency threshold value, execution in step S509 then.
In another embodiment of the present invention, the data write-in program can comprise also that carrying out erasing instruction by the nonvolatile memory write-in program is recorded in all data on the nonvolatile memory 130 with removing.
In sum; the present invention proposes to control nonvolatile memory with write protection mechanism and writes indegree; and carrying out the data that nonvolatile memory is carried out by the nonvolatile memory write-in program writes; thus can a batch writing mode write data and indegree is write in qualification, and avoid frequently writing small amount of data and make the nonvolatile memory damage that only can write the minority number of times.By the nonvolatile memory write-in program of this exploitation, can use in the production run of flash memory output only can write the bad flash memory of few number of times effectively, can promote the use of former non-non-defective unit thus, reduce the cost of making.
Though the present invention with preferred embodiment openly as above; but it is not in order to limit the present invention; those of ordinary skill under any in the technical field; without departing from the spirit and scope of the present invention; when can doing a little change and retouching, so protection scope of the present invention is when being as the criterion with accompanying Claim.

Claims (25)

1. method for writing data, it is applicable to the nonvolatile memory with a plurality of writing units, this method for writing data comprises:
Carry out the nonvolatile memory write-in program;
Desire to write to the data of this nonvolatile memory by this nonvolatile memory write-in program management;
Carry out the write-enable instruction by this nonvolatile memory write-in program, temporarily to remove the write protection of this nonvolatile memory;
Carrying out to write instruction by this nonvolatile memory write-in program, is that unit write to this nonvolatile memory among not in the said write unit of record data with the said write unit with these data from this main frame; And
After finishing the writing of this data, carry out write protection instruction by this nonvolatile memory write-in program, to start the write protection of this nonvolatile memory.
2. method for writing data as claimed in claim 1, wherein each writing unit only can be written into once.
3. method for writing data as claimed in claim 1 also comprises:
Write down the indegree of writing of said write unit respectively; And
Whether that judges the said write unit desire to write this information respectively writes indegree less than the default frequency threshold value that writes,
Wherein only write this information to writing indegree less than this default writing in the said write unit of frequency threshold value.
4. method for writing data as claimed in claim 1, wherein each writing unit is sector, page or leaf or block.
5. method for writing data as claimed in claim 1 comprises that also carrying out erasing instruction by this nonvolatile memory write-in program is recorded in all data on this nonvolatile memory with removing.
6. method for writing data as claimed in claim 1, wherein the management step of desiring to write to the data of this nonvolatile memory comprise to these data collect operation with arrange operation at least one of them.
7. nonvolatile memory stores system comprises:
Bus interface is in order to be connected to main frame;
Nonvolatile memory has a plurality of writing units with the storage data;
The nonvolatile memory write-in program is in order to be carried out to carry out a plurality of data write steps by this main frame; And
Controller; be coupled to this bus interface and this nonvolatile memory; carry out the write protection of this nonvolatile memory in order to initialization ground; discern the write-enable instruction of this nonvolatile memory write-in program; to remove the write protection of this nonvolatile memory; and discern the write protection instruction of this nonvolatile memory write-in program, to start the write protection of this nonvolatile memory
Wherein said data write step comprises that management desires to write to the data of this nonvolatile memory, carries out the instruction of this write-enable, carries out that to write instruction be that unit write to this nonvolatile memory among not in the said write unit of record data with the said write unit with these data from this main frame, and carries out this write protection instruction.
8. nonvolatile memory stores as claimed in claim 7 system, wherein each writing unit only can be written into once.
9. nonvolatile memory stores as claimed in claim 7 system, wherein said data write step also comprises:
Write down the indegree of writing of said write unit respectively; And
Whether that judges the said write unit desire to write this information respectively writes indegree less than the default frequency threshold value that writes,
Only write this information to writing indegree less than this default writing in the said write unit of frequency threshold value.
10. nonvolatile memory stores as claimed in claim 7 system, wherein each writing unit is sector, page or leaf or block.
11. nonvolatile memory stores as claimed in claim 7 system, wherein said data write step comprise that also carrying out erasing instruction by this nonvolatile memory write-in program is recorded in all data on this nonvolatile memory with removing.
12. nonvolatile memory stores as claimed in claim 7 system, wherein this nonvolatile memory write-in program is stored on this nonvolatile memory.
13. nonvolatile memory stores as claimed in claim 7 system, wherein the management step of desiring to write to the data of this nonvolatile memory comprise to these data collect operation with arrange operation at least one of them.
14. a controller, it is applicable to the storage system with nonvolatile memory, and wherein this nonvolatile memory has a plurality of writing units, and this controller comprises:
Microprocessing unit is in order to the write-enable instruction and the write protection instruction of identification nonvolatile memory write-in program;
Non-volatile memory interface is coupled to this microprocessing unit, in order to this nonvolatile memory of access; And
The write protection module; be coupled to this microprocessing unit; in order to initialization ground carry out write protection with prevent on this nonvolatile memory any write operation, temporarily remove this write protection according to this write-enable instruction; and start the write protection of this nonvolatile memory according to this write protection instruction
Wherein this nonvolatile memory write-in program is carried out to carry out a plurality of data write steps being connected on the main frame of this storage system; described data write step comprises that management desires to write to the data of this nonvolatile memory, carries out the instruction of this write-enable, carries out that to write instruction be that unit come by this microprocessor and this non-volatile memory interface write to this nonvolatile memory among not in the said write unit of record data with the said write unit with these data from this main frame, and carries out this write protection and instruct.
15. controller as claimed in claim 14, wherein each writing unit only can be written into once.
16. controller as claimed in claim 14, wherein said data write step also comprises:
Write down the indegree of writing of said write unit respectively; And
Whether that judges the said write unit desire to write this information respectively writes indegree less than the default frequency threshold value that writes,
Only write this information to writing indegree less than this default writing in the said write unit of frequency threshold value.
17. controller as claimed in claim 14, wherein each writing unit is sector, page or leaf or block.
18. controller as claimed in claim 14, wherein this data write step comprises that also carrying out erasing instruction by this nonvolatile memory write-in program is recorded in all data on this nonvolatile memory with removing.
19. controller as claimed in claim 14, wherein this nonvolatile memory is a flash memory.
20. a controller, it is applicable to the storage system with nonvolatile memory, and wherein this nonvolatile memory has a plurality of writing units, and this controller comprises:
Microprocessing unit is in order to the write-enable instruction and the write protection instruction of identification nonvolatile memory write-in program;
Non-volatile memory interface is coupled to this microprocessing unit, in order to this nonvolatile memory of access; And
The write protection module; be coupled to this microprocessing unit; in order to initialization ground carry out write protection with prevent on this nonvolatile memory any write operation, temporarily remove this write protection according to this write-enable instruction; and start the write protection of this nonvolatile memory according to this write protection instruction
Wherein this nonvolatile memory write-in program is performed by the main frame that is connected to this storage system; and this microprocessor unit can be after this write protection module be temporarily removed this write protection; from this main frame, receive the data of desiring to write to this nonvolatile memory with management; and with the said write unit is unit, by this non-volatile memory interface these data is write among this nonvolatile memory not in the said write unit of record data.
21. controller as claimed in claim 20, wherein each writing unit only can be written into once.
22. controller as claimed in claim 20, wherein this microprocessor unit writes down writing indegree, judging writing indegree and whether writing frequency threshold value and only write these data to writing indegree less than this default writing in the said write unit of frequency threshold value less than default of the said write unit desire to write these data respectively of said write unit respectively.
23. controller as claimed in claim 20, wherein each writing unit is sector, page or leaf or block.
24. controller as claimed in claim 20, wherein microprocessor unit is removed all data that are recorded on this nonvolatile memory according to the erasing instruction of this nonvolatile memory write-in program.
25. controller as claimed in claim 20, wherein this nonvolatile memory is a flash memory.
CNA2008100962472A 2008-05-06 2008-05-06 Data writing method, memory system and controller for nonvolatile memory Pending CN101576859A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNA2008100962472A CN101576859A (en) 2008-05-06 2008-05-06 Data writing method, memory system and controller for nonvolatile memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNA2008100962472A CN101576859A (en) 2008-05-06 2008-05-06 Data writing method, memory system and controller for nonvolatile memory

Publications (1)

Publication Number Publication Date
CN101576859A true CN101576859A (en) 2009-11-11

Family

ID=41271794

Family Applications (1)

Application Number Title Priority Date Filing Date
CNA2008100962472A Pending CN101576859A (en) 2008-05-06 2008-05-06 Data writing method, memory system and controller for nonvolatile memory

Country Status (1)

Country Link
CN (1) CN101576859A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102262598A (en) * 2010-05-28 2011-11-30 纬创资通股份有限公司 Storage system capable of promoting write protection and related method
CN102279815A (en) * 2010-06-13 2011-12-14 宇瞻科技股份有限公司 Flash-memory-based storage device and data writing method thereof
CN102567184A (en) * 2011-12-27 2012-07-11 青岛海信宽带多媒体技术有限公司 Journal storage method based on Flash
CN103186470A (en) * 2011-12-30 2013-07-03 群联电子股份有限公司 Memory storage device and memory controller and data writing method thereof
US8650366B2 (en) 2010-05-19 2014-02-11 Wistron Corporation Memory system capable of enhancing writing protection and related method
CN107741913A (en) * 2013-08-05 2018-02-27 慧荣科技股份有限公司 method for managing a memory device, memory device and controller
CN107851053A (en) * 2015-07-16 2018-03-27 高通技术国际有限公司 For the method and apparatus for the damage for managing flash memory contents

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8650366B2 (en) 2010-05-19 2014-02-11 Wistron Corporation Memory system capable of enhancing writing protection and related method
CN102262598A (en) * 2010-05-28 2011-11-30 纬创资通股份有限公司 Storage system capable of promoting write protection and related method
CN102262598B (en) * 2010-05-28 2016-10-05 纬创资通股份有限公司 Accumulator system and the correlation technique of write protection can be promoted
CN102279815A (en) * 2010-06-13 2011-12-14 宇瞻科技股份有限公司 Flash-memory-based storage device and data writing method thereof
CN102567184A (en) * 2011-12-27 2012-07-11 青岛海信宽带多媒体技术有限公司 Journal storage method based on Flash
CN102567184B (en) * 2011-12-27 2014-12-17 青岛海信宽带多媒体技术有限公司 Journal storage method based on Flash
CN103186470A (en) * 2011-12-30 2013-07-03 群联电子股份有限公司 Memory storage device and memory controller and data writing method thereof
CN103186470B (en) * 2011-12-30 2016-04-20 群联电子股份有限公司 Memorizer memory devices and Memory Controller thereof and method for writing data
CN107741913A (en) * 2013-08-05 2018-02-27 慧荣科技股份有限公司 method for managing a memory device, memory device and controller
CN107741913B (en) * 2013-08-05 2021-09-07 慧荣科技股份有限公司 Method for managing a memory device, memory device and controller
CN107851053A (en) * 2015-07-16 2018-03-27 高通技术国际有限公司 For the method and apparatus for the damage for managing flash memory contents

Similar Documents

Publication Publication Date Title
US9582416B2 (en) Data erasing method, memory control circuit unit and memory storage apparatus
US20150186224A1 (en) Data storage device and flash memory control method
US8954705B2 (en) Memory space management method and memory controller and memory storage device and memory storage using the same
US20100042773A1 (en) Flash memory storage system and data writing method thereof
CN101640069B (en) Average wear method and average wear system for flash memory
US8589619B2 (en) Data writing method, memory controller, and memory storage apparatus
CN101576859A (en) Data writing method, memory system and controller for nonvolatile memory
US9235534B2 (en) Data protecting method, memory controller and memory storage apparatus
US9442834B2 (en) Data management method, memory controller and memory storage device
US9141530B2 (en) Data writing method, memory controller and memory storage device
CN101625897B (en) Data write-in method, storage system and controller used for quick flash memory
CN108228093B (en) Method and apparatus for monitoring memory using background media scanning
US20090259796A1 (en) Data writing method for non-volatile memory and storage system and controller using the same
CN103270500A (en) Transaction log recovery
US8423838B2 (en) Block management method, memory controller, and memory storage apparatus
TWI454912B (en) Data processing method, memory controller and memory storage device
US8954692B2 (en) File protecting method and system, and memory controller and memory storage apparatus thereof
CN101667157A (en) Flash memory data transmission method, flash memory storage system and controller
US10877853B2 (en) Data storage device and operation method optimized for recovery performance, and storage system having the same
US20160054935A1 (en) Data storing method and memory controller and memory storage device using the same
CN107291374A (en) Method and device for recording use time of data block
CN101727397B (en) Block management and change method, flash memory storage system and controller thereof
US9733832B2 (en) Buffer memory accessing method, memory controller and memory storage device
CN103218300B (en) Data processing method, Memory Controller and memorizer memory devices
CN113885808A (en) Mapping information recording method, memory control circuit unit and memory device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20091111