TWI681296B - Apparatus and method and computer program product for accessing a memory card - Google Patents
Apparatus and method and computer program product for accessing a memory card Download PDFInfo
- Publication number
- TWI681296B TWI681296B TW107139391A TW107139391A TWI681296B TW I681296 B TWI681296 B TW I681296B TW 107139391 A TW107139391 A TW 107139391A TW 107139391 A TW107139391 A TW 107139391A TW I681296 B TWI681296 B TW I681296B
- Authority
- TW
- Taiwan
- Prior art keywords
- host
- memory card
- length
- logical block
- processing unit
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/004—Error avoidance
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/10—Program control for peripheral devices
- G06F13/12—Program control for peripheral devices using hardware independent of the central processor, e.g. channel or peripheral processor
- G06F13/124—Program control for peripheral devices using hardware independent of the central processor, e.g. channel or peripheral processor where hardware is a sequential transfer control unit, e.g. microprocessor, peripheral processor or state-machine
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Microelectronics & Electronic Packaging (AREA)
- Quality & Reliability (AREA)
- Techniques For Improving Reliability Of Storages (AREA)
Abstract
Description
本發明涉及資料存取技術,尤指一種記憶卡存取裝置及方法以及電腦程式產品。The invention relates to data access technology, in particular to a memory card access device and method and a computer program product.
讀卡機是用來協助記憶卡及計算機主機端間交互的介面裝置,使得計算機主機端可存取記憶卡中儲存的資料,以及將讀取的資料儲存於主機端。計算機主機端可通過其通用序列匯流排(Universal Serial Bus, USB)的埠驅動讀卡機。記憶卡可為CF、SD、microSD或MMC卡等。大部分的讀卡機也提供寫入資料的能力。為了存取多樣使用不同格式的記憶卡,讀卡機可偵測記憶卡的能力及規格,並且據以回報它的基本資料及操作狀態給計算機主機端。然而,計算機主機端可能無法支援特定的記憶卡能力而錯誤地存取記憶卡中的資料,甚至更糟的是毀損記憶卡中的資料。因此,本發明提出一種記憶卡存取裝置及方法以及電腦程式產品,用以避免記憶卡中的資料被毀損。The card reader is an interface device used to assist the interaction between the memory card and the computer host end, so that the computer host end can access the data stored in the memory card and store the read data on the host end. The computer host can drive the card reader through its Universal Serial Bus (USB) port. The memory card can be CF, SD, microSD or MMC card. Most card readers also provide the ability to write data. In order to access memory cards that use different formats, the card reader can detect the capacity and specifications of the memory card, and report its basic data and operating status to the host computer. However, the computer host may not be able to support certain memory card capabilities and erroneously access the data in the memory card, or even worse, damage the data in the memory card. Therefore, the present invention provides a memory card access device and method, and a computer program product to prevent data in the memory card from being damaged.
有鑑於此,如何減輕或消除上述相關領域的缺失,實為有待解決的問題。In view of this, how to mitigate or eliminate the above-mentioned deficiencies in related fields is really a problem to be solved.
本說明書提供一種記憶卡存取裝置的實施例,其包含:主機端介面及處理單元。處理單元偵測插入於記憶卡存取裝置的記憶卡的邏輯區塊長度是否能被主機端支援;以及當偵測到插入的記憶卡的邏輯區塊長度無法被主機端支援時,為回應主機端發出的請求感測命令,通過主機端介面回覆不能觸發後續寫入的感測資料給主機端。This specification provides an embodiment of a memory card access device, which includes a host-side interface and a processing unit. The processing unit detects whether the logical block length of the memory card inserted into the memory card access device can be supported by the host; and responds to the host when it detects that the logical block length of the inserted memory card cannot be supported by the host The request sensing command issued by the terminal, which responds through the host interface cannot trigger the subsequent writing of the sensing data to the host.
本說明書另提供一種電腦程式產品的實施例,由讀卡機的處理單元載入並執行,包含以下的程式碼:偵測插入於讀卡機的記憶卡的邏輯區塊長度是否能被主機端支援;以及當偵測到插入的記憶卡的邏輯區塊長度無法被主機端支援時,為回應主機端發出的請求感測命令,回覆不能觸發後續寫入的感測資料給主機端。This specification also provides an embodiment of a computer program product, which is loaded and executed by the processing unit of the card reader, and includes the following code: detecting whether the length of the logical block of the memory card inserted in the card reader can be used by the host Support; and when it is detected that the length of the logical block of the inserted memory card cannot be supported by the host, in response to the request sensing command sent by the host, the reply cannot trigger the subsequent writing of the sensing data to the host.
上述實施例的優點之一,通過回覆不能觸發後續寫入的感測資料給不支援插入的記憶卡的邏輯區塊長度的主機端,讓主機端不會更新記憶卡中的開機區及檔案配置表影像,避免丟失連結到檔案的全部或部分重要資訊。One of the advantages of the above embodiments is that the sensor data that cannot trigger subsequent writing by replying to the host that does not support the logical block length of the inserted memory card, so that the host does not update the boot area and file configuration in the memory card Table image to avoid losing all or part of the important information linked to the file.
本發明的其他優點將搭配以下的說明和圖式進行更詳細的解說。Other advantages of the present invention will be explained in more detail with the following description and drawings.
以下說明為完成發明的較佳實現方式,其目的在於描述本發明的基本精神,但並不用以限定本發明。實際的發明內容必須參考之後的權利要求範圍。The following description is a preferred implementation of the invention, and its purpose is to describe the basic spirit of the invention, but it is not intended to limit the invention. The actual content of the invention must refer to the scope of the following claims.
必須了解的是,使用於本說明書中的”包含”、”包括”等詞,用以表示存在特定的技術特徵、數值、方法步驟、作業處理、元件以及/或組件,但並不排除可加上更多的技術特徵、數值、方法步驟、作業處理、元件、組件,或以上的任意組合。It must be understood that the words "comprising", "including", etc. used in this specification are used to indicate the existence of specific technical features, values, method steps, work processes, components and/or components, but do not exclude the addition of More technical features, values, method steps, job processing, components, components, or any combination of the above.
於權利要求中使用如”第一”、"第二"、"第三"等詞是用來修飾權利要求中的元件,並非用來表示之間具有優先順序,前置關係,或者是一個元件先於另一個元件,或者是執行方法步驟時的時間先後順序,僅用來區別具有相同名字的元件。The terms such as "first", "second", and "third" are used in the claims to modify the elements in the claims, not to indicate that there is a priority order, pre-relationship, or an element Prior to another component, or the time sequence when performing method steps, is only used to distinguish components with the same name.
必須了解的是,當元件描述為”連接”或”耦接"至另一元件時,可以是直接連結、或耦接至其他元件,可能出現中間元件。相反地,當元件描述為”直接連接”或”直接耦接”至另一元件時,其中不存在任何中間元件。使用來描述元件之間關係的其他語詞也可類似方式解讀,例如”介於”相對於”直接介於”,或者是”鄰接”相對於”直接鄰接”等等。It must be understood that when an element is described as "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, and intermediate elements may appear. Conversely, when an element is described as "directly connected" or "directly coupled" to another element, there are no intervening elements present. Other words used to describe the relationship between elements can also be interpreted in a similar manner, such as "between" relative to "directly between", or "adjacent" relative to "directly adjacent" and so on.
參考圖1。資料存取系統可包含行動電話,作為主機端110。雖然實施例的系統以行動電話為例,本領域技術人員也可以將主機端110應用在其他計算機裝置,例如,個人電腦、筆記型電腦(Laptop PC)、平板電腦、數位相機、數位攝影機等。主機端110可使用通用序列匯流排(Universal Serial Bus, USB)通信協議連接並驅動讀卡機130。記憶卡150可插入讀卡機130中,使得主機端110可通過讀卡機130存取記憶卡150。讀卡機130可為可拆卸式媒體的大量儲存子系統(removable-media mass storage subsystem),透過其USB埠連接主機端110。主機端110及讀卡機130可透過交換標準定義的命令塊(command block)、資料及狀態資訊彼此通訊,如於1998年12月14日發表的Universal Serial Bus Mass Storage Class: UFI Command Specification rev. 1.0。讀卡機130可依據主機端110發出的命令,通過通用快閃記憶儲存(Universal Flash Storage UFS)通信協議存取記憶卡150中的資料。Refer to Figure 1. The data access system may include a mobile phone as the
參考圖2。主機端110可包含處理單元210,以及用於連接讀卡機130的USB匯流排230。當處理單元210載入及執行檔案系統211、UFI驅動程式213及USB驅動程式215的軟體以及/或韌體指令時,完成特定功能。檔案系統211執行於特定的作業系統,用於控制如何儲存資料至記憶卡150,以及從記憶卡150讀取資料。通過將資料切分成邏輯的片段及給予每個片段名稱,容易分離並識別資訊。檔案系統211使用特定結構(如FAT12、FAT16、FAT32、exFAT等)及邏輯規則管理這些群聚的資訊以及它們的名稱。UFI驅動程式213通過發送所述標準定義的UFI命令塊,控制讀卡機130。讀卡機130中執行的UFI功能模塊,用於處理這些命令塊。所有命令塊、資料及狀態資訊的交換,可通過於USB匯流排230上傳遞封包實現,而這些交換由USB驅動程式215管理。主機端還包含記憶體250,用於儲存執行中所需的資料,如變數、資料表、資料結構等。記憶體250可為特定類型的隨機存取記憶體(Random Access Memory RAM),提供揮發性的儲存空間。Refer to Figure 2. The
當記憶卡150插入讀卡機130時,主機端110及讀卡機130間會進行一些交互,用於初始化主機端110及記憶卡150間的連線。參考圖3。於一些實施方式中,當主機端110偵測到一個設備插入其USB埠時,發送測試單元就緒(TEST UNIT READY)命令312,用以檢查插入的設備是否就緒。由於記憶卡150尚未插入讀卡機130,讀卡機130回覆CSW失敗(fail)訊息318給主機端110。主機端110發送請求感測(REQUEST SENSE)命令322,用於指示讀卡機130傳送指定邏輯單元的感測資料給主機端110。當讀卡機130偵測到記憶卡150插入讀卡機130後,回覆媒體改變(MEDIA CHANGED)的感測資料328給主機端110。接著,主機端110再一次發送測試單元就緒命令332,再次檢查插入的設備是否就緒。由於記憶卡150已經插入讀卡機130,讀卡機130回覆CSW通過(pass)訊息338給主機端110。接著,主機端110發送讀取能力命令342,請求讀卡機130提供目前插入媒體的能力。讀卡機130詢問能力資訊後,據此產生並回覆目前能力描述元(current capacity descriptor)348給主機端110,例如,其中的第0至3個位元組紀錄記憶卡150可定址區塊總數,而第5至7位元組紀錄記憶卡150中每個邏輯區塊的長度(以位元組為單位)。每個邏輯區塊的長度可為512、1K、2K、4K位元組等。於媒體初始作業中,主機端110依據讀卡機130回報的能力資訊計算儲存開機區(boot sector)、檔案配置表影像(file allocation table image)等的邏輯位址,並且發出一系列讀取(READ)命令352給讀卡機130,用以取得儲存於這些邏輯位址的開機區、檔案配置表影像等資訊。接著,為了後續運作的需要,主機端110修改開機區、檔案配置表影像中的有關內容,並發出一系列寫入(WRITE)命令362給讀卡機130,用於將更新後的內容儲存回記憶卡150。When the
然而,當運行主機端110的作業系統或檔案系統211無法支援過長的邏輯區塊長度時,更新後的開機區及檔案配置表影像會丟失連結到檔案的全部或部分重要資訊,造成記憶卡150中儲存的檔案毀損。例如,作業系統或檔案系統211只支援512位元組而不能支援4K位元組的邏輯區塊長度。雖然UFI驅動程式213通過USB介面接收到每個邏輯區塊長度為4K位元組的資料,但是作業系統或檔案系統211只會處理每個邏輯區塊中前512位元組的資料,忽略了之後的3.5K位元組的資料,造成寫回記憶卡150後非預期性地丟失資料。However, when the operating system or
為解決如上所述的問題,讀卡機130需要執行預防機制,避免記憶卡150中儲存的檔案在連結上不支援特定邏輯區塊長度的主機端110時被毀損。參考圖4,讀卡機130至少包含處理單元410,可使用多種方式實施,例如使用專用硬體或通用硬體(如單一處理器、具平行處理能力的多處理器、圖形處理器或其他具運算能力的處理器),並且在執行韌體或軟體指令(instructions)時,提供如下所述的功能。處理單元可至少包含算數邏輯單元(ALU,Arithmetic and Logic Unit)以及位移器(Bit Shifter)。處理單元110是一種多功能裝置,可以執行算數及邏輯功能。算數邏輯單元負責執行數學運算(如加、減、乘、除等)、布林運算(如AND、OR、NOT、NAND、NOR、XOR、XNOR等)或特殊函數運算(如三角函數、平方、三方、n次方、平方根、三方根、n次方根等)。通常,模式選擇輸入決定算數邏輯單元執行邏輯運算或算數運算。位移器負責位移運算及比特旋轉。記憶體420可使用高效匯流排(high-performance bus)連接處理單元410,用於儲存執行中所需的資料,如變數、資料表、資料結構等。記憶體420可為特定類型的隨機存取記憶體,提供揮發性的儲存空間。To solve the above-mentioned problems, the
處理單元410、記憶體420、USB介面460及記憶卡介面480可用系統匯流排(system bus)450彼此連接,並使用特定通訊協定在裝置間傳遞資料。USB介面460可包含USB媒體存取控制層(Media Access Control MAC)及USB實體層(Physical layer PHY),用於連接主機端110的USB埠。處理單元410可載入並執行相應的UFI驅動程式及USB驅動程式,用於接收並解譯(interpret)主機端110傳送的UFI命令(如測試單元就緒、請求感測、讀取、寫入及抹除命令等)、邏輯區塊編號及資料,並且產生及傳送UFI訊息、描述元及資料等給主機端110。記憶卡介面480可包含主機端控制器(如SD或eMMC主機端控制器),用於連接記憶卡150。處理單元410可載入執行相應的UFS驅動程式,用於產生及傳送UFS命令(如辨認、讀取、寫入及抹除命令等)、邏輯區塊編號及資料等給記憶卡150,並且接收及解譯記憶卡150傳送的完成元件(Completion Element CE)及資料等。The
讀卡機130可執行錯誤預防方法,避免發生如上所述的錯誤。首先,處理單元410偵測插入於讀卡機130中的記憶卡150的邏輯區塊長度是否無法被主機端110支援。當偵測到插入的記憶卡150的邏輯區塊長度無法被主機端110支援時,為回應從主機端110接收到請求感測命令,通過主機端介面回覆不能觸發後續處理的感測資料給主機端110。The
詳細流程可參考圖5。當處理單元410通過USB介面460從主機端110接收到請求感測命令後(步驟S510),可通過記憶卡介面480詢問記憶卡130的邏輯區塊長度(步驟S520)。於步驟S520,處理單元410可發送讀取能力(Read Capacity)命令給記憶卡150,用於請求提供記憶卡150的目前能力。處理單元410可從記憶卡150接收讀取能力資料回覆(Read Capacity Data Response),其中的第4至7位元組包含其邏輯區塊長度。讀取能力命令是一種UFS SCSI命令。可理解的是,步驟S520也可以執行於步驟S510之前,本發明並不因此侷限。處理單元410可儲存讀取能力資料回覆中的邏輯區塊長度至記憶體420,直到記憶卡150被移出讀卡機130。Refer to Figure 5 for the detailed process. When the
當處理單元410判斷回覆的邏輯區塊長度為不需要檢查的長度,例如4K位元組(步驟S530中”否”的路徑),則回覆能夠觸發主機端110後續處理的感測資料(Sense Data),例如,指出媒體改變的感測鍵值(Sense Key)(步驟S535)。感測鍵值提供用以回報錯誤及例外狀態的基本類型。When the
當處理單元410判斷回覆的邏輯區塊長度為需要檢查的長度且主機端110運行的作業系統及檔案系統支援記憶卡150的邏輯區塊長度(步驟S530中”是”的路徑接步驟S540中”是”的路徑),則回覆能夠觸發主機端110後續處理的感測資料,例如,指出媒體改變的感測鍵值 (步驟S535)。When the
當處理單元410判斷回覆的邏輯區塊長度為需要檢查的長度且主機端110運行的作業系統或檔案系統不支援記憶卡150的邏輯區塊長度(步驟S530中”是”的路徑接步驟S540中”否”的路徑),則回覆不能夠觸發主機端110後續寫入的感測資料,例如,指出媒體不存在(MEDIA NOT PRESENT)或媒體受寫入防護(WRITE PROTECTED MEDIA)的感測鍵值,防止主機端110更新開機區及檔案配置表影像,造成丟失連結到檔案的全部或部分重要資訊(步驟S535)。When the
由於不同的作業系統會使用不同的配置長度,處理單元410可藉由請求感測命令中配置長度(allocation length)的值判斷主機端110中運行的作業系統。請求感測命令的配置長度欄位描述主機端110能夠接收的感測資料的最大位元組數目。例如,運行安卓作業系統(Android)、視窗7/10/XP作業系統(Windows 7/10/XP)及Mac作業系統的主機端的能夠接收的感測資料的最大位元組數目為96(也就是”0x60”)、18(也就是”0x12”)及18,而安卓作業系統或其檔案系統不支援4K位元組的邏輯區塊長度。如上所述不支援作業系統或其檔案系統與需檢查的邏輯區塊長度間的映射資訊可使用任意的資料結構儲存於記憶體420,例如資料表、決策規則(decision rules)等,有利於處理單元410判斷。於另一些實施例,如上所述的映射資訊也可反應在程式碼的判斷邏輯。於步驟S540,當處理單元410偵測到請求感測命令的配置長度欄位中的值為”0x60”時,判斷主機端110運行的作業系統或檔案系統不支援記憶卡150的邏輯區塊長度。當處理單元410偵測到請求感測命令的配置長度欄位中的值為”0x12”時,判斷主機端110運行的作業系統或檔案系統支援記憶卡150的邏輯區塊長度。Since different operating systems use different configuration lengths, the
參考圖6,讀卡機可於接收到請求感測命令322時,啟動錯誤預防處理程序600,執行如圖5所示的方法流程。於錯誤預防處理程序600中,處理單元410可通過記憶卡介面480發送讀取能力命令612給記憶卡150,並且從記憶卡150接收讀取能力資料回覆618,用於完成記憶卡150的邏輯區塊長度的詢問。可理解的是,本領域技術人員可將讀取能力命令612的發送執行於啟動錯誤預防處理程序600之前,或者,將讀取能力命令612的發送及讀取能力資料回覆618的接收,執行於啟動錯誤預防處理程序600之前,本發明並不因此侷限。當處理單元410判斷回覆的邏輯區塊長度為不需要檢查的長度(步驟S530中”否”的路徑),或回覆的邏輯區塊長度為需要檢查的長度且主機端110運行的作業系統或檔案系統支援記憶卡150的邏輯區塊長度(步驟S530中”是”的路徑接步驟S540中”是”的路徑),則回覆能夠觸發主機端110後續處理的感測資料628(步驟S535)。後續處理可包含測試單元就緒命令332及讀取能力命令342的傳送及相應訊息338及目前能力描述元348的接收。後續處理另可包含如上所述開機區及檔案配置表影像的讀取、修改及寫入。Referring to FIG. 6, the card reader can start the error
參考圖7,於錯誤預防處理程序600中,當處理單元410判斷回覆的邏輯區塊長度為需要檢查的長度且主機端110運行的作業系統或檔案系統不支援記憶卡150的邏輯區塊長度(步驟S530中”是”的路徑接步驟S540中”否”的路徑),則回覆不能夠觸發主機端110後續寫入的感測資料718,例如,指出媒體不存在或寫入防護媒體的感測鍵值(步驟S545)。後續寫入可包含如上所述開機區及檔案配置表影像的讀取、修改及寫入。Referring to FIG. 7, in the
處理單元410所執行資料存取控制的方法步驟,可使用一個或多個功能模塊組成的電腦程式產品來實現。這些功能模塊存儲於非揮發性儲存裝置,並且可被處理單元410於特定時間點載入並執行。參考圖8,處理單元110執行主機端介面驅動模塊810以完成步驟S510、S535及S545的操作,執行記憶卡介面驅動模塊820以完成步驟S520的操作,以及執行錯誤預防處理模塊830以完成步驟S530及S540的操作。主機端介面驅動模塊810、記憶卡介面驅動模塊820及錯誤預防處理模塊830間的資料傳遞可透過函數呼叫(function calls)、全域變數(global variables)等完成。主機端介面驅動模塊810可包USB介面460的驅動程式,如相應的UFI驅動程式及USB驅動程式,而記憶卡介面驅動模塊820可包含記憶卡介面480的驅動程式,如UFS驅動程式。The method steps of the data access control executed by the
本發明所述的方法中的全部或部分步驟可以電腦程式實現,例如電腦的作業系統、電腦中特定硬體的驅動程式、或軟體應用程式。此外,也可實現於如上所示的其他類型程式。所屬技術領域的技術人員可將本發明實施例的方法撰寫成電腦程式,為求簡潔不再加以描述。依據本發明實施例方法實施的電腦程式,可儲存於適當的電腦可讀取資料載具,例如DVD、CD-ROM、USB碟、硬碟,亦可置於可通過網路(例如,網際網路,或其他適當載具)存取的網路伺服器。All or part of the steps in the method of the present invention can be implemented by a computer program, such as a computer operating system, a specific hardware driver in the computer, or a software application program. In addition, it can also be implemented in other types of programs as shown above. A person skilled in the art can write the method of the embodiment of the present invention into a computer program, which will not be described for simplicity. The computer program implemented according to the method of the embodiment of the present invention can be stored in a suitable computer-readable data carrier, such as a DVD, CD-ROM, USB disk, or hard disk, or can be placed on a network (for example, the Internet Network server.
雖然圖4中包含了以上描述的元件,但不排除在不違反發明的精神下,使用更多其他的附加元件,已達成更佳的技術效果。此外,雖然圖5的流程圖採用指定的順序來執行,但是在不違反發明精神的情況下,熟習此技藝人士可以在達到相同效果的前提下,修改這些步驟間的順序,所以,本發明並不侷限於僅使用如上所述的順序。此外,熟習此技藝人士亦可以將若干步驟整合為一個步驟,或者是除了這些步驟外,循序或平行地執行更多步驟,本發明亦不因此而侷限。Although the elements described above are included in FIG. 4, it is not excluded that more other additional elements are used without violating the spirit of the invention, and a better technical effect has been achieved. In addition, although the flowchart in FIG. 5 is executed in a specified order, without violating the spirit of the invention, a person skilled in the art can modify the order between these steps on the premise of achieving the same effect. Therefore, the present invention does not It is not limited to use only the order described above. In addition, those skilled in the art can also integrate several steps into one step, or in addition to these steps, perform more steps sequentially or in parallel, and the present invention is not limited thereby.
雖然本發明使用以上實施例進行說明,但需要注意的是,這些描述並非用以限縮本發明。相反地,此發明涵蓋了熟習此技藝人士顯而易見的修改與相似設置。所以,申請權利要求範圍須以最寬廣的方式解釋來包含所有顯而易見的修改與相似設置。Although the present invention is described using the above embodiments, it should be noted that these descriptions are not intended to limit the present invention. On the contrary, this invention covers obvious modifications and similar settings for those skilled in the art. Therefore, the scope of the claims of the application must be interpreted in the broadest way to include all obvious modifications and similar settings.
110‧‧‧主機端110‧‧‧Host
130‧‧‧讀卡機130‧‧‧Card reader
150‧‧‧記憶卡150‧‧‧Memory card
210、410‧‧‧處理單元210, 410‧‧‧ processing unit
211‧‧‧檔案系統211‧‧‧ File System
213‧‧‧UFI驅動程式213‧‧‧ UFI driver
215‧‧‧USB驅動程式215‧‧‧USB driver
230‧‧‧USB匯流排230‧‧‧USB bus
250、420‧‧‧記憶體250, 420‧‧‧ memory
312、332‧‧‧測試單元就緒命令312、332‧‧‧Test unit ready command
318‧‧‧CSW失敗訊息318‧‧‧CSW failure message
322‧‧‧請求感測命令322‧‧‧ Request sensing command
328‧‧‧媒體改變的感測資料328‧‧‧ Sensing data of media change
338‧‧‧CSW通過訊息338‧‧‧CSW message
342‧‧‧讀取能力命令342‧‧‧Read Ability Command
348‧‧‧目前能力描述元348‧‧‧ current ability description element
352‧‧‧讀取命令352‧‧‧Read command
358‧‧‧寫入命令358‧‧‧Write command
450‧‧‧系統匯流排450‧‧‧System bus
460‧‧‧USB介面460‧‧‧USB interface
480‧‧‧記憶卡介面480‧‧‧Memory card interface
S510~S545‧‧‧方法步驟S510~S545‧‧‧Method steps
600‧‧‧錯誤預防處理程序600‧‧‧Procedure for error prevention
612‧‧‧讀取能力命令612‧‧‧Read Ability Command
618‧‧‧讀取能力資料回覆618‧‧‧Reading ability data reply
628‧‧‧能夠觸發主機端後續處理的感測資料628‧‧‧ Sensing data that can trigger subsequent processing on the host
718‧‧‧不能夠觸發主機端後續寫入的感測資料718‧‧‧Cannot trigger the subsequent writing of sensing data on the host
810‧‧‧主機端介面驅動模塊810‧‧‧Host interface driver module
820‧‧‧記憶卡介面驅動模塊820‧‧‧Memory card interface driver module
830‧‧‧錯誤預防處理模塊830‧‧‧ Error prevention processing module
圖1為依據本發明實施例的資料存取系統示意圖。FIG. 1 is a schematic diagram of a data access system according to an embodiment of the invention.
圖2為主機端的方塊圖。Figure 2 is a block diagram of the host side.
圖3為一些實施方式的主機端及讀卡機間的交互順序圖。FIG. 3 is a sequence diagram of interaction between the host and the card reader in some embodiments.
圖4為依據本發明實施例的讀卡機的系統架構圖。FIG. 4 is a system architecture diagram of a card reader according to an embodiment of the invention.
圖5為依據本發明實施例的記憶卡存取方法的流程圖。5 is a flowchart of a memory card access method according to an embodiment of the invention.
圖6及7為依據本發明實施例的主機端及讀卡機間的交互順序圖。6 and 7 are sequence diagrams of interaction between the host and the card reader according to an embodiment of the invention.
圖8為依據本發明實施例的讀卡機中資料存取的軟體模塊示意圖。8 is a schematic diagram of a software module for data access in a card reader according to an embodiment of the present invention.
S510~S545‧‧‧方法步驟 S510~S545‧‧‧Method steps
Claims (13)
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US201862738405P | 2018-09-28 | 2018-09-28 | |
US62/738,405 | 2018-09-28 |
Publications (2)
Publication Number | Publication Date |
---|---|
TWI681296B true TWI681296B (en) | 2020-01-01 |
TW202013200A TW202013200A (en) | 2020-04-01 |
Family
ID=69942674
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW107139391A TWI681296B (en) | 2018-09-28 | 2018-11-06 | Apparatus and method and computer program product for accessing a memory card |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN110968441B (en) |
TW (1) | TWI681296B (en) |
Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TW200905569A (en) * | 2007-07-20 | 2009-02-01 | Ene Technology Inc | USB card reader control device and manufacturing method for the same |
TW200933490A (en) * | 2008-01-28 | 2009-08-01 | Afa Technologies Inc | USB card reader and method of automatically executing program with the USB card reader |
TW201035769A (en) * | 2009-03-20 | 2010-10-01 | Aten Int Co Ltd | Apparatus and method for integrating memories |
TW201040979A (en) * | 2009-05-04 | 2010-11-16 | Etrend Electronics Inc | Firmware program operating method of small input and output (I/O) device memory card |
TW201104470A (en) * | 2009-07-29 | 2011-02-01 | Tomtom Int Bv | Data storage system and method |
TW201142589A (en) * | 2010-05-24 | 2011-12-01 | Silicon Motion Inc | Apparatuses for managing and accessing flash memory module |
TW201145178A (en) * | 2010-06-09 | 2011-12-16 | Cepa Electronics Group Inc | Card reader allowing memory combination and method thereof |
CN102789430A (en) * | 2011-05-18 | 2012-11-21 | 群联电子股份有限公司 | Memory storage device, memory controller and access method of storage device |
TW201317994A (en) * | 2011-10-25 | 2013-05-01 | Silicon Motion Inc | Burn-in method for embedded Multi Media Card, and test board using the same, and embedded Multi Media Card tested by the same |
TWM489308U (en) * | 2014-05-29 | 2014-11-01 | Eclat Forever Machinery Co Ltd | Exposure machine |
TW201530315A (en) * | 2014-01-29 | 2015-08-01 | Transcend Information Inc | Initialization method and initialization system for storage device |
TW201543347A (en) * | 2014-02-14 | 2015-11-16 | Micron Technology Inc | Command queuing |
TW201604690A (en) * | 2014-07-21 | 2016-02-01 | 群聯電子股份有限公司 | Memory storage device and control method thereof and memory control circuit unit and module |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN100357875C (en) * | 2006-01-25 | 2007-12-26 | 骆建军 | SD memory card capable of automatically adjusting capacity |
CN103092799B (en) * | 2012-12-28 | 2015-07-22 | 飞天诚信科技股份有限公司 | Universal serial bus (USB) device and method for recognition of host operating system |
US9804783B1 (en) * | 2014-10-17 | 2017-10-31 | Sk Hynix Memory Solutions Inc. | Hierarchical host controller for SSD device |
-
2018
- 2018-11-06 TW TW107139391A patent/TWI681296B/en active
- 2018-11-06 CN CN201811315197.2A patent/CN110968441B/en active Active
Patent Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TW200905569A (en) * | 2007-07-20 | 2009-02-01 | Ene Technology Inc | USB card reader control device and manufacturing method for the same |
TW200933490A (en) * | 2008-01-28 | 2009-08-01 | Afa Technologies Inc | USB card reader and method of automatically executing program with the USB card reader |
TW201035769A (en) * | 2009-03-20 | 2010-10-01 | Aten Int Co Ltd | Apparatus and method for integrating memories |
TW201040979A (en) * | 2009-05-04 | 2010-11-16 | Etrend Electronics Inc | Firmware program operating method of small input and output (I/O) device memory card |
TW201104470A (en) * | 2009-07-29 | 2011-02-01 | Tomtom Int Bv | Data storage system and method |
TW201142589A (en) * | 2010-05-24 | 2011-12-01 | Silicon Motion Inc | Apparatuses for managing and accessing flash memory module |
TW201145178A (en) * | 2010-06-09 | 2011-12-16 | Cepa Electronics Group Inc | Card reader allowing memory combination and method thereof |
CN102789430A (en) * | 2011-05-18 | 2012-11-21 | 群联电子股份有限公司 | Memory storage device, memory controller and access method of storage device |
TW201317994A (en) * | 2011-10-25 | 2013-05-01 | Silicon Motion Inc | Burn-in method for embedded Multi Media Card, and test board using the same, and embedded Multi Media Card tested by the same |
TW201530315A (en) * | 2014-01-29 | 2015-08-01 | Transcend Information Inc | Initialization method and initialization system for storage device |
TW201543347A (en) * | 2014-02-14 | 2015-11-16 | Micron Technology Inc | Command queuing |
TWM489308U (en) * | 2014-05-29 | 2014-11-01 | Eclat Forever Machinery Co Ltd | Exposure machine |
TW201604690A (en) * | 2014-07-21 | 2016-02-01 | 群聯電子股份有限公司 | Memory storage device and control method thereof and memory control circuit unit and module |
Also Published As
Publication number | Publication date |
---|---|
CN110968441A (en) | 2020-04-07 |
CN110968441B (en) | 2023-06-06 |
TW202013200A (en) | 2020-04-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11216206B2 (en) | Method of operating data storage device | |
TWI613675B (en) | Data storage device having reduced read latency and method of operating same | |
KR102147970B1 (en) | Method of reparing non-volatile memory based storage device and operation method of electronic system including the storage device | |
US9678760B2 (en) | Memory card and storage system having authentication program and method for operating thereof | |
KR102229024B1 (en) | Data storage device for self-detecting error and logging operation, and system having the same | |
WO2017092002A1 (en) | Data migration method applicable to computer system, and device and computer system utilizing same | |
US9529805B2 (en) | Systems and methods for providing dynamic file system awareness on storage devices | |
US11556466B2 (en) | Logical-to-physical data structures | |
TWI489272B (en) | Data protecting method, and memory controller and memory storage device using the same | |
TW202101227A (en) | Apparatus and method and computer program product for handling flash physical-resource sets | |
US20220100425A1 (en) | Storage device, operating method of storage device, and operating method of computing device including storage device | |
US10642531B2 (en) | Atomic write method for multi-transaction | |
CN111324414A (en) | NVM storage medium simulator | |
TWI681296B (en) | Apparatus and method and computer program product for accessing a memory card | |
KR102554418B1 (en) | Memory controller and storage device including the same | |
KR102424293B1 (en) | Storage system and method for performing secure write protect thereof | |
KR102555800B1 (en) | Storage system and operating method thereof | |
US10489335B1 (en) | Apparatus and method and computer program product for accessing a memory card | |
US10019574B2 (en) | Systems and methods for providing dynamic file system awareness on storage devices | |
KR20210001206A (en) | Controller, memory system and operating method thereof | |
US11288204B2 (en) | Logical and physical address field size reduction by alignment-constrained writing technique | |
US20230043925A1 (en) | Storage device and operating method thereof | |
EP2924576A1 (en) | Storage control apparatus, control program, and control method | |
CN112162709A (en) | Method and device for inquiring data correctness, computer equipment and storage medium | |
CN116069587A (en) | SSD alarm method and device |