TWI780653B - Method for identifying flash memory type and device thereof - Google Patents

Method for identifying flash memory type and device thereof Download PDF

Info

Publication number
TWI780653B
TWI780653B TW110113131A TW110113131A TWI780653B TW I780653 B TWI780653 B TW I780653B TW 110113131 A TW110113131 A TW 110113131A TW 110113131 A TW110113131 A TW 110113131A TW I780653 B TWI780653 B TW I780653B
Authority
TW
Taiwan
Prior art keywords
flash memory
identifying
nand flash
type
read
Prior art date
Application number
TW110113131A
Other languages
Chinese (zh)
Other versions
TW202132996A (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 TW110113131A priority Critical patent/TWI780653B/en
Publication of TW202132996A publication Critical patent/TW202132996A/en
Application granted granted Critical
Publication of TWI780653B publication Critical patent/TWI780653B/en

Links

Images

Landscapes

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

Abstract

A method for identifying flash memory type and a device are provided. The method is executed by a processor, comprising: driving a flash memory interface in a specific setting state to transmit a read command for reading the flash memory identity to the flash memory module using a specific communication protocol; if a read attempt fails, change the setting state of the flash memory interface, the communication protocol, or both, and then perform a read operation until the pre-determined adjustments have been tried; and if the reading attempt successes, the read flash memory identity is stored in non-volatile memory, allowing an electronic device to write the corresponding firmware to the specified address in the non-volatile memory or/and flash module in the master IC based on the flash identification code.

Description

識別快閃記憶體類型的方法及其裝置Method and device for identifying type of flash memory

本發明涉及一種儲存裝置,且特別是一種識別快閃記憶體類型方法及裝置。The invention relates to a storage device, and in particular to a method and device for identifying the type of flash memory.

在固態硬碟(Solid-state disk;SSD)、隨身碟(Pen-drive)、安全數位卡(Secure Digital Memory Card;SD card)等各種儲存產品中,會使用到很多類型的NAND快閃記憶體,比如廠商有英特爾(Intel)、美光(Micron)、東芝(TOSHIBA)、三星(SAMSUNG)、海力士(HYNIX),類別有單層單元(Single-level cell;SLC)、多層單元(Multi-level cell;MLC)、三層單元(Triple-level cell;TLC)、四層單元(Quad-level cell;QLC),介面有單倍資料傳輸率(Single data rate;SDR)、第一代雙倍資料傳輸率(Double data rate;DDR)、第二代雙倍資料傳輸率(Double data rate 2;DDR2)、第三代雙倍資料傳輸率(Double data rate 3;DDR3)等。不同廠商不同類別的NAND快閃記憶體支援的命令格式是不一樣的,所以需要先知道NAND快閃記憶體具體類別,才能下正確的命令去讀寫NAND快閃記憶體,並得到正確的結果。Many types of NAND flash memory are used in various storage products such as Solid-state disk (SSD), Pen-drive, Secure Digital Memory Card (SD card) , For example, manufacturers include Intel (Intel), Micron (Micron), Toshiba (TOSHIBA), Samsung (SAMSUNG), Hynix (HYNIX), and the categories include single-level cell (Single-level cell; SLC), multi-level cell (Multi-level cell) cell; MLC), three-level cell (Triple-level cell; TLC), four-level cell (Quad-level cell; QLC), the interface has a single data rate (Single data rate; SDR), the first generation double data rate Transmission rate (Double data rate; DDR), second-generation double data rate (Double data rate 2; DDR2), third-generation double data rate (Double data rate 3; DDR3), etc. Different manufacturers and different types of NAND flash memory support different command formats, so you need to know the specific type of NAND flash memory before you can issue the correct command to read and write NAND flash memory and get the correct result .

現有技術的做法是在還沒開卡前,用人工的方式得知連接於主控的NAND快閃記憶體的製造廠商與類別等資訊,然後將相應的NAND快閃記憶體的識別碼(Identity;ID)燒錄至主控中的電子熔絲(eFuse)結構,並且在重啟(Reset)後根據電子熔絲中的資訊將對應的NAND快閃記憶體韌體(Firmware ;FW)寫入主控中的非揮發性記憶體或者NAND快閃記憶體中,用於在儲存產品出廠後讓主機能夠通過主控積體電路(Integrated Circuit;IC)運行的韌體來讀寫NAND快閃記憶體並存取其中的資料。然而電子熔絲結構的成本較高,此外,電子熔絲的資訊一旦燒錄後便不能抹除,使得在更換成不同製造廠商或不同類別的NAND快閃記憶體後,電子熔絲結構中儲存的NAND快閃記憶體ID與新設置的NAND快閃記憶體不一致。如果根據舊的NAND快閃記憶體ID而獲得的韌體,並無法正確的讀寫新設置的NAND快閃記憶體。因此,一旦印刷電路板上設置的NAND快閃記憶體更換後,用來操作NAND快閃記憶體的主控IC也必須一併更換,使得製造儲存產品時不具彈性。有鑑於此,如何減輕或消除上述相關領域的缺失,實為有待解決的問題。The method in the prior art is to obtain information such as the manufacturer and category of the NAND flash memory connected to the main control by manual means before the card is opened, and then assign the corresponding NAND flash memory identification code (Identity ; ID) into the electronic fuse (eFuse) structure in the main control, and write the corresponding NAND flash memory firmware (Firmware; FW) into the main control according to the information in the electronic fuse after the reset (Reset). In the non-volatile memory or NAND flash memory in the controller, it is used to allow the host to read and write the NAND flash memory through the firmware running on the main control integrated circuit (Integrated Circuit; IC) after the storage product leaves the factory and access the data in it. However, the cost of the electronic fuse structure is relatively high. In addition, once the information of the electronic fuse is burned, it cannot be erased, so that after replacing it with a different manufacturer or a different type of NAND flash memory, the information stored in the electronic fuse structure The ID of the NAND flash memory is inconsistent with the newly set NAND flash memory. If the firmware obtained according to the old NAND flash memory ID, cannot correctly read and write the newly configured NAND flash memory. Therefore, once the NAND flash memory installed on the printed circuit board is replaced, the main control IC used to operate the NAND flash memory must also be replaced together, making it inflexible in manufacturing storage products. In view of this, how to alleviate or eliminate the deficiencies in the above-mentioned related fields is a problem to be solved.

在一些實施例中,一種識別快閃記憶體類型的方法,該方法由處理器在載入並執行程式碼時執行。該方法包含驅動在特定的設置狀態下的快閃記憶體介面使用特定的通信協定發出用於讀取快閃記憶體識別碼的讀取命令給快閃記憶體模組。如果讀取失敗,改變該快閃記憶體介面的該設置狀態、該通信協定,或以上兩者,再進行一次讀取操作,直到預設的調整都嘗試過為止。以及如果讀取成功,將讀出的快閃記憶體識別碼儲存到非揮發性記憶體,使得電子裝置依據快閃記憶體識別碼將相應的韌體寫入主控積體電路中的非揮發性記憶體或/及快閃記憶體模組中的指定位址;其中,快閃記憶體介面能夠調整的設置包含提供給快閃記憶體模組的數位電壓及傳送給快閃記憶體模組的位址資訊的時脈週期數目。In some embodiments, a method of identifying a type of flash memory is performed by a processor when loading and executing program code. The method includes driving the flash memory interface in a specific setting state to issue a read command for reading the flash memory identification code to the flash memory module by using a specific communication protocol. If the read fails, change the setting state of the flash memory interface, the communication protocol, or both, and perform a read operation again until all preset adjustments have been tried. And if the reading is successful, store the read flash memory identification code in the non-volatile memory, so that the electronic device writes the corresponding firmware into the non-volatile memory in the main control integrated circuit according to the flash memory identification code. The specified address in the non-volatile memory or/and the flash memory module; wherein, the settings that the flash memory interface can adjust include the digital voltage supplied to the flash memory module and the digital voltage sent to the flash memory module The number of clock cycles of the address information of .

在一些實施例中,一種識別快閃記憶體類型裝置,包含快閃記憶體介面、非揮發性記憶體及處理器。快閃記憶體介面耦接快閃記憶體模組,處理器耦接快閃記憶體介面及非揮發性記憶體。處理器用於載入及執行相關程式碼時實現如上所述的方法步驟。In some embodiments, a device for identifying a flash memory type includes a flash memory interface, a non-volatile memory, and a processor. The flash memory interface is coupled to the flash memory module, and the processor is coupled to the flash memory interface and the non-volatile memory. When the processor is used for loading and executing related program codes, the above-mentioned method steps are realized.

綜上所述,根據本發明之識別快閃記憶體類型方法及裝置之一些實施例,可自動識別NAND快閃記憶體類型,以及自動將識別的NAND快閃記憶體識別碼儲存到非揮發性記憶體,使得電子裝置依據NAND快閃記憶體識別碼將相應的韌體寫入主控積體電路中的非揮發性記憶體或以及NAND快閃記憶體模組中的指定位址,且能夠解決傳統用人工識別再燒錄電子熔絲所產生的高成本及製造彈性低的缺點。In summary, according to some embodiments of the method and device for identifying the type of flash memory of the present invention, the type of NAND flash memory can be automatically identified, and the identified NAND flash memory identification code can be automatically stored in a non-volatile memory. Memory, so that the electronic device writes the corresponding firmware into the non-volatile memory in the main control integrated circuit or the specified address in the NAND flash memory module according to the NAND flash memory identification code, and can Solve the shortcomings of high cost and low manufacturing flexibility caused by traditional manual identification and reprogramming of electronic fuses.

以下將配合相關附圖來說明本發明的實施例。在這些附圖中,相同的標號表示相同或類似的元件或方法流程。Embodiments of the present invention will be described below in conjunction with related drawings. In these drawings, the same reference numerals indicate the same or similar elements or method flows.

必須瞭解的是,使用在本說明書中的“包含”、“包括”等詞,是用於表示存在特定的技術特徵、數值、方法步驟、作業處理、元件和/或元件,但並不排除可加上更多的技術特徵、數值、方法步驟、作業處理、元件、元件,或以上的任意組合。It must be understood that words such as "comprising" and "including" used in this specification are used to indicate the existence of specific technical features, values, method steps, operations, components and/or components, but do not exclude possible Add more technical features, values, method steps, job processing, components, components, or any combination of the above.

本發明中使用如“第一”、“第二”、“第三”等詞是用來修飾請求項中的元件,並非用來表示之間具有優先權順序,先行關係,或者是一個元件先於另一個元件,或者是執行方法步驟時的時間先後順序,僅用來區別具有相同名字的元件。Words such as "first", "second", and "third" used in the present invention are used to modify the elements in the claims, and are not used to indicate that there is a priority order, a prior relationship between them, or that a component comes first. The reference to another element, or the chronological order in which method steps are performed, are only used to distinguish elements with the same name.

必須瞭解的是,當元件描述為“連接”或“耦接”至另一元件時,可以是直接連結、或耦接至其他元件,可能出現中間元件。相反地,當元件描述為“直接連接”或“直接耦接”至另一元件時,其中不存在任何中間元件。使用於描述元件之間關係的其他語詞也可類似方式解讀,例如“介於”相對於“直接介於”,或者是“鄰接”相對於“直接鄰接”等等。It must be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element, intervening elements may be present. In contrast, when an element is described as being "directly connected" or "directly coupled" to another element, there are no intervening elements present. Other words used to describe the relationship between elements may be interpreted in a similar manner, such as "between" versus "directly between," or "adjacent" versus "directly adjacent," and so forth.

請參照參圖1,圖1為依據本案之儲存裝置之一實施例之方塊圖。儲存產品100包含主控積體電路(Integrated Circuit;IC)110及多個NAND快閃記憶體模組131~138。儲存產品100可以是固態硬碟(Solid-state disk;SSD)、隨身碟(Pen-drive)、安全數位卡(Secure Digital Memory Card;SD card)等,通過串列先進技術附件(Serial advanced technology attachment;SATA)、快速周邊組件互連(Peripheral component interconnect express;PCI-E)、通用序列匯流排(Universal serial bus;USB)的介面及關聯的通信協定從主機(Host)接收讀取、寫入、抹除等命令,以及相關參數與資料,然後據以執行。Please refer to FIG. 1 , which is a block diagram of an embodiment of a storage device according to the present application. The storage product 100 includes a main control integrated circuit (Integrated Circuit; IC) 110 and a plurality of NAND flash memory modules 131 - 138 . The storage product 100 can be a solid-state disk (Solid-state disk; SSD), a pen-drive (Pen-drive), a secure digital memory card (Secure Digital Memory Card; SD card), etc., through serial advanced technology attachment (Serial advanced technology attachment) ; SATA), fast peripheral component interconnection (Peripheral component interconnect express; PCI-E), universal serial bus (Universal serial bus; USB) interface and associated communication protocols from the host (Host) to receive read, write, Commands such as erasing, as well as related parameters and data, are then executed accordingly.

主控IC110可連接多個記憶體庫(Memory bank),每個記憶體庫可包含多個NAND快閃記憶體模組,例如,第一個記憶體庫包含NAND快閃記憶體模組131及132、第二個記憶體庫包含NAND快閃記憶體模組133及134,以此類推,使得同一個記憶體庫中的NAND快閃記憶體模組能夠共用資料線。主控IC110可以使用開放NAND快閃記憶體(Open NAND Flash Interface;ONFI)、開關(Toggle)或其他通信協定與NAND快閃記憶體模組131~138溝通,用於從特定NAND快閃記憶體模組讀取資料,寫入資料到特定NAND快閃記憶體模組,或者抹除特定NAND快閃記憶體模組中指定實體區塊的資料。NAND快閃記憶體模組131~138可以是由英特爾(Intel)、美光(Micron)、東芝(TOSHIBA)、三星(SAMSUNG)、海力士(HYNIX)製造,提供大量的資料儲存能力,通常是數百千百萬位元組(Gigabytes),甚至是數兆百萬位元組(Terabytes)。NAND快閃記憶體模組131~138可以是單層單元(Single-level cell;SLC)、多層單元(Multi-level cell;MLC)、三層單元(Triple-level cell;TLC)、四層單元(Quad-level cell;QLC)等不同類型的模組。NAND快閃記憶體模組131~138可以包含單倍資料傳輸率(Single data rate;SDR)、第二代雙倍資料傳輸率(Double data rate 2;DDR2)、第三代雙倍資料傳輸率(Double data rate 3;DDR3)等不同類型的介面。The main control IC 110 can be connected to multiple memory banks (Memory banks), and each memory bank can contain multiple NAND flash memory modules, for example, the first memory bank contains NAND flash memory modules 131 and 132. The second memory bank includes NAND flash memory modules 133 and 134, and so on, so that the NAND flash memory modules in the same memory bank can share data lines. The main control IC 110 can use Open NAND Flash Memory (Open NAND Flash Interface; ONFI), Switch (Toggle) or other communication protocols to communicate with the NAND Flash Memory Modules 131-138, and is used to transfer from a specific NAND Flash Memory The module reads data, writes data to a specific NAND flash memory module, or erases the data of a specified physical block in a specific NAND flash memory module. NAND flash memory modules 131-138 can be manufactured by Intel (Intel), Micron (Micron), Toshiba (TOSHIBA), Samsung (SAMSUNG), Hynix (HYNIX), provide a large amount of data storage capacity, usually digital Hundreds of gigabytes (Gigabytes), or even trillions of megabytes (Terabytes). NAND flash memory modules 131-138 can be single-level cell (Single-level cell; SLC), multi-level cell (Multi-level cell; MLC), triple-level cell (Triple-level cell; TLC), quadruple-level cell (Quad-level cell; QLC) and other different types of modules. NAND flash memory modules 131-138 can include single data rate (Single data rate; SDR), second generation double data rate (Double data rate 2; DDR2), third generation double data rate (Double data rate 3; DDR3) and other different types of interfaces.

請參照圖2,圖2係為依據本案之主控積體電路110之一實施例之方塊圖。在一些實施例中,主控IC110包含處理器210、主機介面230、快閃記憶體介面250及非揮發性記憶體(Non-volatile memory)270。非揮發性記憶體270可以使用靜態隨機存取記憶體(Static random access memory;SRAM)來實現,用於儲存自我調整識別模組272的程式碼。處理器210可使用通用硬體(例如,單一處理器、具平行處理能力的多處理器、圖形處理器或其他具運算能力的處理器)來實現,並且在載入與執行自我調整識別模組272的程式碼時,完成之後描述的識別快閃記憶體類型的自我調整方法。非揮發性記憶體270也可以用來儲存識別結果274,例如,記憶體庫的狀態、NAND快閃記憶體模組131~138的識別碼(Identity;ID)等。主機介面230耦接主機,快閃記憶體介面250耦接NAND快閃記憶體模組131~138,處理器210耦接主機介面230、快閃記憶體介面250及非揮發性記憶體270。處理器210可以通過主機介面230與主機通信,並且通過快閃記憶體介面250與NAND快閃記憶體模組131~138通信。快閃記憶體介面250包含多個暫存器,讓處理器210可通過改變暫存器的內容來調整快閃記憶體介面250的實體組態(Physical configurations)。Please refer to FIG. 2 . FIG. 2 is a block diagram of an embodiment of the main control integrated circuit 110 according to the present application. In some embodiments, the main control IC 110 includes a processor 210 , a host interface 230 , a flash memory interface 250 and a non-volatile memory (Non-volatile memory) 270 . The non-volatile memory 270 can be realized by using a static random access memory (SRAM), and is used for storing the program code of the self-adjusting identification module 272 . The processor 210 can be implemented using general-purpose hardware (for example, a single processor, a multi-processor with parallel processing capability, a graphics processing unit, or other processors with computing capabilities), and when loading and executing the self-adjusting identification module 272 code, complete the self-tuning method for identifying the type of flash memory described later. The non-volatile memory 270 can also be used to store the identification result 274 , for example, the state of the memory bank, the identification codes (Identity; ID) of the NAND flash memory modules 131 - 138 , and the like. The host interface 230 is coupled to the host, the flash memory interface 250 is coupled to the NAND flash memory modules 131 - 138 , and the processor 210 is coupled to the host interface 230 , the flash memory interface 250 and the non-volatile memory 270 . The processor 210 can communicate with the host through the host interface 230 , and communicate with the NAND flash memory modules 131 - 138 through the flash memory interface 250 . The flash memory interface 250 includes a plurality of registers, so that the processor 210 can adjust the physical configurations (Physical configurations) of the flash memory interface 250 by changing the contents of the registers.

為了克服如上所述使用人工作業搭配電子熔絲帶來的缺點,從一個面向來說,本發明實施例提出在開卡成功前由主控IC110執行自動化處理,用來獲得NAND快閃記憶體ID。但一開始主控IC110並不知道記憶體庫上是否存在NAND快閃記憶體模組,以及NAND快閃記憶體模組的類別,因此,主控IC110執行一種識別快閃記憶體類型的自我調整方法,包含類似嘗試錯誤(Trial and error)的機制。也就是說,處理器210具有複數個識別模式,該主控IC110會依序使用不同識別模式來發出用於讀取NAND快閃記憶體ID的讀取命令給NAND快閃記憶體模組131~138中的一個或多個,直到讀取成功。當讀取成功,便表示主控IC110已得知NAND快閃記憶體模組的類別。一實施例中,識別模式包括有快閃記憶體介面組態、通信協定。詳細來說,處理器210載入並執行自我調整識別模組272的程式碼時驅動在特定設置狀態下的快閃記憶體介面250使用特定通信協定發出用於讀取NAND快閃記憶體ID的讀取命令給NAND快閃記憶體模組131~138中的一個或多個。如果讀取失敗,則處理器210改變快閃記憶體介面250的設置狀態、使用的通信協定,或以上兩者,再進行一次讀取作業,直到預設的調整都嘗試過為止。一旦讀取成功,則處理器210將讀出的NAND快閃記憶體ID儲存到非揮發性記憶體270,使得一個電子裝置能夠依據NAND快閃記憶體ID將相應的韌體寫入非揮發性記憶體270或NAND快閃記憶體模組131~138中指定實體區塊的指定位址,用於完成開卡作業。如果所有預設的調整都嘗試過還沒有成功讀取NAND快閃記憶體ID,則回饋錯誤資訊給主機或作業人員,用於進行進一步的檢測與錯誤排除作業或是改由人工設定。其中,可以調整的通信協定包含SDR協定及DDR2協定,快閃記憶體介面250中能夠調整的組態包含提供給NAND快閃記憶體模組131~138的數位電壓(VCCQ)及傳送給NAND快閃記憶體模組131~138的位址資訊的時脈週期數目。詳細說明如後:In order to overcome the disadvantages of using manual work with electronic fuses, from one aspect, the embodiment of the present invention proposes that the main control IC 110 executes automatic processing to obtain the NAND flash memory ID before the card is activated successfully. But at the beginning, the main control IC110 does not know whether there is a NAND flash memory module on the memory bank, and the type of the NAND flash memory module. Therefore, the main control IC110 performs a self-adjustment to identify the type of the flash memory method, including a trial-and-error-like mechanism. That is to say, the processor 210 has a plurality of identification modes, and the main control IC 110 will sequentially use different identification modes to issue a read command for reading the ID of the NAND flash memory to the NAND flash memory module 131˜ One or more of 138 until the read succeeds. When the reading is successful, it means that the main control IC 110 has learned the type of the NAND flash memory module. In one embodiment, the identification mode includes flash memory interface configuration and communication protocol. In detail, when the processor 210 loads and executes the program code of the self-adjustment identification module 272, it drives the flash memory interface 250 in a specific setting state to use a specific communication protocol to send a message for reading the NAND flash memory ID. The read command is sent to one or more of the NAND flash memory modules 131-138. If the read fails, the processor 210 changes the setting state of the flash memory interface 250, the communication protocol used, or both, and performs a read operation again until all preset adjustments have been tried. Once the reading is successful, the processor 210 stores the read NAND flash memory ID into the non-volatile memory 270, so that an electronic device can write the corresponding firmware into the non-volatile memory according to the NAND flash memory ID. The specified addresses of the specified physical blocks in the memory 270 or the NAND flash memory modules 131-138 are used to complete the card opening operation. If all preset adjustments have been tried and the NAND flash memory ID has not been successfully read, an error message will be fed back to the host or the operator for further detection and error removal or manual setting. Among them, the adjustable communication protocol includes SDR protocol and DDR2 protocol, and the adjustable configuration in the flash memory interface 250 includes the digital voltage (VCCQ) provided to the NAND flash memory modules 131-138 and the digital voltage (VCCQ) sent to the NAND flash memory modules 131-138. The number of clock cycles of the address information of the flash memory modules 131-138. The details are as follows:

處理器210載入並執行自我調整識別模組272的程式碼時所實現的方法可以參考如圖3A及圖3B所示的流程圖,詳細說明如下:The method realized when the processor 210 loads and executes the program code of the self-adjusting recognition module 272 can refer to the flowcharts shown in FIG. 3A and FIG. 3B , and the details are as follows:

步驟S312:一開始,儲存產品100上電重啟(Power on and reset)。處理器210採用預設識別模式進行快閃記憶體類型識別。Step S312: Initially, the storage product 100 is powered on and reset. The processor 210 uses a preset identification mode to identify the type of the flash memory.

步驟S314:進行NAND快閃記憶體模組的存在檢測。處理器210可驅動快閃記憶體介面250以偵測連接上的每個記憶體庫的狀態。例如,快閃記憶體介面250可在每一個記憶體庫的特定接腳上施加電壓,並觀察是否有響應(Response)。一旦在特定記憶體庫上發現響應則判斷這個記憶體庫上設置有NAND快閃記憶體模組。舉例來說,假設快閃記憶體介面250連接8個記憶體庫,但只在其中4個記憶體庫發現響應,則處理器210判斷這4個記憶體庫上存在NAND快閃記憶體模組。Step S314: Existence detection of the NAND flash memory module is performed. The processor 210 can drive the flash memory interface 250 to detect the status of each connected memory bank. For example, the flash memory interface 250 can apply a voltage to a specific pin of each memory bank, and observe whether there is a response (Response). Once a response is found on the specific memory bank, it is determined that the memory bank is provided with a NAND flash memory module. For example, assuming that the flash memory interface 250 is connected to 8 memory banks, but a response is only found in 4 memory banks, the processor 210 determines that there are NAND flash memory modules on these 4 memory banks .

步驟S316:判斷儲存產品100中是否存在NAND快閃記憶體模組。如果是,則進行步驟S322的作業。否則,進行步驟S318的作業。當快閃記憶體介面250在任何一個記憶體庫發現響應時,處理器210判定儲存產品100中存在NAND快閃記憶體模組。Step S316: Determine whether there is a NAND flash memory module in the storage product 100. If yes, proceed to step S322. Otherwise, proceed to step S318. When the flash memory interface 250 finds a response in any memory bank, the processor 210 determines that there is a NAND flash memory module in the storage product 100 .

步驟S318:回饋NAND快閃記憶體不存在的資訊,用於發動進一步的檢測與錯誤排除作業。例如,當儲存產品100中不存在NAND快閃記憶體模組時,不需要再進行後續的快閃記憶體類型識別。又例如,儲存產品100中存在NAND快閃記憶體模組,而回饋NAND快閃記憶體不存在的資訊,則表示儲存產品100需進一步的檢測。Step S318 : Feed back the information that the NAND flash memory does not exist, for launching further detection and error removal operations. For example, when there is no NAND flash memory module in the storage product 100 , no subsequent identification of the flash memory type is required. For another example, if there is a NAND flash memory module in the storage product 100, but the feedback information that the NAND flash memory does not exist indicates that the storage product 100 needs further testing.

步驟S322:驅動快閃記憶體介面250使用SDR協定發出讀取NAND快閃記憶體ID的命令給NAND快閃記憶體模組,例如NAND快閃記憶體模組131~138中的一個。這個時候,快閃記憶體介面250處於預設組態(Default configurations)的狀態,例如,供應給NAND快閃記憶體模組VCCQ為1.8V、輸出給NAND快閃記憶體模組的位址資訊為5個時脈週期等。Step S322 : The drive flash memory interface 250 sends a command to read the NAND flash memory ID to the NAND flash memory module, such as one of the NAND flash memory modules 131 - 138 , using the SDR protocol. At this time, the flash memory interface 250 is in the state of default configurations (Default configurations), for example, the VCCQ supplied to the NAND flash memory module is 1.8V, and the address information output to the NAND flash memory module for 5 clock cycles and so on.

步驟S324:判斷是否讀取成功。如果是,則進行步驟S360的作業。否則,進行步驟S332的作業。如果發出命令後,處理器210從指定NAND快閃記憶體模組收到正確的NAND快閃記憶體ID,代表讀取成功。在讀取成功時,不只獲得NAND快閃記憶體ID,處理器210也知道快閃記憶體介面250的預設組態能夠使用SDR協定正常存取NAND快閃記憶體模組中的資料,換句話說,處理器210也獲得快閃記憶體介面250的類型。相反的,如果發出命令後,處理器210從指定NAND快閃記憶體模組收到無法辨認的回復或者逾時後仍得不到回復,代表讀取失敗。Step S324: Determine whether the reading is successful. If yes, proceed to step S360. Otherwise, proceed to step S332. If the processor 210 receives the correct NAND flash memory ID from the designated NAND flash memory module after sending the command, it means that the reading is successful. When the reading is successful, not only the NAND flash memory ID is obtained, but also the processor 210 knows that the default configuration of the flash memory interface 250 can use the SDR protocol to normally access the data in the NAND flash memory module. In other words, the processor 210 also obtains the type of the flash memory interface 250 . On the contrary, if the processor 210 receives an unrecognizable reply from the specified NAND flash memory module after sending the command or still does not get a reply after a timeout, it means that the reading fails.

步驟S332:處理器210切換至下一個識別模式進行快閃記憶體類型識別,以及讓NAND快閃記憶體模組131~138斷電後上電並重啟。斷電及重新上電之間可以間隔一段預設時間。Step S332 : The processor 210 switches to the next identification mode to identify the type of the flash memory, and powers off the NAND flash memory modules 131 - 138 and restarts them. There can be a preset time interval between power off and power on again.

步驟S334:驅動快閃記憶體介面250使用DDR2發出讀取NAND快閃記憶體ID的命令給NAND快閃記憶體模組,例如NAND快閃記憶體模組131~138中的一個。這個時候,快閃記憶體介面250處於預設組態的狀態。Step S334: The drive flash memory interface 250 uses DDR2 to issue a command to read the NAND flash memory ID to the NAND flash memory module, such as one of the NAND flash memory modules 131-138. At this time, the flash memory interface 250 is in a default configuration state.

步驟S336:判斷是否讀取成功。如果是,則進行步驟S360的作業。否則,進行步驟S342的作業。在讀取成功時,不只獲得NAND快閃記憶體ID,處理器210也知道快閃記憶體介面250的預設組態能夠使用DDR2正常存取NAND快閃記憶體模組中的資料。此步驟的判斷技術細節類似於步驟S324,為求簡明不再贅述。Step S336: Determine whether the reading is successful. If yes, proceed to step S360. Otherwise, proceed to step S342. When the reading is successful, not only the NAND flash memory ID is obtained, but also the processor 210 knows that the default configuration of the flash memory interface 250 can use DDR2 to normally access the data in the NAND flash memory module. The technical details of the judgment in this step are similar to step S324, and will not be repeated for simplicity.

步驟S342:處理器210切換至下一個識別模式進行快閃記憶體類型識別,以及讓NAND快閃記憶體模組131~138斷電後上電並設定提供給NAND快閃記憶體模組131~138的VCCQ為1.2V。斷電及重新上電之間可以間隔一段預設時間。Step S342: The processor 210 switches to the next identification mode to identify the type of flash memory, and powers off the NAND flash memory modules 131-138 and provides settings for the NAND flash memory modules 131-138. The VCCQ of 138 is 1.2V. There can be a preset time interval between power off and power on again.

步驟S344:驅動快閃記憶體介面250使用DDR2發出讀取NAND快閃記憶體ID的命令給NAND快閃記憶體模組,例如NAND快閃記憶體模組131~138中的一個。這個時候,快閃記憶體介面250處於調整後的狀態。Step S344: The drive flash memory interface 250 uses DDR2 to issue a command to read the NAND flash memory ID to the NAND flash memory module, such as one of the NAND flash memory modules 131-138. At this time, the flash memory interface 250 is in an adjusted state.

步驟S346:判斷是否讀取成功。如果是,則進行步驟S360的作業。否則,進行步驟S352的作業。在讀取成功時,不只獲得NAND快閃記憶體ID,處理器210也知道快閃記憶體介面250的調整後組態能夠使用DDR2正常存取NAND快閃記憶體模組中的資料。此步驟的判斷技術細節類似於步驟S324,為求簡明不再贅述。Step S346: Determine whether the reading is successful. If yes, proceed to step S360. Otherwise, proceed to step S352. When the reading is successful, not only the NAND flash memory ID is obtained, but also the processor 210 knows that the adjusted configuration of the flash memory interface 250 can use DDR2 to normally access the data in the NAND flash memory module. The technical details of the judgment in this step are similar to step S324, and will not be repeated for simplicity.

步驟S352:處理器210切換至下一個識別模式進行快閃記憶體類型識別,讓NAND快閃記憶體模組131~138斷電後上電並設定使用6個時脈週期來傳送位址資訊給NAND快閃記憶體模組131~138。斷電及重新上電之間可以間隔一段預設時間。Step S352: The processor 210 switches to the next identification mode to identify the flash memory type, so that the NAND flash memory modules 131-138 are powered off and then powered on and set to use 6 clock cycles to transmit address information to NAND flash memory modules 131-138. There can be a preset time interval between power off and power on again.

步驟S354:驅動快閃記憶體介面250使用SDR協定發出讀取NAND快閃記憶體ID的命令給NAND快閃記憶體模組,例如NAND快閃記憶體模組131~138中的一個。這個時候,快閃記憶體介面250處於調整後的狀態。Step S354 : The drive flash memory interface 250 uses the SDR protocol to issue a command to read the NAND flash memory ID to the NAND flash memory module, such as one of the NAND flash memory modules 131 - 138 . At this time, the flash memory interface 250 is in an adjusted state.

步驟S356:判斷是否讀取成功。如果是,則進行步驟S360的操作。否則,進行步驟S358的操作。在讀取成功時,不只獲得NAND快閃記憶體ID,處理器210也知道快閃記憶體介面250的調整後組態能夠使用SDR協定正常存取NAND快閃記憶體模組中的資料。此步驟的判斷技術細節類似於步驟S324,為求簡明不再贅述。Step S356: Determine whether the reading is successful. If yes, proceed to step S360. Otherwise, proceed to step S358. When the reading is successful, not only the NAND flash memory ID is obtained, but also the processor 210 knows that the adjusted configuration of the flash memory interface 250 can use the SDR protocol to normally access the data in the NAND flash memory module. The technical details of the judgment in this step are similar to step S324, and will not be repeated for simplicity.

步驟S358:回饋無法識別NAND快閃記憶體的資訊,用於發動進一步的檢測與錯誤排除作業。例如,檢查NAND快閃記憶體模組是否正確地焊接在記憶體庫上。Step S358 : Feedback the information that the NAND flash memory cannot be identified, for launching further detection and error removal operations. For example, check that the NAND flash memory module is correctly soldered on the memory bank.

步驟S360:儲存識別結果274至非揮發性記憶體270,例如可以包含讀取到的NAND快閃記憶體ID、當前快閃記憶體介面250的組態參數等,使得主機能夠接著在重啟主控IC110後,根據主控IC110的非揮發性記憶體270中的NAND快閃記憶體ID將對應於NAND快閃記憶體模組131~138的韌體寫入主控IC110中的非揮發性記憶體或NAND快閃記憶體模組131~138中指定實體區塊的指定位址,完成開卡操作。Step S360: store the identification result 274 to the non-volatile memory 270, for example, may include the read NAND flash memory ID, the configuration parameters of the current flash memory interface 250, etc., so that the host can then restart the main control After the IC110, according to the NAND flash memory ID in the non-volatile memory 270 of the main control IC110, the firmware corresponding to the NAND flash memory modules 131-138 is written into the non-volatile memory in the main control IC110 Or specify the specified address of the physical block in the NAND flash memory modules 131-138 to complete the card opening operation.

本發明所述的方法中的全部或部分步驟可以電腦程式實現,例如電腦的作業系統、電腦中特定硬體的驅動程式或軟體程式。此外,也可實現在如上所示的其他類型程式。所屬技術領域具有通常知識者可將本發明實施例的方法撰寫成電腦程式,為求簡明不再加以描述。依據本發明實施例方法實施的電腦程式可儲存在適當的電腦讀取介質,例如DVD、CD-ROM、USB、硬碟,亦可置於可通過網路(例如網際網路或其他適當載體)存取的網路伺服器。All or part of the steps in the method of the present invention can be implemented by computer programs, such as computer operating systems, drivers or software programs for specific hardware in the computer. In addition, other types of programs as shown above may also be implemented. Those with ordinary knowledge in the technical field can write the method of the embodiment of the present invention into a computer program, and the description is omitted for the sake of brevity. The computer program implemented according to the method of the embodiment of the present invention can be stored in an appropriate computer-readable medium, such as DVD, CD-ROM, USB, hard disk, and can also be placed on a network (such as the Internet or other appropriate carriers) Accessed web server.

雖然圖1、圖2中包含了以上描述的元件,但不排除在不違反發明的精神下,使用更多其他的附加元件,已達成更佳的技術效果。此外,雖然圖3A、圖3B的流程圖採用指定的順序來執行,但是在不違反發明精神的情況下,所屬技術領域的技術人員可以在達到相同效果的前提下,修改這些步驟間的順序,所以,本發明並不局限於僅使用如上所述的順序。此外,所屬技術領域的技術人員也可以將若干步驟整合為一個步驟,或者是除了這些步驟外,循序或平行地執行更多步驟,本發明也不因此而局限。Although the components described above are included in FIG. 1 and FIG. 2 , it is not excluded to use more other additional components to achieve better technical effects without violating the spirit of the invention. In addition, although the flow charts in FIG. 3A and FIG. 3B are executed in a specified order, those skilled in the art can modify the order of these steps on the premise of achieving the same effect without violating the spirit of the invention. Therefore, the present invention is not limited to using only the sequence described above. In addition, those skilled in the art may also integrate several steps into one step, or perform more steps sequentially or in parallel in addition to these steps, and the present invention is not limited thereby.

綜上所述,根據本發明之自我調整識別快閃記憶體類型方法及裝置之一些實施例,可自動識別NAND快閃記憶體類型,以及自動將識別出的NAND快閃記憶體識別碼儲存到非揮發性記憶體,使得電子裝置依據NAND快閃記憶體識別碼將相應的韌體寫入主控積體電路中的非揮發性記憶體或/及NAND快閃記憶體模組中的指定位址,且能夠解決傳統用人工識別再燒錄電子熔絲所產生的高成本及製造彈性低的缺點。In summary, according to some embodiments of the method and device for self-adjusting and identifying the type of the flash memory of the present invention, the type of the NAND flash memory can be automatically identified, and the identified NAND flash memory identification code can be automatically stored in the Non-volatile memory, so that the electronic device writes the corresponding firmware into the non-volatile memory in the main control integrated circuit or/and the specified bit in the NAND flash memory module according to the NAND flash memory identification code address, and can solve the shortcomings of high cost and low manufacturing flexibility caused by traditional manual identification and reprogramming of electronic fuses.

雖然本發明使用以上實施例進行說明,但需要注意的是,這些描述並非用於限縮本發明。相反地,此發明涵蓋了所屬技術領域中的技術人員顯而易見的修改與相似設置。所以,請求項範圍須以最寬廣的方式解釋來包含所有顯而易見的修改與相似設置。While the invention has been described using the above examples, it should be noted that these descriptions are not intended to limit the invention. On the contrary, this invention covers modifications and similar arrangements obvious to those skilled in the art. Therefore, the claims must be construed in the broadest possible manner to include all obvious modifications and similar arrangements.

100:儲存產品 110:主控積體電路 131~138:NAND快閃記憶體模組 210:處理器 230:主機介面 250:快閃記憶體介面 270:非揮發性記憶體 272:自我調整識別模組 274:識別結果 S312:步驟 S314:步驟 S316:步驟 S318:步驟 S322:步驟 S324:步驟 S332:步驟 S334:步驟 S336:步驟 S342:步驟 S344:步驟 S346:步驟 S352:步驟 S354:步驟 S356:步驟 S358:步驟 S360:步驟100: store product 110: Main control integrated circuit 131~138: NAND flash memory module 210: Processor 230: host interface 250: Flash memory interface 270: Non-volatile memory 272: Self-adjustment recognition module 274: Recognition result S312: step S314: step S316: step S318: step S322: step S324: step S332: step S334: step S336: step S342: step S344: step S346: step S352: Step S354: step S356: Step S358: step S360: Steps

[圖1] 係為依據本案之儲存裝置之一實施例之方塊圖。 [圖2] 係為依據本案之主控積體電路之一實施例之方塊圖。 [圖3A] 係為依據本案之自我調整識別快閃記憶體類型之一實施例之方法流程圖。 [圖3B] 係為依據本案之自我調整識別快閃記憶體類型之另一實施例之方法流程圖。[Fig. 1] is a block diagram of an embodiment of the storage device according to the present case. [Fig. 2] is a block diagram of an embodiment of the main control integrated circuit according to this case. [FIG. 3A] is a flow chart of the method according to one embodiment of self-adjustment and identification of flash memory type in this case. [FIG. 3B] is a flow chart of another embodiment of the self-adjustment and identification of flash memory type according to the present case.

100:儲存產品 100: store product

110:主控積體電路 110: Main control integrated circuit

131~138:NAND快閃記憶體模組 131~138: NAND flash memory module

Claims (10)

一種識別快閃記憶體類型的方法,由一處理器在載入並執行程式碼時執行,包含: 驅動在特定的一設置狀態下的一快閃記憶體介面使用特定的一通信協定發出用於讀取一快閃記憶體識別碼的一讀取命令給一快閃記憶體模組; 如果讀取失敗,改變該快閃記憶體介面的該設置狀態、該通信協定,或以上兩者,再進行一次讀取操作,直到預設的調整都嘗試過為止;及 如果讀取成功,將讀出的該快閃記憶體識別碼儲存到一非揮發性記憶體,使得電子裝置依據該快閃記憶體識別碼將相應的韌體寫入一主控積體電路中的非揮發性記憶體或/及該快閃記憶體模組中的指定位址; 其中,該快閃記憶體介面能夠調整的設置包含提供給該快閃記憶體模組的一數位電壓及傳送給該快閃記憶體模組的位址資訊的一時脈週期數目。A method of identifying a type of flash memory, performed by a processor when loading and executing code, comprising: driving a flash memory interface in a specific setting state to send a read command for reading a flash memory identification code to a flash memory module using a specific communication protocol; If the read fails, change the setting state of the flash memory interface, the communication protocol, or both, and perform a read operation again until all preset adjustments have been tried; and If the reading is successful, the read flash memory identification code is stored in a non-volatile memory, so that the electronic device writes the corresponding firmware into a main control integrated circuit according to the flash memory identification code the specified address in the non-volatile memory or/and the flash memory module; Wherein, the adjustable settings of the flash memory interface include a digital voltage provided to the flash memory module and a clock cycle number of address information sent to the flash memory module. 如請求項1所述之識別快閃記憶體類型的方法,其中,該數位電壓為1.8 V或1.2V。The method for identifying the type of flash memory according to Claim 1, wherein the digital voltage is 1.8 V or 1.2 V. 如請求項1所述之識別快閃記憶體類型的方法,其中,該時脈週期數目為5個或6個。The method for identifying the type of flash memory according to claim 1, wherein the number of clock cycles is 5 or 6. 如請求項1所述之識別快閃記憶體類型的方法,其中,該方法執行於開卡成功之前。The method for identifying the type of the flash memory according to claim 1, wherein the method is executed before the card is activated successfully. 如請求項1所述之識別快閃記憶體類型的方法,其中,該通信協定包含單倍資料傳輸率協定以及第二代雙倍資料傳輸率協定。The method for identifying the type of flash memory according to claim 1, wherein the communication protocol includes a single data rate protocol and a second-generation double data rate protocol. 如請求項1所述之識別快閃記憶體類型的方法,其中,該主控積體電路包含該處理器、該非揮發性記憶體及該快閃記憶體介面,以及該快閃記憶體介面耦接該快閃記憶體模組。The method for identifying the type of flash memory as described in claim 1, wherein the main control integrated circuit includes the processor, the non-volatile memory and the flash memory interface, and the flash memory interface coupling Connect the flash memory module. 一種識別快閃記憶體類型裝置,包含: 一快閃記憶體介面,耦接一快閃記憶體模組; 一非揮發性記憶體;及 一處理器,耦接該快閃記憶體介面及該非揮發性記憶體,用於驅動在特定一設置狀態下的該快閃記憶體介面使用特定一通信協定發出用於讀取一快閃記憶體識別碼的一讀取命令給該快閃記憶體模組;如果讀取失敗,改變該快閃記憶體介面的該設置狀態、該通信協定,或以上兩者,再進行一次讀取操作,直到預設的調整都嘗試過為止;以及如果讀取成功,將讀出的該快閃記憶體識別碼儲存到該非揮發性記憶體,使得電子裝置能夠依據該快閃記憶體識別碼將相應的韌體寫入一主控積體電路中的非揮發性記憶體或/及該快閃記憶體模組中的指定位址; 其中,該快閃記憶體介面能夠調整的設置包含提供給該快閃記憶體模組的一數位電壓及傳送給該快閃記憶體模組的位址資訊的時脈週期數目。A device for identifying the type of flash memory, comprising: a flash memory interface coupled to a flash memory module; a non-volatile memory; and A processor, coupled to the flash memory interface and the non-volatile memory, is used to drive the flash memory interface in a specific setting state and use a specific communication protocol to read a flash memory A read command of the identification code is given to the flash memory module; if the read fails, change the setting state of the flash memory interface, the communication protocol, or both, and perform a read operation again until and if the reading is successful, store the read out flash memory identification code in the non-volatile memory, so that the electronic device can use the flash memory identification code to update the corresponding firmware write to a non-volatile memory in a master integrated circuit or/and a specified address in the flash memory module; Wherein, the settings that can be adjusted by the flash memory interface include a digital voltage provided to the flash memory module and the number of clock cycles of address information sent to the flash memory module. 如請求項7所述之識別快閃記憶體類型裝置,其中,該數位電壓為1.8V或1.2V。The device for identifying flash memory type as claimed in claim 7, wherein the digital voltage is 1.8V or 1.2V. 如請求項7所述之識別快閃記憶體類型裝置,其中,該時脈週期數目為5個或6個。In the device for identifying flash memory type according to claim 7, the number of clock cycles is 5 or 6. 如請求項7所述之識別快閃記憶體類型裝置,其中,該通信協定包含單倍資料傳輸率協定以及第二代雙倍資料傳輸率協定。In the device for identifying flash memory type according to claim 7, wherein the communication protocol includes a single data rate protocol and a second-generation double data rate protocol.
TW110113131A 2019-11-08 2019-11-08 Method for identifying flash memory type and device thereof TWI780653B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW110113131A TWI780653B (en) 2019-11-08 2019-11-08 Method for identifying flash memory type and device thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW110113131A TWI780653B (en) 2019-11-08 2019-11-08 Method for identifying flash memory type and device thereof

Publications (2)

Publication Number Publication Date
TW202132996A TW202132996A (en) 2021-09-01
TWI780653B true TWI780653B (en) 2022-10-11

Family

ID=78777657

Family Applications (1)

Application Number Title Priority Date Filing Date
TW110113131A TWI780653B (en) 2019-11-08 2019-11-08 Method for identifying flash memory type and device thereof

Country Status (1)

Country Link
TW (1) TWI780653B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040199713A1 (en) * 2000-07-28 2004-10-07 Micron Technology, Inc. Synchronous flash memory with status burst output
US20120173798A1 (en) * 2010-12-29 2012-07-05 Chi-Chih Kuan Memory controller, memory device and method for determining type of memory device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040199713A1 (en) * 2000-07-28 2004-10-07 Micron Technology, Inc. Synchronous flash memory with status burst output
US20120173798A1 (en) * 2010-12-29 2012-07-05 Chi-Chih Kuan Memory controller, memory device and method for determining type of memory device

Also Published As

Publication number Publication date
TW202132996A (en) 2021-09-01

Similar Documents

Publication Publication Date Title
US8185685B2 (en) NAND flash module replacement for DRAM module
CN110955387B (en) Method for adaptively identifying flash memory type and computer readable storage medium and device
JP6613242B2 (en) Method and apparatus for limiting writing to solid state memory when end-of-life conditions are reached
CN110047538B (en) Memory system and method of operating the same
US10761588B2 (en) Power configuration component including selectable configuration profiles corresponding to operating characteristics of the power configuration component
US20240289039A1 (en) Memory system and method of performing background operation
TWI526818B (en) Method of enabling sleep mode, memory control circuit unit and storage appartus
US12111777B2 (en) Multiple pin configurations of memory devices
US11348650B2 (en) Destruction of data and verification of data destruction on a memory device
TWI780653B (en) Method for identifying flash memory type and device thereof
TWI780654B (en) Apparatus for adaptive identifying flash memory type and method thereof
TWI740268B (en) Self-adaptive method for identifying flash memory type and device
TWI768829B (en) Parameter adjusting method for a memory device and a memory storage system
CN112988069B (en) Memory management method, memory storage device and memory controller
CN112242176B (en) Memory device with test interface
TWI512623B (en) Method of enabling sleep mode, memory control circuit unit and storage apparatus
CN209746537U (en) NVDIMM-N compatible with NVDIMM-P function
US20210064278A1 (en) Managing attributes of memory components
KR20200093363A (en) Memory system
TWI748550B (en) Method and apparatus and computer program product for configuring reliable command
TWI771707B (en) Method and apparatus and computer program product for configuring reliable command
TWI747270B (en) Method for performing configuration management, and associated data storage device and controller thereof
WO2024168032A1 (en) Data storage device with memory services for storage access queues
Gendy Mastering eMMC Device Programming

Legal Events

Date Code Title Description
GD4A Issue of patent certificate for granted invention patent