TWI811674B - Operation method of flash memory, system single chip and information processing device - Google Patents

Operation method of flash memory, system single chip and information processing device Download PDF

Info

Publication number
TWI811674B
TWI811674B TW110116444A TW110116444A TWI811674B TW I811674 B TWI811674 B TW I811674B TW 110116444 A TW110116444 A TW 110116444A TW 110116444 A TW110116444 A TW 110116444A TW I811674 B TWI811674 B TW I811674B
Authority
TW
Taiwan
Prior art keywords
data
sector
flash memory
sectors
operating method
Prior art date
Application number
TW110116444A
Other languages
Chinese (zh)
Other versions
TW202244913A (en
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 大陸商北京集創北方科技股份有限公司
Priority to TW110116444A priority Critical patent/TWI811674B/en
Publication of TW202244913A publication Critical patent/TW202244913A/en
Application granted granted Critical
Publication of TWI811674B publication Critical patent/TWI811674B/en

Links

Images

Landscapes

  • Read Only Memory (AREA)

Abstract

本發明主要揭示一種快閃記憶體的操作方法,係由一控制單元實現,用以對包含複數個存儲區塊的一快閃記憶體進行存取,所述快閃記憶體的操作方法包括一設定程序。執行設定程序時,係將各個存儲區塊內的複數個所述扇區進一步規劃成複數個第一扇區和複數個第二扇區,從而利用所述第一扇區用以儲存一第一數據,且所述第二扇區用以儲存會經常被修改的一第二數據。舉例而言,在一數據被寫入該快閃記憶體之後,該數據便成為儲存在所述第一扇區的第一數據。並且,該數據所含有的會經常修改的部分則成為儲存在所述第二扇區的第二數據。所述快閃記憶體的操作方法還包括一數據改寫程序,用於對定址選取的至少一個第二扇區進行一扇區抹除操作,接著依據一改寫數據而對定址選取的所述第二扇區執行一頁編程操作。The present invention mainly discloses an operating method of a flash memory, which is implemented by a control unit and used to access a flash memory including a plurality of storage blocks. The operating method of the flash memory includes a Setup program. When executing the setting program, the plurality of sectors in each storage block are further planned into a plurality of first sectors and a plurality of second sectors, so that the first sectors are used to store a first data, and the second sector is used to store a second data that is frequently modified. For example, after data is written into the flash memory, the data becomes the first data stored in the first sector. Moreover, the part of the data that is frequently modified becomes the second data stored in the second sector. The operating method of the flash memory further includes a data rewriting program for performing a sector erase operation on at least one second sector selected by the address, and then performing a sector erase operation on the second sector selected by the address according to a rewrite data. Sector performs a page programming operation.

Description

快閃記憶體的操作方法、系統單晶片及資訊處理裝置Flash memory operating method, system single chip and information processing device

本發明為快閃記憶體之相關領域,尤指能夠顯著提升快閃記憶體使用效率的一種快閃記憶體的操作方法。The present invention relates to the field of flash memory, and in particular, to a flash memory operating method that can significantly improve the usage efficiency of the flash memory.

已知,快閃記憶體(flash)分為NAND快閃記憶體和NOR快閃記憶體。其中,NOR快閃記憶體具有足夠的位址線來映射整個存儲區的範圍,使得微控制器或處理器能夠高速存取NOR快閃記憶體。因此,NOR快閃記憶體主要被使用在儲存系統單晶片(SoC)所需的演算法或應用程式之代碼。不同於NOR快閃記憶體,NAND快閃記憶體主要被應用於高容量數據儲存。It is known that flash memory (flash) is divided into NAND flash memory and NOR flash memory. Among them, the NOR flash memory has enough address lines to map the entire storage area, so that the microcontroller or processor can access the NOR flash memory at high speed. Therefore, NOR flash memory is mainly used to store the algorithm or application code required by the system on a chip (SoC). Unlike NOR flash memory, NAND flash memory is mainly used for high-capacity data storage.

在基礎配置上,快閃記憶體包括複數個存儲區塊(Block),其中每個存儲區塊又包括複數個扇區(sector),而每個扇區又包括複數個頁(Page)。依此設計,微控制器可對NOR快閃記憶體執行扇區抹除(sector erase)操作或區塊抹除(block erase)操作,或是對NOR快閃記憶體執行頁編程(page program)操作。值得說明的是,依據習知的NOR快閃記憶體之操作方法,若要對儲存在NOR快閃記憶體的某個位址的數據進行改寫,必須先執行扇區抹除或區塊抹除,之後才可以利用頁編程操作將數據寫入NOR快閃記憶體。In a basic configuration, a flash memory includes a plurality of storage blocks (Blocks), each storage block includes a plurality of sectors (sectors), and each sector includes a plurality of pages (Pages). Based on this design, the microcontroller can perform a sector erase operation or a block erase operation on the NOR flash memory, or perform a page program on the NOR flash memory. operate. It is worth mentioning that according to the conventional operating method of NOR flash memory, if you want to rewrite the data stored at a certain address in the NOR flash memory, you must first perform sector erase or block erase. , and then the page programming operation can be used to write data to the NOR flash memory.

實務應用時,會出現需要經常對儲存在NOR快閃記憶體的數據進行改寫的情況,因此,現有的方案是先將包含需要進行改寫之數據以及不需要進行改寫(即,維持不變)之數據進行編寫後,在利用頁編程操作一同寫入該NOR快閃記憶體之中。然而,現有的方案在實務應用中顯示出以下缺點:In practical applications, there will be situations where the data stored in the NOR flash memory needs to be rewritten frequently. Therefore, the existing solution is to first separate the data that needs to be rewritten and the data that does not need to be rewritten (that is, remain unchanged). After the data is written, it is written into the NOR flash memory using a page programming operation. However, existing solutions show the following shortcomings in practical applications:

(1)大部分的數據不需要進行修改而僅有一部份的數據需要修改,但是進行數據改寫操作的過程中卻必須先執行扇區抹除操作或區塊抹除接著再利用頁編程操作重新寫入所有數據,這種方式不但消耗大量時間成本,同時也做了許多無實際功用的工作。(1) Most of the data does not need to be modified and only a part of the data needs to be modified. However, during the data rewriting operation, a sector erase operation or a block erase operation must be performed first and then the page programming operation must be used to rewrite the data. Writing all the data not only consumes a lot of time, but also does a lot of work that has no practical function.

(2)多次重複的數據改寫操作之後,有可能造成原本那些不需要修改之數據出現錯誤。(2) Repeated data rewriting operations may cause errors in data that originally did not need to be modified.

由上述說明可知,本領域亟需一種快閃記憶體的操作方法。It can be seen from the above description that there is an urgent need in this field for a method of operating a flash memory.

本發明之主要目的在於提供一種快閃記憶體的操作方法,係由一控制單元實現,用以對包含複數個存儲區塊的一快閃記憶體進行存取,所述快閃記憶體的操作方法包括一設定程序。執行設定程序時,係將各個存儲區塊內的複數個所述扇區進一步規劃成複數個第一扇區和複數個第二扇區,從而利用所述第一扇區用以儲存一第一數據,且所述第二扇區用以儲存會經常被修改的一第二數據。舉例而言,在一數據被寫入該快閃記憶體之後,該數據便成為儲存在所述第一扇區的第一數據。並且,該數據所含有的會經常修改的部分則成為儲存在所述第二扇區的第二數據。The main purpose of the present invention is to provide a flash memory operating method, which is implemented by a control unit to access a flash memory including a plurality of storage blocks. The operation method of the flash memory The method includes a setting procedure. When executing the setting program, the plurality of sectors in each storage block are further planned into a plurality of first sectors and a plurality of second sectors, so that the first sectors are used to store a first data, and the second sector is used to store a second data that is frequently modified. For example, after data is written into the flash memory, the data becomes the first data stored in the first sector. Moreover, the part of the data that is frequently modified becomes the second data stored in the second sector.

進一步地,所述快閃記憶體的操作方法還包括一數據改寫程序,用於對定址選取的至少一個第二扇區進行一扇區抹除操作,接著依據一改寫數據而對定址選取的所述第二扇區執行一頁編程操作。如此設計,即使儲存在第二扇區之中的第二數據經過多次改寫,儲存在第一扇區之中的所述第一數據也不會因此受到任何影響;故此,即使快閃記憶體因數據修改的需求而被執行多次的頁編程操作,該些不需要修改之數據也不會出現數據錯誤的現象。Further, the operating method of the flash memory also includes a data rewriting program for performing a sector erasure operation on at least one second sector selected by the address, and then all the selected second sectors according to a rewrite data. The second sector performs a page programming operation. With this design, even if the second data stored in the second sector is rewritten multiple times, the first data stored in the first sector will not be affected in any way; therefore, even if the flash memory Page programming operations are performed multiple times due to data modification requirements, and the data that does not need to be modified will not suffer from data errors.

為達成上述目的,本發明提出所述快閃記憶體的操作方法的一實施例,係由一控制單元實現,用以對包含複數個存儲區塊的一快閃記憶體進行存取,其中各所述存儲區塊包括複數個扇區,且各所述扇區包括複數個頁;所述快閃記憶體的操作方法包括:In order to achieve the above object, the present invention proposes an embodiment of the operating method of the flash memory, which is implemented by a control unit for accessing a flash memory including a plurality of storage blocks, wherein each The storage block includes a plurality of sectors, and each sector includes a plurality of pages; the operating method of the flash memory includes:

一設定程序,將複數個所述扇區規劃成複數個第一扇區和複數個第二扇區,其中所述第一扇區用以儲存一第一數據,且所述第二扇區用以儲存會經常被修改的一第二數據;以及A setting procedure for planning a plurality of the sectors into a plurality of first sectors and a plurality of second sectors, wherein the first sector is used to store a first data, and the second sector is used to store a first data. to store secondary data that is frequently modified; and

一數據改寫程序,對定址選取的至少一個第二扇區進行一扇區抹除操作,接著依據一改寫數據而對定址選取的所述第二扇區執行一頁編程操作。A data rewriting program performs a sector erase operation on at least one second sector selected by address, and then performs a page programming operation on the second sector selected by address according to a rewrite data.

在一實施例中,該第一數據之中含有一第三數據,且該第三數據在所述數據改寫程序被執行之前係與該第二數據相同。In one embodiment, the first data contains a third data, and the third data is the same as the second data before the data rewriting procedure is executed.

在可行的實施例中,本發明之所述快閃記憶體的操作方法,更包括:In a feasible embodiment, the flash memory operating method of the present invention further includes:

一數據讀取程序,自所述第一扇區之中讀出所述第一數據,且對應地自所述第二扇區之中讀出所述第二數據,接著以所述第二數據替換該第一數據所含有的該第三數據。A data reading program reads the first data from the first sector, and correspondingly reads the second data from the second sector, and then reads the second data with the second data. Replace the third data contained in the first data.

並且,在可行的實施例中,本發明之所述快閃記憶體的操作方法還可更包括:Moreover, in a feasible embodiment, the operating method of the flash memory of the present invention may further include:

一數據寫入程序,依據一數據而對定址選取的所述第一扇區和所述第二扇區執行所述頁編程操作,從而使該數據成為儲存在所述第一扇區之中的所述第一數據,且使該數據之中會經常被修改之部分成為儲存在所述第二扇區之中的所述第二數據。A data writing program performs the page programming operation on the first sector and the second sector selected by addressing according to a data, so that the data becomes stored in the first sector. The first data, and the part of the data that is frequently modified becomes the second data stored in the second sector.

本發明同時揭示一種系統單晶片,具有一控制單元與一快閃記憶體,該快閃記憶體包含複數個存儲區塊,各所述存儲區塊包括複數個扇區,且各所述扇區包括複數個頁;其特徵在於,該控制單元採用一快閃記憶體的操作方法對該快閃記憶體進行存取,且所述快閃記憶體的操作方法包括:The present invention also discloses a system single chip, which has a control unit and a flash memory. The flash memory includes a plurality of storage blocks, each of the storage blocks includes a plurality of sectors, and each of the sectors It includes a plurality of pages; it is characterized in that the control unit uses a flash memory operating method to access the flash memory, and the flash memory operating method includes:

一設定程序,將複數個所述扇區規劃成複數個第一扇區和複數個第二扇區,其中所述第一扇區用以儲存一第一數據,且所述第二扇區用以儲存會經常被修改的一第二數據;以及A setting procedure for planning a plurality of the sectors into a plurality of first sectors and a plurality of second sectors, wherein the first sector is used to store a first data, and the second sector is used to store a first data. to store secondary data that is frequently modified; and

一數據改寫程序,對定址選取的至少一個第二扇區進行一扇區抹除操作,接著依據一改寫數據而對定址選取的所述第二扇區執行一頁編程操作。A data rewriting program performs a sector erase operation on at least one second sector selected by address, and then performs a page programming operation on the second sector selected by address according to a rewrite data.

在一實施例中,該第一數據之中含有一第三數據,且該第三數據在所述數據改寫程序被執行之前係與該第二數據相同。In one embodiment, the first data contains a third data, and the third data is the same as the second data before the data rewriting procedure is executed.

在可行的實施例中,該控制單元所採用之所述快閃記憶體的操作方法,更包括:In a feasible embodiment, the operating method of the flash memory adopted by the control unit further includes:

一數據讀取程序,自所述第一扇區之中讀出所述第一數據,且對應地自所述第二扇區之中讀出所述第二數據,接著以所述第二數據替換該第一數據所含有的該第三數據。A data reading program reads the first data from the first sector, and correspondingly reads the second data from the second sector, and then reads the second data with the second data. Replace the third data contained in the first data.

並且,在可行的實施例中,該控制單元所採用之所述快閃記憶體的操作方法還可更包括:Moreover, in a feasible embodiment, the operating method of the flash memory used by the control unit may further include:

一數據寫入程序,依據一數據而對定址選取的所述第一扇區和所述第二扇區執行所述頁編程操作,從而使該數據成為儲存在所述第一扇區之中的所述第一數據,且使該數據之中會經常被修改之部分成為儲存在所述第二扇區之中的所述第二數據。A data writing program performs the page programming operation on the first sector and the second sector selected by addressing according to a data, so that the data becomes stored in the first sector. The first data, and the part of the data that is frequently modified becomes the second data stored in the second sector.

進一步地,本發明還揭示一種資訊處理裝置,其特徵在於,含有如前所述本發明之系統單晶片。在可行的實施例中,該資訊處理裝置是選自於由觸控裝置、影像處理裝置、生物性特徵辨識裝置、智能電視、智能手機、智能手錶、智能手環、平板電腦、筆記型電腦、一體式電腦、無線藍芽耳機、和門禁裝置所組成群組之中的一種電子裝置。Furthermore, the present invention also discloses an information processing device, which is characterized in that it contains the system single chip of the present invention as mentioned above. In a feasible embodiment, the information processing device is selected from the group consisting of a touch device, an image processing device, a biometric identification device, a smart TV, a smart phone, a smart watch, a smart bracelet, a tablet computer, a notebook computer, An electronic device among the group consisting of an all-in-one computer, a wireless Bluetooth headset, and an access control device.

為使  貴審查委員能進一步瞭解本發明之結構、特徵、目的、與其優點,茲附以圖式及較佳具體實施例之詳細說明如後。In order to enable the review committee to further understand the structure, characteristics, purpose, and advantages of the present invention, drawings and detailed descriptions of preferred embodiments are attached below.

本發明旨在提出一種快閃記憶體的操作方法,係由例如微控制器或微處理器的一控制單元所執行,從而對與其耦接的一快閃記憶體(如NOR flash)進行存取操作。特別地,在應用本發明之快閃記憶體的操作方法的情況下,即使控制單元對儲存在快閃記憶體之中的一特定數據進行多次改寫操作,儲存在快閃記憶體之中的其它未修改的數據(即,需要維持不變的數據)也不會受到多次改寫操作的影響而出現數據錯誤。The present invention aims to provide a method of operating a flash memory, which is executed by a control unit such as a microcontroller or a microprocessor to access a flash memory (such as NOR flash) coupled thereto. operate. In particular, when the flash memory operating method of the present invention is applied, even if the control unit performs multiple rewriting operations on a specific data stored in the flash memory, the data stored in the flash memory will Other unmodified data (that is, data that needs to remain unchanged) will not be affected by multiple rewrite operations and cause data errors.

圖1顯示一快閃記憶體的方塊圖。如圖1所示,該快閃記憶體1包括複數個存儲區塊(Block)1B。並且,如圖2之一個存儲區塊1B的第一方塊圖所示,每個存儲區塊1B又包括複數個扇區(sector)1BS。進一步地,如圖3之一個扇區1BS的方塊圖所示,每個扇區1BS又包括複數個頁(Page)1BSP。Figure 1 shows a block diagram of a flash memory. As shown in FIG. 1 , the flash memory 1 includes a plurality of storage blocks (Blocks) 1B. Moreover, as shown in the first block diagram of a storage block 1B in FIG. 2 , each storage block 1B includes a plurality of sectors 1BS. Further, as shown in the block diagram of a sector 1BS in FIG. 3 , each sector 1BS includes a plurality of pages (Page) 1BSP.

圖4顯示本發明之一種快閃記憶體的操作方法的流程圖。在應用本發明之快閃記憶體的操作方法的情況下,該控制單元首先執行方法流程的步驟S1,執行一設定程序。所述設定程序也可以視為一初始化程序。在完成所述設定程序之後,如圖5之一個存儲區塊11B的第二方塊圖所示,原本的複數個扇區(sector)1BS被進一步地規劃成複數個第一扇區1BS1和複數個第二扇區1BS2。依據本發明之設計,所述第一扇區1BS1用以儲存一第一數據,且所述第二扇區1BS2則用以儲存會經常被修改的一第二數據。舉例而言,在一數據被寫入該快閃記憶體1之後,該數據主要係成為儲存在所述第一扇區1BS1的第一數據。同時,該數據所含有的需要依據應用狀況而進行修改的部分則成為儲存在所述第二扇區1BS2的第二數據。FIG. 4 shows a flow chart of an operating method of a flash memory according to the present invention. When the flash memory operating method of the present invention is applied, the control unit first executes step S1 of the method flow and executes a setting procedure. The setting procedure can also be regarded as an initialization procedure. After completing the setting procedure, as shown in the second block diagram of a storage block 11B in FIG. 5 , the original plurality of sectors 1BS are further planned into a plurality of first sectors 1BS1 and a plurality of Second sector 1BS2. According to the design of the present invention, the first sector 1BS1 is used to store a first data, and the second sector 1BS2 is used to store a second data that is frequently modified. For example, after a piece of data is written into the flash memory 1, the data mainly becomes the first data stored in the first sector 1BS1. At the same time, the part contained in the data that needs to be modified according to the application conditions becomes the second data stored in the second sector 1BS2.

在完成所述設定程序之後,該控制單元接著執行方法流程的步驟S2,執行一數據寫入程序。開始進行所述數據寫入程序之前,控制單元對欲寫入該快閃記憶體1的物件(如演算法或應用程式)進行編碼以產生一數據,接著依據該數據而對定址選取的所述第一扇區1BS1和所述第二扇區1BS2執行一頁編程操作,從而使該數據成為儲存在所述第一扇區1BS1之中的所述第一數據,且使該數據之中會經常被修改之部分成為儲存在所述第二扇區1BS2之中的所述第二數據。於此,可將該數據之中會經常被修改之部分視為一第三數據。因此,在依序完成步驟S1以及步驟S2之後,儲存在所述第一扇區1BS1之中的第一數據係含有一第三數據(即,需要經常進行修改之數據),而該第三數據在此一時點係相同於儲存在所述第二扇區1BS2之中的第二數據(即,需要依據應用狀況而進行修改的數據)。After completing the setting procedure, the control unit then executes step S2 of the method flow to execute a data writing procedure. Before starting the data writing process, the control unit codes the object (such as an algorithm or application program) to be written to the flash memory 1 to generate a data, and then performs the address selection according to the data. The first sector 1BS1 and the second sector 1BS2 perform a page programming operation, so that the data becomes the first data stored in the first sector 1BS1, and the data is often The modified part becomes the second data stored in the second sector 1BS2. Here, the part of the data that is frequently modified can be regarded as a third data. Therefore, after step S1 and step S2 are completed in sequence, the first data stored in the first sector 1BS1 contains a third data (ie, data that needs to be modified frequently), and the third data At this point in time, it is the same as the second data stored in the second sector 1BS2 (that is, data that needs to be modified according to the application conditions).

如圖4所示,在完成所述數據寫入程序之後,控制單元係可依實際應用需求而對該快閃記憶體1執行一數據改寫程序(即,步驟S3a)或一數據讀取程序(即,步驟S3b)。執行所述數據改寫程序之時,控制單元係對定址選取的至少一個第二扇區1BS2進行一扇區抹除操作,接著依據一改寫數據而對定址選取的所述第二扇區1BS2執行一頁編程操作。換句話說,在應用本發明之快閃記憶體之操作方法的情況下,自經由一控制單元(如:微控制器、處理器、或電腦)寫入該快閃記憶體1之中的一特定數據被儲存為所述第一扇區1BS1之中的第一數據以及所述第二扇區1BS2之中的第二數據;其中,該第一數據包含該特定數據的全部,而該第二數據則僅包含該特定數據之中需要依據應用狀況而多次修改之部分。故而,執行數據改寫程序之時,控制單元僅需依據一改寫數據而對定址選取的至少一個第二扇區1BS2執行頁編程操作即可,不需要改動儲存在所述第一扇區1BS1之中的第一數據。As shown in Figure 4, after completing the data writing process, the control unit can execute a data rewriting process (ie, step S3a) or a data reading process (step S3a) on the flash memory 1 according to actual application requirements. That is, step S3b). When executing the data rewriting program, the control unit performs a sector erase operation on at least one second sector 1BS2 selected by the address, and then performs a sector erase operation on the second sector 1BS2 selected by the address based on a rewrite data. page programming operations. In other words, when the operating method of the flash memory of the present invention is applied, one of the flash memory 1 is written into the flash memory 1 through a control unit (such as a microcontroller, a processor, or a computer). Specific data is stored as first data in the first sector 1BS1 and second data in the second sector 1BS2; wherein, the first data includes all of the specific data, and the second The data only includes the parts of the specific data that need to be modified multiple times depending on the application conditions. Therefore, when executing the data rewriting program, the control unit only needs to perform a page programming operation on at least one second sector 1BS2 selected by address according to a rewriting data, and does not need to modify the data stored in the first sector 1BS1 the first data.

補充說明的是,NOR型式的快閃記憶體1可被控制單元控制以實現扇區抹除(sector erase)操作或區塊抹除(block erase)操作。因此,扇區為最小抹除單位。並且,在對NOR型式的快閃記憶體1進行數據寫入操作時,必須先執行扇區抹除操作或區塊抹除操作。基於這個原理,如圖5所示,本發明於是原本的複數個扇區(sector)1BS進一步地規劃成複數個第一扇區1BS1和複數個第二扇區1BS2,且利用所述第二扇區1BS2來專門儲存第二數據,即,該些需要經常被修改的數據。It should be added that the NOR type flash memory 1 can be controlled by the control unit to implement a sector erase operation or a block erase operation. Therefore, a sector is the minimum erasure unit. Moreover, when performing a data writing operation on the NOR type flash memory 1, a sector erasing operation or a block erasing operation must be performed first. Based on this principle, as shown in Figure 5, the present invention further plans the original plurality of sectors 1BS into a plurality of first sectors 1BS1 and a plurality of second sectors 1BS2, and uses the second sectors Area 1BS2 is used specifically to store second data, that is, data that needs to be modified frequently.

如圖4所示,在完成所述數據寫入程序之後,控制單元還可依實際應用需求而對該快閃記憶體1執行或一數據讀取程序(即,步驟S3b)。執行所述數據讀取程序之時,係自所述第一扇區1BS1之中讀出所述第一數據,且對應地自所述第二扇區1BS2之中讀出所述第二數據,接著以所述第二數據替換該第一數據所含有的該第三數據,亦即,將第一數據所含有的第三數據(即,需要進行改寫之部分)以所述第二數據取代,從而保證第一數據所含有的全部數據之正確性。As shown in FIG. 4 , after completing the data writing procedure, the control unit can also execute a data reading procedure (ie, step S3b) on the flash memory 1 according to actual application requirements. When the data reading program is executed, the first data is read from the first sector 1BS1, and correspondingly the second data is read from the second sector 1BS2, Then replace the third data contained in the first data with the second data, that is, replace the third data contained in the first data (that is, the part that needs to be rewritten) with the second data, Thereby ensuring the correctness of all data contained in the first data.

如此,上述已完整且清楚地說明本發明之一種快閃記憶體的操作方法;並且,經由上述可得知本發明具有下列優點:In this way, the above has completely and clearly explained the operating method of a flash memory of the present invention; and from the above, it can be seen that the present invention has the following advantages:

(1)本發明揭示一種快閃記憶體的操作方法,係由一控制單元實現,用以對包含複數個存儲區塊的一快閃記憶體進行存取,所述快閃記憶體的操作方法包括一設定程序。執行設定程序時,係將各個存儲區塊內的複數個所述扇區進一步規劃成複數個第一扇區和複數個第二扇區,從而利用所述第一扇區用以儲存一第一數據,且所述第二扇區用以儲存會經常被修改的一第二數據。舉例而言,在一數據被寫入該快閃記憶體之後,該數據便成為儲存在所述第一扇區的第一數據。並且,該數據所含有的會經常修改的部分則成為儲存在所述第二扇區的第二數據。(1) The present invention discloses a flash memory operating method, which is implemented by a control unit for accessing a flash memory including a plurality of storage blocks. The flash memory operating method Includes a setup program. When executing the setting program, the plurality of sectors in each storage block are further planned into a plurality of first sectors and a plurality of second sectors, so that the first sectors are used to store a first data, and the second sector is used to store a second data that is frequently modified. For example, after data is written into the flash memory, the data becomes the first data stored in the first sector. Moreover, the part of the data that is frequently modified becomes the second data stored in the second sector.

(2)進一步地,所述快閃記憶體的操作方法還包括一數據改寫程序,用於對定址選取的至少一個第二扇區進行一扇區抹除操作,接著依據一改寫數據而對定址選取的所述第二扇區執行一頁編程操作。如此設計,即使儲存在第二扇區之中的第二數據經過多次改寫,儲存在第一扇區之中的所述第一數據也不會因此受到任何影響;故此,即使快閃記憶體因數據修改的需求而被執行多次的頁編程操作,該些不需要修改之數據也不會出現數據錯誤的現象。(2) Further, the operating method of the flash memory also includes a data rewriting program for performing a sector erase operation on at least one second sector selected by addressing, and then performing a sector erase operation on the addressed sector based on a rewriting data. The selected second sector performs a page programming operation. With this design, even if the second data stored in the second sector is rewritten multiple times, the first data stored in the first sector will not be affected in any way; therefore, even if the flash memory Page programming operations are performed multiple times due to data modification requirements, and the data that does not need to be modified will not suffer from data errors.

(3)並且,本發明同時揭示一種系統單晶片,其具有一控制單元與一快閃記憶體;其特徵在於,該控制單元採用前如所述本發明之快閃記憶體的操作方法對該快閃記憶體進行存取。(3) Moreover, the present invention also discloses a system single chip, which has a control unit and a flash memory; it is characterized in that the control unit adopts the operating method of the flash memory of the present invention as described above. flash memory for access.

(4)本發明同時提供一種資訊處理裝置,其特徵在於含有如前所述本發明之系統單晶片。在可行的實施例中,該資訊處理裝置是選自於由觸控裝置、影像處理裝置、生物性特徵辨識裝置、智能電視、智能手機、智能手錶、智能手環、平板電腦、筆記型電腦、一體式電腦、無線藍芽耳機、和門禁裝置所組成群組之中的一種電子裝置。(4) The present invention also provides an information processing device, which is characterized by containing the system single chip of the present invention as mentioned above. In a feasible embodiment, the information processing device is selected from the group consisting of a touch device, an image processing device, a biometric identification device, a smart TV, a smart phone, a smart watch, a smart bracelet, a tablet computer, a notebook computer, An electronic device among the group consisting of an all-in-one computer, a wireless Bluetooth headset, and an access control device.

必須加以強調的是,前述本案所揭示者乃為較佳實施例,舉凡局部之變更或修飾而源於本案之技術思想而為熟習該項技藝之人所易於推知者,俱不脫本案之專利權範疇。It must be emphasized that the foregoing disclosed in this case are preferred embodiments. Any partial changes or modifications derived from the technical ideas of this case and easily inferred by those familiar with the art do not deviate from the patent of this case. category of rights.

綜上所陳,本案無論目的、手段與功效,皆顯示其迥異於習知技術,且其首先發明合於實用,確實符合發明之專利要件,懇請  貴審查委員明察,並早日賜予專利俾嘉惠社會,是為至禱。To sum up, regardless of the purpose, means and effects of this case, it shows that it is completely different from the conventional technology, and that the invention is practical first, and indeed meets the patent requirements for inventions. I sincerely ask the review committee to take a clear look and grant the patent as soon as possible for your benefit. Society is a prayer for the Supreme Being.

1:快閃記憶體 1B:存儲區塊 1BS:扇區 1BS1:第一扇區 1BS2:第二扇區 1BSP:頁 S1:執行一設定程序 S2:執行一數據寫入程序 S3a:執行一數據改寫程序 S3b:執行一數據讀取程序 1: Flash memory 1B: Storage block 1BS: sector 1BS1: first sector 1BS2: Second sector 1BSP:page S1: Execute a setting procedure S2: Execute a data writing program S3a: Execute a data rewriting program S3b: Execute a data reading program

圖1為一快閃記憶體的方塊圖; 圖2為一個存儲區塊的第一方塊圖; 圖3為一個扇區的方塊圖; 圖4為本發明之一種快閃記憶體的操作方法的流程圖;以及 圖5為一個存儲區塊B的第二方塊圖。 Figure 1 is a block diagram of a flash memory; Figure 2 is a first block diagram of a memory block; Figure 3 is a block diagram of a sector; Figure 4 is a flow chart of a flash memory operating method according to the present invention; and Figure 5 is a second block diagram of a memory block B.

S1:執行一設定程序 S1: Execute a setting procedure

S2:執行一數據寫入程序 S2: Execute a data writing program

S3a:執行一數據改寫程序 S3a: Execute a data rewriting program

S3b:執行一數據讀取程序 S3b: Execute a data reading program

Claims (6)

一種快閃記憶體的操作方法,係由一控制單元實現,用以對包含複數個存儲區塊的一快閃記憶體進行存取,其中各所述存儲區塊包括複數個扇區,且各所述扇區包括複數個頁;所述快閃記憶體的操作方法包括:一設定程序,將複數個所述扇區規劃成複數個第一扇區和複數個第二扇區,其中所述第一扇區用以儲存一第一數據,且所述第二扇區用以儲存會經常被修改的一第二數據,其中,該第一數據之中含有一第三數據,且該第三數據在所述數據改寫程序被執行之前係與該第二數據相同;一數據改寫程序,對定址選取的至少一個第二扇區進行一扇區抹除操作,接著依據一改寫數據而對定址選取的所述第二扇區執行一頁編程操作,以及;一數據讀取程序,自所述第一扇區之中讀出所述第一數據,且對應地自所述第二扇區之中讀出所述第二數據,接著以所述第二數據替換該第一數據所含有的該第三數據。 An operating method of a flash memory is implemented by a control unit for accessing a flash memory including a plurality of storage blocks, wherein each of the storage blocks includes a plurality of sectors, and each of the storage blocks includes a plurality of sectors. The sector includes a plurality of pages; the operating method of the flash memory includes: a setting program to plan the plurality of sectors into a plurality of first sectors and a plurality of second sectors, wherein the The first sector is used to store a first data, and the second sector is used to store a second data that is frequently modified, wherein the first data contains a third data, and the third data The data is the same as the second data before the data rewriting program is executed; a data rewriting program performs a sector erase operation on at least one second sector selected by the address, and then selects the address according to a rewrite data The second sector performs a page programming operation, and; a data reading program reads the first data from the first sector, and correspondingly reads the first data from the second sector The second data is read, and then the third data contained in the first data is replaced with the second data. 一種快閃記憶體的操作方法,係由一控制單元實現,用以對包含複數個存儲區塊的一快閃記憶體進行存取,其中各所述存儲區塊包括複數個扇區,且各所述扇區包括複數個頁;所述快閃記憶體的操作方法包括:一設定程序,將複數個所述扇區規劃成複數個第一扇區和複數個第二扇區,其中所述第一扇區用以儲存一第一數據,且所述第二扇區用以儲存會經常被修改的一第二數據,其中,該第一數據之中含有一第三數據,且該第三數據在所述數據改寫程序被執行之前係與該第二數據相同;一數據改寫程序,對定址選取的至少一個第二扇區進行一扇區抹除操作,接著依據一改寫數據而對定址選取的所述第二扇區執行一頁編程操作,以及;一數據寫入程序,依據一數據而對定址選取的所述第一扇區和所述第二扇區執行所述頁編程操作,從而使該數據成為儲存在所述第一扇區之中的所述第一數據,且使該數據之中會經常被修改之部分成為儲存在所述第二扇區之中的所述第二數據。 An operating method of a flash memory is implemented by a control unit for accessing a flash memory including a plurality of storage blocks, wherein each of the storage blocks includes a plurality of sectors, and each of the storage blocks includes a plurality of sectors. The sector includes a plurality of pages; the operating method of the flash memory includes: a setting program to plan the plurality of sectors into a plurality of first sectors and a plurality of second sectors, wherein the The first sector is used to store a first data, and the second sector is used to store a second data that is frequently modified, wherein the first data contains a third data, and the third data The data is the same as the second data before the data rewriting program is executed; a data rewriting program performs a sector erase operation on at least one second sector selected by the address, and then selects the address according to a rewrite data The second sector performs a page programming operation, and; a data writing program performs the page programming operation on the first sector and the second sector selected by addressing according to a data, thereby Make the data become the first data stored in the first sector, and make the part of the data that is frequently modified become the second data stored in the second sector . 一種系統單晶片,具有一控制單元與一快閃記憶體,該快閃記憶體包含複數個存儲區塊,各所述存儲區塊包括複數個扇區,且各所述扇區包括複數個頁;其特徵在於,該控制單元採用一快閃記憶體的操作方法對該快閃記憶體進行存取,且所述快閃記憶體的操作方法包括:一設定程序,將複數個所述扇區規劃成複數個第一扇區和複數個第二扇區,其中所述第一扇區用以儲存一第一數據,且所述第二扇區用以儲存會經常被修改的一第二數據,其中,該第一數據之中含有一第三數據,且該第三數據在所述數據改寫程序被執行之前係與該第二數據相同;一數據改寫程序,對定址選取的至少一個第二扇區進行一扇區抹除操作,接著依據一改寫數據而對定址選取的所述第二扇區執行一頁編程操作;以及一數據讀取程序,自所述第一扇區之中讀出所述第一數據,且對應地自所述第二扇區之中讀出所述第二數據,接著以所述第二數據替換該第一數據所含有的該第三數據。 A system single chip has a control unit and a flash memory. The flash memory includes a plurality of storage blocks, each of the storage blocks includes a plurality of sectors, and each of the sectors includes a plurality of pages. ; It is characterized in that the control unit uses a flash memory operating method to access the flash memory, and the flash memory operating method includes: a setting program to set a plurality of the sectors Planned into a plurality of first sectors and a plurality of second sectors, wherein the first sector is used to store a first data, and the second sector is used to store a second data that is frequently modified. , wherein the first data contains a third data, and the third data is the same as the second data before the data rewriting program is executed; a data rewriting program is configured to address and select at least one second The sector performs a sector erase operation, and then performs a page programming operation on the second sector selected by addressing according to a rewrite data; and a data reading program reads out from the first sector The first data, and correspondingly read the second data from the second sector, and then replace the third data contained in the first data with the second data. 如請求項3所述之系統單晶片,其中,所述系統單晶片為選自於由顯示驅動晶片、觸控晶片、觸控顯示整合晶片、生物性特徵辨識晶片、車用電子晶片、時序控制晶片、和微控制晶片所組成群組之中一種電子晶片。 The system single chip according to claim 3, wherein the system single chip is selected from the group consisting of a display driver chip, a touch chip, a touch display integrated chip, a biometric identification chip, a vehicle electronic chip, and a timing control chip. An electronic chip among the group consisting of chip and microcontroller chip. 一種系統單晶片,具有一控制單元與一快閃記憶體,該快閃記憶體包含複數個存儲區塊,各所述存儲區塊包括複數個扇區,且各所述扇區包括複數個頁;其特徵在於,該控制單元採用一快閃記憶體的操作方法對該快閃記憶體進行存取,且所述快閃記憶體的操作方法包括:一設定程序,將複數個所述扇區規劃成複數個第一扇區和複數個第二扇區,其中所述第一扇區用以儲存一第一數據,且所述第二扇區用以儲存會經常被修改的一第二數據,其中,該第一數據之中含有一第三數據,且該第三數據在所述數據改寫程序被執行之前係與該第二數據相同;一數據改寫程序,對定址選取的至少一個第二扇區進行一扇區抹除操作,接著依據一改寫數據而對定址選取的所述第二扇區執行一頁編程操作;以及 一數據寫入程序,依據一數據而對定址選取的所述第一扇區和所述第二扇區執行所述頁編程操作,從而使該數據成為儲存在所述第一扇區之中的所述第一數據,且使該數據之中會經常被修改之部分成為儲存在所述第二扇區之中的所述第二數據。 A system single chip has a control unit and a flash memory. The flash memory includes a plurality of storage blocks, each of the storage blocks includes a plurality of sectors, and each of the sectors includes a plurality of pages. ; It is characterized in that the control unit uses a flash memory operating method to access the flash memory, and the flash memory operating method includes: a setting program to set a plurality of the sectors Planned into a plurality of first sectors and a plurality of second sectors, wherein the first sector is used to store a first data, and the second sector is used to store a second data that is frequently modified. , wherein the first data contains a third data, and the third data is the same as the second data before the data rewriting program is executed; a data rewriting program is configured to address and select at least one second performing a sector erase operation on the sector, and then performing a page programming operation on the addressed second sector selected according to a rewrite data; and A data writing program performs the page programming operation on the first sector and the second sector selected by addressing according to a data, so that the data becomes stored in the first sector. The first data, and the part of the data that is frequently modified becomes the second data stored in the second sector. 一種資訊處理裝置,其特徵在於,含有如請求項3至請求項5中任一項所述之系統單晶片。 An information processing device, characterized by including the system single chip as described in any one of claims 3 to 5.
TW110116444A 2021-05-06 2021-05-06 Operation method of flash memory, system single chip and information processing device TWI811674B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW110116444A TWI811674B (en) 2021-05-06 2021-05-06 Operation method of flash memory, system single chip and information processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW110116444A TWI811674B (en) 2021-05-06 2021-05-06 Operation method of flash memory, system single chip and information processing device

Publications (2)

Publication Number Publication Date
TW202244913A TW202244913A (en) 2022-11-16
TWI811674B true TWI811674B (en) 2023-08-11

Family

ID=85793070

Family Applications (1)

Application Number Title Priority Date Filing Date
TW110116444A TWI811674B (en) 2021-05-06 2021-05-06 Operation method of flash memory, system single chip and information processing device

Country Status (1)

Country Link
TW (1) TWI811674B (en)

Citations (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW200828099A (en) * 2006-12-19 2008-07-01 Realtek Semiconductor Corp Flash memory device and renewing method, and program search method
TW200847169A (en) * 2007-01-30 2008-12-01 Micron Technology Inc Memory device architectures and operation
US20110060872A1 (en) * 2003-09-29 2011-03-10 Yoshiyuki Tanaka Semiconductor storage device and method of controlling the same
US20120246391A1 (en) * 2011-01-27 2012-09-27 Anobit Technologies Block management schemes in hybrid slc/mlc memory
TW201413451A (en) * 2012-09-27 2014-04-01 Skymedi Corp Method of data collection in a non-volatile memory
US20150293713A1 (en) * 2014-04-15 2015-10-15 Jung-Min Seo Storage controller, storage device, storage system and method of operating the storage controller
CN105677257A (en) * 2016-02-04 2016-06-15 联想(北京)有限公司 Data storage method and electronic equipment
US20160328154A1 (en) * 2014-02-26 2016-11-10 Hitachi, Ltd. Storage device, apparatus having storage device, and storage control method
US20160371023A1 (en) * 2015-06-18 2016-12-22 International Business Machines Corporation Point in time copy technique using a block level of granularity
US20170017571A1 (en) * 2015-07-17 2017-01-19 Samsung Electronics Co., Ltd. Method and apparatus fori n-line deduplication in storage devices
TW201719667A (en) * 2015-11-23 2017-06-01 愛思開海力士有限公司 Memory system and operating method thereof
US20170185305A1 (en) * 2015-12-28 2017-06-29 International Business Machines Corporation Optimization of disk sector duplication in a heterogeneous cloud systems environment
US20170269850A1 (en) * 2015-02-11 2017-09-21 Violin Memory Inc. System and method for granular deduplication
US20180052751A1 (en) * 2015-12-14 2018-02-22 International Business Machines Corporation Storing data in multi-region storage devices
TW201824271A (en) * 2016-12-28 2018-07-01 愛思開海力士有限公司 Data storage device and operating method thereof
US20190155792A1 (en) * 2016-06-01 2019-05-23 Samsung Electronics Co., Ltd. Electronic device and file data journaling method of electronic device
US10310924B2 (en) * 2015-12-18 2019-06-04 Samsung Electronics Co., Ltd. Storage device and read reclaim method thereof
US20200401311A1 (en) * 2015-07-23 2020-12-24 Toshiba Memory Corporation Memory system for controlling nonvolatile memory
CN112634975A (en) * 2020-12-24 2021-04-09 杭州华澜微电子股份有限公司 Data storage error correction method and device and electronic equipment

Patent Citations (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110060872A1 (en) * 2003-09-29 2011-03-10 Yoshiyuki Tanaka Semiconductor storage device and method of controlling the same
TW200828099A (en) * 2006-12-19 2008-07-01 Realtek Semiconductor Corp Flash memory device and renewing method, and program search method
TW200847169A (en) * 2007-01-30 2008-12-01 Micron Technology Inc Memory device architectures and operation
US20120246391A1 (en) * 2011-01-27 2012-09-27 Anobit Technologies Block management schemes in hybrid slc/mlc memory
TW201413451A (en) * 2012-09-27 2014-04-01 Skymedi Corp Method of data collection in a non-volatile memory
US20160328154A1 (en) * 2014-02-26 2016-11-10 Hitachi, Ltd. Storage device, apparatus having storage device, and storage control method
US20150293713A1 (en) * 2014-04-15 2015-10-15 Jung-Min Seo Storage controller, storage device, storage system and method of operating the storage controller
US20170269850A1 (en) * 2015-02-11 2017-09-21 Violin Memory Inc. System and method for granular deduplication
US20160371023A1 (en) * 2015-06-18 2016-12-22 International Business Machines Corporation Point in time copy technique using a block level of granularity
US20170017571A1 (en) * 2015-07-17 2017-01-19 Samsung Electronics Co., Ltd. Method and apparatus fori n-line deduplication in storage devices
US20200401311A1 (en) * 2015-07-23 2020-12-24 Toshiba Memory Corporation Memory system for controlling nonvolatile memory
TW201719667A (en) * 2015-11-23 2017-06-01 愛思開海力士有限公司 Memory system and operating method thereof
US20180052751A1 (en) * 2015-12-14 2018-02-22 International Business Machines Corporation Storing data in multi-region storage devices
US10310924B2 (en) * 2015-12-18 2019-06-04 Samsung Electronics Co., Ltd. Storage device and read reclaim method thereof
US20170185305A1 (en) * 2015-12-28 2017-06-29 International Business Machines Corporation Optimization of disk sector duplication in a heterogeneous cloud systems environment
CN105677257A (en) * 2016-02-04 2016-06-15 联想(北京)有限公司 Data storage method and electronic equipment
US20190155792A1 (en) * 2016-06-01 2019-05-23 Samsung Electronics Co., Ltd. Electronic device and file data journaling method of electronic device
TW201824271A (en) * 2016-12-28 2018-07-01 愛思開海力士有限公司 Data storage device and operating method thereof
CN112634975A (en) * 2020-12-24 2021-04-09 杭州华澜微电子股份有限公司 Data storage error correction method and device and electronic equipment

Also Published As

Publication number Publication date
TW202244913A (en) 2022-11-16

Similar Documents

Publication Publication Date Title
US8055873B2 (en) Data writing method for flash memory, and controller and system using the same
US8250286B2 (en) Block management method, and storage system and controller using the same
JP5478855B2 (en) Nonvolatile memory control method and semiconductor device
US8131911B2 (en) Data writing method, and flash storage system and controller using the same
US8296502B2 (en) Data management method for flash memory and storage system and controller using the same
US20080016267A1 (en) Memory controller, flash memory system having memory controller, and method for controlling flash memory
US20070067603A1 (en) Nonvolatile memory device and the method of generation of the address translation table
US10475516B2 (en) Data storage device and data erasing method wherein after erasing process, predetermined value is written to indicate completion of said erasing method
KR20060051314A (en) Controller, memory card and method for controlling the same
US20170364265A1 (en) Data storage device and data maintenance method thereof
US9940058B2 (en) Data storage device and data maintenance method thereof
KR20080007470A (en) Nonvolatile memory system using magneto-resistive random access memory(mram)
TWI676933B (en) Firmware updating method
CN105097033A (en) Non-volatile semiconductor memory device and writing method thereof
US8417909B2 (en) Block management and data writing method, and flash memory storage system and controller using the same
TWI811674B (en) Operation method of flash memory, system single chip and information processing device
CN110489051A (en) The programmed method of data memory device and system information
US20070022242A1 (en) [structure of access of nand flash memory]
US11216381B2 (en) Data storage devices and data processing methods
CN103577344A (en) Data writing method, memory controller and memory storage device
US7899974B2 (en) Nonvolatile memory, mapping control apparatus and method of the same
US8312205B2 (en) Method for identifying a page of a block of flash memory, and associated memory device
TW202103006A (en) OTP programming method, control chip and information processing device in which the control chip has a register unit, an OTP memory unit, a programming control unit and a reading control unit
JP2005531842A (en) Non-volatile memory writing method and system for realizing the method
JP3471838B2 (en) How to manage circular sequential files