[go: up one dir, main page]

TWI892562B - Memory card reading device - Google Patents

Memory card reading device

Info

Publication number
TWI892562B
TWI892562B TW113112614A TW113112614A TWI892562B TW I892562 B TWI892562 B TW I892562B TW 113112614 A TW113112614 A TW 113112614A TW 113112614 A TW113112614 A TW 113112614A TW I892562 B TWI892562 B TW I892562B
Authority
TW
Taiwan
Prior art keywords
memory card
controller
slot
error
card reader
Prior art date
Application number
TW113112614A
Other languages
Chinese (zh)
Other versions
TW202540871A (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 TW113112614A priority Critical patent/TWI892562B/en
Priority to US19/082,116 priority patent/US20250307089A1/en
Application granted granted Critical
Publication of TWI892562B publication Critical patent/TWI892562B/en
Publication of TW202540871A publication Critical patent/TW202540871A/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/20Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
    • G06F11/202Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where processing functionality is redundant
    • G06F11/2023Failover techniques
    • G06F11/2033Failover techniques switching over of hardware resources
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/1629Error detection by comparing the output of redundant processing systems
    • G06F11/165Error detection by comparing the output of redundant processing systems with continued operation after detection of the error
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3037Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a memory, e.g. virtual memory, cache
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/32Monitoring with visual or acoustical indication of the functioning of the machine
    • G06F11/324Display of status information
    • G06F11/325Display of status information by lamps or LED's

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

This invention provides a memory card reading device, which includes a communication interface, one or more slots, and a controller. The slot is used for electrically connecting to a memory card. When executing an access command on the memory card, the controller determines whether an error has occurred based on busy time. When multiple memory cards are disposed and the error meets a switching condition, the controller will switch to another memory card for further usage.

Description

記憶卡讀取裝置Memory card reader

本揭露是有關於能自動檢測記憶卡狀態並出相應操作的記憶卡讀取裝置。This disclosure relates to a memory card reader device that can automatically detect the status of a memory card and perform corresponding operations.

隨著資訊時代的來臨,且儲存裝置價格逐漸親民,使得儲存裝置日漸普及於各種應用。然而儲存裝置如硬碟機(Hard Disk Drive,HDD)、固態硬碟(Solid State Disk,SSD)、快閃記憶體在長期使用下逐漸損耗,最終裝置損壞導致資料遺失。現有的儲存裝置檢測機制有S.M.A.R.T.(Self-Monitoring Analysis and Reporting Technology),是一種硬碟狀態檢測與警告系統的規範,硬碟會記錄自身各項健康指標,並透過指令從硬碟讀取數值,以判斷是否存在毀損風險。With the advent of the information age and the increasing affordability of storage devices, they are becoming increasingly popular in various applications. However, storage devices such as hard disk drives (HDDs), solid-state drives (SSDs), and flash memories gradually wear out over time, ultimately leading to device damage and data loss. Existing storage device monitoring mechanisms include S.M.A.R.T. (Self-Monitoring Analysis and Reporting Technology), a standard for hard drive status monitoring and warning systems. The hard drive records various health indicators and uses commands to read the values from the hard drive to determine whether there is a risk of damage.

但現行S.M.A.R.T.多為被動觸發,若使用者不主動讀回資訊,則無法主動告知已存在損壞風險,進而造成使用者資料的意外丟失。且目前支援S.M.A.R.T.的儲存裝置除硬碟外普及程度有限,如果沒有緊急配套措施容易無法及時挽救使用者資料。However, current S.M.A.R.T. systems are mostly passively triggered. If the user doesn't proactively retrieve the information, there's no way to proactively notify them of potential corruption, potentially leading to accidental data loss. Furthermore, S.M.A.R.T.-compatible storage devices, aside from hard drives, are currently limited in popularity. Without emergency measures, it's easy to lose data in a timely manner.

本揭露的實施例提出一種記憶卡讀取裝置,包括通訊介面、第一插槽、第二插槽與控制器。通訊介面用以電性連接至電子裝置。第一插槽用以電性連接至第一記憶卡。第二插槽用以電性連接至第二記憶卡。控制器電性連接至通訊介面、第一插槽與第二插槽,用以設定第一插槽為啟動插槽,接受來自電子裝置的存取指令,並根據存取指令存取第一記憶卡。控制器判斷執行存取指令時是否產生錯誤,並判斷錯誤是否滿足切換條件。若錯誤滿足切換條件,控制器用以設定第二插槽為啟動插槽。An embodiment of the present disclosure provides a memory card reading device, comprising a communication interface, a first slot, a second slot, and a controller. The communication interface is electrically connected to an electronic device. The first slot is electrically connected to a first memory card. The second slot is electrically connected to a second memory card. The controller is electrically connected to the communication interface, the first slot, and the second slot, and is used to set the first slot as an activation slot, receive access instructions from the electronic device, and access the first memory card according to the access instructions. The controller determines whether an error occurs when executing the access instruction, and determines whether the error meets a switching condition. If the error meets the switching condition, the controller is used to set the second slot as the activation slot.

以另一個角度來說,本揭露的實施例提出一種記憶卡讀取裝置,包括通訊介面、插槽與控制器。通訊介面用以電性連接至電子裝置。插槽用以電性連接至記憶卡。控制器電性連接至通訊介面與插槽,用以接受來自電子裝置的存取指令,並根據存取指令存取記憶卡。控制器用以取得執行存取指令的忙碌時間,並判斷忙碌時間是否大於時間臨界值。如果忙碌時間大於時間臨界值,控制器判斷產生錯誤。From another perspective, an embodiment of the present disclosure provides a memory card reader device, comprising a communication interface, a slot, and a controller. The communication interface is electrically connected to an electronic device. The slot is electrically connected to a memory card. The controller is electrically connected to the communication interface and the slot, and is configured to receive access instructions from the electronic device and access the memory card according to the access instructions. The controller is configured to obtain a busy time for executing the access instruction and determine whether the busy time is greater than a time threshold. If the busy time is greater than the time threshold, the controller determines that an error has occurred.

為讓本發明的上述特徵和優點能更明顯易懂,下文特舉實施例,並配合所附圖式作詳細說明如下。In order to make the above features and advantages of the present invention more clearly understood, embodiments are given below and described in detail with reference to the accompanying drawings.

關於本文中所使用之「第一」、「第二」等,並非特別指次序或順位的意思,其僅為了區別以相同技術用語描述的元件或操作。The terms “first,” “second,” etc. used herein do not particularly refer to order or sequence, but are only used to distinguish elements or operations described with the same technical terms.

本揭露提出一種記憶卡讀取裝置,橋接在電子裝置與記憶卡之間,此記憶卡讀取裝置可以自動偵測記憶卡的健康狀態,並且在必要時切換另一張記憶卡使用以避免記憶卡因為損壞使得資料遺失。以下將舉多個實施例來說明。This disclosure provides a memory card reader device that bridges the gap between an electronic device and a memory card. This memory card reader device can automatically detect the health of a memory card and, when necessary, switch to another memory card to prevent data loss due to card damage. Several embodiments are provided below to illustrate this.

[第一實施例][First embodiment]

圖1是根據第一實施例繪示記憶卡讀取裝置的示意圖。請參照圖1,記憶卡讀取裝置110用以橋接在電子裝置160與記憶卡171、172之間。電子裝置160可以是個人電腦、筆記型電腦、手機、平板電腦、監視系統、伺服器等,本揭露並不在此限。記憶卡171、172中具有快閃記憶體。在一些實施例中記憶卡讀取裝置110亦稱為讀卡機,是一個獨立的裝置,電子裝置160例如為手機。在一些實施例中,記憶卡讀取裝置110與記憶卡171、172是設置在同一個裝置當中,例如記憶卡讀取裝置110是一塊電路板上的晶片,而記憶卡171、172以焊接的方式設置在相同的電路板上。在一些實施例中,記憶卡讀取裝置110也可以與電子裝置160設置在同一個裝置當中,例如電子裝置160是監視系統(包含攝影機、處理器等),而記憶卡讀取裝置110是在系統內的電路或晶片。換言之,記憶卡讀取裝置110可以獨立形成一個裝置,也可以與電子裝置160與記憶卡171、172中任何一者設置在相同的電路板上或相同的裝置中。Figure 1 is a schematic diagram of a memory card reader device according to a first embodiment. Referring to Figure 1 , a memory card reader device 110 is used to bridge between an electronic device 160 and memory cards 171 and 172. The electronic device 160 may be a personal computer, laptop, mobile phone, tablet computer, surveillance system, server, or the like, but the present disclosure is not limited thereto. Memory cards 171 and 172 contain flash memory. In some embodiments, the memory card reader device 110, also referred to as a card reader, is a standalone device, while the electronic device 160 is, for example, a mobile phone. In some embodiments, the memory card reader 110 and the memory cards 171 and 172 are installed in the same device. For example, the memory card reader 110 is a chip on a circuit board, and the memory cards 171 and 172 are soldered to the same circuit board. In some embodiments, the memory card reader 110 can also be installed in the same device as the electronic device 160. For example, the electronic device 160 is a surveillance system (including a camera, processor, etc.), and the memory card reader 110 is a circuit or chip within the system. In other words, the memory card reader 110 can be an independent device, or it can be installed on the same circuit board or in the same device as the electronic device 160 and any one of the memory cards 171 and 172.

記憶卡讀取裝置110包括了控制器120、通訊介面130、插槽141、142與指示裝置151、152,其中控制器120電性連接至通訊介面130、插槽141、142與指示裝置151、152。控制器120也可以稱為控制電路,用以接受來自於電子裝置160的存取指令(例如為讀取指令或是寫入指令),並對記憶卡171、172進行相對應的操作。通訊介面130用以電性連接至電子裝置160,例如為符合通用序列匯流排(Universal Serial Bus,USB)規範或是快速周邊組件互聯(Peripheral Component Interconnect Express,PCIE)規範的連接埠(port)或電路。插槽141用以電性連接至記憶卡171,插槽142用以電性連接至記憶卡172,插槽141、142例如為符合安全數位(secure digital,SD)規範、通用快閃記憶體儲存(Universal Flash Storage,UFS)規範、嵌入式多媒體卡(Embedded Multimedia Card,eMMC)規範、或是多媒體卡(Multimedia Card,MMC)規範等類似儲存規範的連接埠或電路。指示裝置151、152用以提供一訊息給使用者,此訊息可以用光線(例如燈號)、聲音、或影像的形式呈現。例如,指示裝置151、152可以是發光二極體、蜂鳴器、顯示面板等。The memory card reader device 110 includes a controller 120, a communication interface 130, slots 141, 142, and indicator devices 151, 152. The controller 120 is electrically connected to the communication interface 130, slots 141, 142, and indicator devices 151, 152. The controller 120, also known as a control circuit, is configured to receive access commands (e.g., read commands or write commands) from the electronic device 160 and perform corresponding operations on the memory cards 171, 172. The communication interface 130 is configured to electrically connect to the electronic device 160 and may be, for example, a port or circuit compliant with the Universal Serial Bus (USB) or Peripheral Component Interconnect Express (PCIE) specifications. Slot 141 is electrically connected to memory card 171, and slot 142 is electrically connected to memory card 172. Slots 141 and 142 are, for example, connection ports or circuits that comply with similar storage specifications, such as the Secure Digital (SD) specification, the Universal Flash Storage (UFS) specification, the Embedded Multimedia Card (eMMC) specification, or the Multimedia Card (MMC) specification. Indicator devices 151 and 152 are used to provide a message to the user. This message can be presented in the form of light (such as a light signal), sound, or image. For example, indicator devices 151 and 152 can be light-emitting diodes, buzzers, display panels, etc.

圖2是根據第一實施例繪示記憶卡健康狀態檢測方法的流程圖。請參照圖2,在步驟201,控制器120會透過通訊介面130接受來自電子裝置160的存取指令,此存取指令可為讀取指令或是寫入指令。舉例來說,此存取指令是要讀取記憶卡171中大小為1MB的資料,此存取指令會包含資料的位址、大小等資訊。Figure 2 is a flow chart illustrating a memory card health status detection method according to a first embodiment. Referring to Figure 2 , in step 201, controller 120 receives an access command from electronic device 160 via communication interface 130. This access command can be a read command or a write command. For example, if the access command is to read 1MB of data from memory card 171, the access command will include information such as the data address and size.

在步驟202,控制器120會根據此存取指令對記憶卡171下達多個連續存取指令,每個連續存取指令是用以存取較小(例如為4kB)的資料。記憶卡171與插槽141之間有多條訊號線以傳輸資料、指令或其他訊號。當控制器120傳送一個連續存取指令給記憶卡171以後,其中一訊號線(例如SD規範中的DAT0線)的準位會被設置以表示忙碌狀態,此時記憶卡171透過內部的控制晶片(未繪示)執行連續存取指令。等到記憶卡171內部的控制晶片執行完連續存取指令,會再設置上述訊號線的準位以消除忙碌狀態。控制器120會透過訊號線的準位計算記憶卡171處於忙碌狀態的時間(以下稱為忙碌時間)。由於一個存取指令對應至多個連續存取指令,因此也對應至多個忙碌時間(一個連續存取指令對應一個忙碌時間)。In step 202, the controller 120 issues multiple continuous access commands to the memory card 171 based on the access command. Each continuous access command is used to access smaller data (e.g., 4kB). There are multiple signal lines between the memory card 171 and the slot 141 to transmit data, commands, or other signals. After the controller 120 sends a continuous access command to the memory card 171, the level of one of the signal lines (e.g., the DAT0 line in the SD specification) is set to indicate a busy state. At this time, the memory card 171 executes the continuous access command through the internal control chip (not shown). After the control chip inside the memory card 171 completes the execution of the continuous access command, it will set the level of the above signal line again to eliminate the busy state. The controller 120 calculates the time the memory card 171 is in a busy state (hereinafter referred to as busy time) through the level of the signal line. Since one access command corresponds to multiple continuous access commands, it also corresponds to multiple busy times (one continuous access command corresponds to one busy time).

隨著記憶卡171的損耗,每次執行連續存取指令的忙碌時間可能會越來越長。例如記憶卡171中部份的快閃記憶體區塊(block)因為抹除次數到達(或接近)上限無法繼續使用,使得記憶卡171需要花更多的時間來進行資料的寫入與搬移等。在步驟203,控制器120會取得存取指令對應的任何一個忙碌時間,並判斷此忙碌時間是否大於一時間臨界值。如果此忙碌時間沒有大於時間臨界值,則可進行下一個連續存取指令,直到所有的連續存取指令處理完畢。如果忙碌時間大於時間臨界值,則控制器120判斷產生(發生)錯誤。在一些實施例中,當錯誤產生時,在步驟204,控制器120會根據錯誤累加一錯誤次數。在步驟205,控制器120判斷此錯誤次數是否大於次數臨界值。如果錯誤次數沒有大於次數臨界值,表示記憶卡171的損壞不嚴重,可進行下一個連續存取指令,直到所有的連續存取指令處理完畢。如果錯誤次數大於次數臨界值,在步驟206,控制器120用以產生警告訊息,此警告訊息可由控制器120透過指示裝置151發出,例如點亮發光二極體、讓蜂鳴器發出特定的聲音、或是讓顯示面板呈現特定的圖案等等。在一些實施例中控制器120也可以將警告訊息以文字、數字或二進位等形式傳送至電子裝置160。As memory card 171 wears out, the busy time for each continuous access command execution may become longer and longer. For example, some flash memory blocks in memory card 171 may become unusable due to reaching (or approaching) their erase limit, requiring memory card 171 to spend more time writing and moving data. In step 203, controller 120 obtains the busy time corresponding to any access command and determines whether the busy time is greater than a time threshold. If the busy time is not greater than the time threshold, the next continuous access command can be executed, and this process continues until all continuous access commands are processed. If the busy time is greater than the time threshold, the controller 120 determines that an error has occurred. In some embodiments, when an error occurs, in step 204, the controller 120 accumulates an error count based on the error. In step 205, the controller 120 determines whether the error count is greater than the error count threshold. If the error count is not greater than the error count threshold, the damage to the memory card 171 is not serious, and the next continuous access command can be processed until all continuous access commands are processed. If the error count exceeds the threshold, in step 206, the controller 120 generates a warning message. This warning message can be sent by the controller 120 via the indicator device 151, for example by lighting a light-emitting diode, causing a buzzer to emit a specific sound, or causing a display panel to display a specific pattern. In some embodiments, the controller 120 can also transmit the warning message to the electronic device 160 in text, numeric, or binary form.

在上述實施例中,步驟203中是取得存取指令對應的多個忙碌時間其中一個忙碌時間以進行判斷。在其他實施例中也以對存取指令對應的所有忙碌時間進行判斷,當每次忙碌間大於時間臨界值時都會執行步驟204、205。In the above embodiment, step 203 is to obtain one of the multiple busy times corresponding to the access instruction for determination. In other embodiments, all the busy times corresponding to the access instruction are determined, and steps 204 and 205 are executed each time the busy time is greater than the time threshold.

由於每張記憶卡的特性不盡相同,在此是適應性地決定上述的時間臨界值。在一些實施例中,控制器120先對記憶卡171下達多個測試用的連續存取指令,並且收集對應的忙碌時間(稱為歷史忙碌時間)。接下來控制器120計算這些歷史忙碌時間的平均值與標準差,並根據平均值與標準差設定時間臨界值。舉例來說,控制器120可設定時間臨界值為平均值加上n倍的標準差,其中n為正數,例如為2、2.5、3等。Because each memory card has different characteristics, the aforementioned time threshold is adaptively determined. In some embodiments, the controller 120 first issues multiple continuous access commands to the memory card 171 for testing and collects the corresponding busy times (referred to as historical busy times). The controller 120 then calculates the average and standard deviation of these historical busy times and sets the time threshold based on the average and standard deviation. For example, the controller 120 may set the time threshold to be the average plus n times the standard deviation, where n is a positive number, such as 2, 2.5, 3, etc.

在一些實施例中,也可以用機器學習的方式來設定上述的時間臨界值。舉例來說,可以取得與記憶卡171相同型號、同批生產、相近生產日期或其他相同(或相似)硬體資訊的其他記憶卡。對這些記憶卡下達多個測試用的連續存取指令,計算出對應的忙碌時間,並記錄記憶卡是否損壞。當記憶卡損壞以後,可以據以產生對應的標籤,此標籤可以用來指示(或判斷)記憶卡在未來一段時間是否會損壞。接下來,將忙碌時間當作一個機器學習模型的輸入,把標籤當作機器學習模型的輸出以進行訓練。此機器學習模型可以是線性方程式、多項式方程式、指數方程式、或者是複雜的神經網路等,本揭露並不在此限。接下來可以把訓練好的機器學習模型套用在記憶卡171中,每次記憶卡171產生忙碌時間,都可以將此忙碌時間輸入至機器學習模型以判斷是否將要損壞。In some embodiments, the above-mentioned time threshold can also be set by machine learning. For example, other memory cards with the same model, the same production batch, similar production date, or other same (or similar) hardware information as memory card 171 can be obtained. Issue multiple continuous access instructions for testing to these memory cards, calculate the corresponding busy time, and record whether the memory card is damaged. When the memory card is damaged, a corresponding label can be generated based on it. This label can be used to indicate (or judge) whether the memory card will be damaged in the future. Next, the busy time is used as the input of a machine learning model, and the label is used as the output of the machine learning model for training. This machine learning model can be a linear equation, a polynomial equation, an exponential equation, or a complex neural network, but this disclosure is not limited thereto. The trained machine learning model can then be applied to the memory card 171. Each time the memory card 171 generates a busy time, the busy time can be input into the machine learning model to determine whether it is about to be corrupted.

在圖1的實施例中記憶卡讀取裝置110包含了兩個插槽141、142,圖2的方法可以套用在記憶卡171、172中的任何一者。例如套用在記憶卡172時,在步驟206可以透過指示裝置152提供警告訊息。在一些實施例中,記憶卡讀取裝置110也可以只具有一個插槽,圖2的方法並不限制記憶卡讀取裝置110必須具有多個插槽。In the embodiment of FIG. 1 , the memory card reader 110 includes two slots 141 and 142. The method of FIG. 2 can be applied to either memory card 171 or 172. For example, when applied to memory card 172, a warning message can be provided via indicator device 152 in step 206. In some embodiments, the memory card reader 110 may have only one slot. The method of FIG. 2 does not limit the memory card reader 110 to having multiple slots.

[第二實施例][Second embodiment]

在第二實施例中,記憶卡讀取裝置的硬體架構如同圖1。但與第一實施例不同的是,在第二實施例中會判斷記憶卡是否已經損害且不該繼續使用,是的話則切換至另一張記憶卡。圖3是根據第二實施例繪示記憶卡讀取裝置的控制方法的流程圖。請參照圖1與圖3,在步驟310中控制器120設定插槽141為啟動插槽。在此實施例中同時只會有一個插槽被啟動,當插槽被啟動時會使用對應的記憶卡,如果插槽沒有被啟動則對應的記憶卡則不會被使用。因此,當插槽141為啟動插槽時,只有記憶卡171會被使用。具體來說,步驟310包括了步驟311、312。在步驟311中,進行初始化,控制器120會與電子裝置160進行USB介面或是PCIE介面的初始化程序,例如提供記憶卡171的大小、類型等資訊。在步驟312,確定插槽辨識碼,例如插槽141的辨識碼為“1”,而插槽142的辨識碼為“2”,則控制器120會先選擇“1”的辨識碼。In the second embodiment, the hardware architecture of the memory card reader is as shown in Figure 1. However, unlike the first embodiment, in the second embodiment, it is determined whether the memory card is damaged and should not be used anymore. If so, it switches to another memory card. Figure 3 is a flow chart illustrating the control method of the memory card reader according to the second embodiment. Please refer to Figures 1 and 3. In step 310, the controller 120 sets slot 141 as the activation slot. In this embodiment, only one slot will be activated at a time. When the slot is activated, the corresponding memory card will be used. If the slot is not activated, the corresponding memory card will not be used. Therefore, when slot 141 is the activation slot, only memory card 171 will be used. Specifically, step 310 includes steps 311 and 312. In step 311, initialization is performed. Controller 120 performs USB or PCIE interface initialization procedures with electronic device 160, providing information such as the size and type of memory card 171. In step 312, the slot identification code is determined. For example, if the identification code for slot 141 is "1" and the identification code for slot 142 is "2," controller 120 will initially select the identification code "1."

在步驟321,控制器120透過通訊介面130接受來自電子裝置160的存取指令,並根據此存取指令存取目前使用的記憶卡171。如同第一實施例所述,存取指令例如為讀取指令或是寫入指令,控制器120會根據此存取指令對記憶卡171下達多個連續存取指令,每個存取指令對應一忙碌時間。In step 321, the controller 120 receives an access command from the electronic device 160 via the communication interface 130 and accesses the currently used memory card 171 according to the access command. As described in the first embodiment, the access command may be a read command or a write command. The controller 120 issues multiple consecutive access commands to the memory card 171 based on the access command, with each access command corresponding to a busy time.

在步驟322,控制器120判斷執行存取指令時是否產生(發生)錯誤。在此有許多種方式來判斷是否產生錯誤,例如可透過第一實施例的方式,根據忙碌時間是否大於時間臨界值來判斷是否產生錯誤。在其他實施例中,可以根據記憶卡171中的錯誤校正碼(error correction code,ECC)來判斷是否發生錯誤。在一些實施例中,在執行存取指令時也可以取得記憶卡171回覆的任何狀態資訊,此狀態資訊例如為eMMC協議、UFS協議中的健康報告(health report),控制器120可根據此健康報告判斷是否發生錯誤。在一些實施例中,控制器120也可以計算記憶卡的傳輸速率,當傳輸速率小於一個臨界值時判斷產生錯誤。In step 322, the controller 120 determines whether an error occurs when executing the access instruction. There are many ways to determine whether an error occurs. For example, the method of the first embodiment can be used to determine whether an error occurs based on whether the busy time is greater than the time threshold. In other embodiments, it can be determined based on the error correction code (ECC) in the memory card 171. In some embodiments, any status information returned by the memory card 171 can also be obtained when executing the access instruction. This status information is, for example, a health report in the eMMC protocol or the UFS protocol. The controller 120 can determine whether an error occurs based on this health report. In some embodiments, the controller 120 may also calculate the transfer rate of the memory card and determine that an error has occurred when the transfer rate is less than a threshold value.

如果步驟322的結果為是,在步驟330中控制器120判斷錯誤是否滿足切換條件。當滿足切換條件時,表示記憶卡171已經有某種程度的損耗,繼續使用的話可能會遺失裡面的資料,因此亦須切換至另一張記憶卡172。在此實施例中步驟330包括了步驟331與步驟332。在步驟331中,根據錯誤累加錯誤次數。在步驟332中,判斷錯誤次數是否大於次數臨界值。如果錯誤次數沒有大於次數臨界值,則回到步驟321,接受下一個存取指令。如果錯誤次數大於次數臨界值,表示滿足切換條件,接著在步驟340中,控制器120設定插槽142為啟動插槽。當第二次執行步驟311時,控制器120與電子裝置160進行初始化以提供關於記憶卡172的資訊,在步驟312則選擇“2”的插槽辨識碼。If the result of step 322 is yes, controller 120 determines in step 330 whether the error meets the switching condition. If the switching condition is met, it indicates that memory card 171 has been damaged to a certain extent. Continuing to use it may result in data loss. Therefore, it is necessary to switch to another memory card 172. In this embodiment, step 330 includes steps 331 and 332. In step 331, the error count is accumulated based on the error. In step 332, it is determined whether the error count is greater than the threshold value. If the error count is not greater than the threshold, the process returns to step 321 to accept the next access command. If the error count is greater than the threshold, the switch condition is met. Then, in step 340, the controller 120 sets slot 142 as the active slot. When step 311 is executed for the second time, the controller 120 and the electronic device 160 are initialized to provide information about the memory card 172. In step 312, the slot identification code "2" is selected.

在其他實施例中,步驟330也可以根據記憶卡回覆的健康報告判斷錯誤是否滿足切換條件。例如,可以讀取健康報告中的VENDOR_PROPRIETARY_HEALTH_REPORT [301-270]、DEVICE_LIFE_TIME_EST_TYP_B [269]、DEVICE_LIFE_TIME_EST_TYP_A [268]、PRE_EOL_INFO [267],以及UFS規範內定義的bPreEOLInfo、bDeviceLifeTimeEstA、bDeviceLifeTimeEstB、VendorPropInfo等資訊。在其他實施例中,也可以將忙碌時間輸入至第一實施例提到的機器學習模型,根據模型輸出的數值來判斷是否滿足切換條件。In other embodiments, step 330 may also determine whether the error meets the switching condition based on the health report returned by the memory card. For example, VENDOR_PROPRIETARY_HEALTH_REPORT [301-270], DEVICE_LIFE_TIME_EST_TYP_B [269], DEVICE_LIFE_TIME_EST_TYP_A [268], PRE_EOL_INFO [267], and information such as bPreEOLInfo, bDeviceLifeTimeEstA, bDeviceLifeTimeEstB, and VendorPropInfo defined in the UFS specification may be read from the health report. In other embodiments, the busy time may be input into the machine learning model mentioned in the first embodiment, and the value output by the model may be used to determine whether the switching condition is met.

請參照圖1,在一些實施例中也可以透過指示裝置151、152來告知使用者記憶卡171、172的健康狀況。例如,在接收到存取指令之前,控制器120設定指示裝置151、152為健康模式,此健康模式例如是設定發光二極體為關閉,或者設定蜂鳴器為靜音,或者設定顯示面板提供第一圖案。換言之,在設定插槽141為啟動插槽時,指示裝置151、152都為健康模式。當(因滿足切換條件)啟動插槽切換至插槽142以後,這表示插槽141已經損耗,因此控制器120會設定指示裝置151為異常模式,例如可以設定發光二極體為導通(點亮),或者設定蜂鳴器發出聲音,或者設定顯示面板提供第二圖案等。如此一來,使用者可以透過指示裝置151、152提供的光源、聲音以及圖案辨識記憶卡171、172的健康狀況。Referring to Figure 1 , in some embodiments, the health status of memory cards 171 and 172 can be communicated to the user via indicator devices 151 and 152. For example, before receiving an access command, controller 120 sets indicator devices 151 and 152 to a healthy mode. This healthy mode may, for example, turn off an LED, mute a buzzer, or display a first pattern on the display panel. In other words, when slot 141 is set as the active slot, indicator devices 151 and 152 are both in healthy mode. When the activation slot switches to slot 142 (because the switching conditions are met), this indicates that slot 141 is damaged. Therefore, controller 120 sets indicator device 151 to an abnormal mode. For example, it can set the LED to conduct (light up), set the buzzer to sound, or set the display panel to provide a second pattern. In this way, the user can identify the health status of memory cards 171 and 172 through the light, sound, and pattern provided by indicator devices 151 and 152.

本揭露中提供了兩個實施例,這兩個實施例可以獨立實施也可以合併實施。例如圖3的步驟322可以採用第一實施例的作法,也可以採用其他做法。第一實施例提供的方法可用來判斷是否要切換記憶卡,也可以單獨用來判斷記憶卡的健康狀況。此外,兩個實施例的硬體架構不需要是相同的,例如在第一實施例中記憶卡讀取裝置可包括一或多個插槽,但在第二實施例中的記憶卡讀取裝置則包含了兩個以上的插槽。This disclosure provides two embodiments, which can be implemented independently or in combination. For example, step 322 of FIG. 3 can adopt the method of the first embodiment or another method. The method provided in the first embodiment can be used to determine whether to switch memory cards, or it can be used alone to determine the health of a memory card. In addition, the hardware architecture of the two embodiments does not need to be identical. For example, in the first embodiment, the memory card reader device may include one or more slots, while in the second embodiment, the memory card reader device includes two or more slots.

雖然本發明已以實施例揭露如上,然其並非用以限定本發明,任何所屬技術領域中具有通常知識者,在不脫離本發明的精神和範圍內,當可作些許的更動與潤飾,故本發明的保護範圍當視後附的申請專利範圍所界定者為準。Although the present invention has been disclosed above by way of embodiments, they are not intended to limit the present invention. Any person having ordinary skill in the art may make slight modifications and improvements without departing from the spirit and scope of the present invention. Therefore, the scope of protection of the present invention shall be determined by the scope of the attached patent application.

110:記憶卡讀取裝置 120:控制器 130:通訊介面 141,142:插槽 151,152:指示裝置 160:電子裝置 171,172:記憶卡 201~206,310~312,321~322,330~332,340:步驟 110: Memory card reader 120: Controller 130: Communication interface 141, 142: Slot 151, 152: Indicator 160: Electronic device 171, 172: Memory card 201-206, 310-312, 321-322, 330-332, 340: Steps

圖1是根據第一實施例繪示記憶卡讀取裝置的示意圖。 圖2是根據第一實施例繪示記憶卡健康狀態檢測方法的流程圖。 圖3是根據第二實施例繪示記憶卡讀取裝置的控制方法的流程圖。 Figure 1 is a schematic diagram of a memory card reader according to a first embodiment. Figure 2 is a flow chart illustrating a memory card health status detection method according to the first embodiment. Figure 3 is a flow chart illustrating a control method for a memory card reader according to a second embodiment.

110:記憶卡讀取裝置 110: Memory card reader

120:控制器 120: Controller

130:通訊介面 130: Communication Interface

141,142:插槽 141,142: Slots

151,152:指示裝置 151,152: Indicator device

160:電子裝置 160: Electronic devices

171,172:記憶卡 171,172:Memory card

Claims (9)

一種記憶卡讀取裝置,包括: 一通訊介面,用以電性連接至一電子裝置; 一第一插槽,用以電性連接至一第一記憶卡; 一第二插槽,用以電性連接至一第二記憶卡;以及 一控制器,電性連接至該通訊介面、該第一插槽與該第二插槽,用以設定該第一插槽為一啟動插槽,接受來自該電子裝置的一存取指令,並根據該存取指令存取該第一記憶卡, 其中該控制器判斷執行該存取指令時是否產生一錯誤,並判斷該錯誤是否滿足一切換條件, 若該錯誤滿足該切換條件,該控制器用以設定該第二插槽為該啟動插槽; 其中該控制器用以取得執行該存取指令的一忙碌時間,並判斷該忙碌時間是否大於一時間臨界值, 如果該忙碌時間大於該時間臨界值,該控制器判斷產生該錯誤。 A memory card reader device comprises: a communication interface for electrically connecting to an electronic device; a first slot for electrically connecting to a first memory card; a second slot for electrically connecting to a second memory card; and a controller electrically connected to the communication interface, the first slot, and the second slot, configured to set the first slot as an active slot, receive an access command from the electronic device, and access the first memory card according to the access command. The controller determines whether an error occurs when executing the access command and whether the error satisfies a switching condition. If the error satisfies the switching condition, the controller sets the second slot as the active slot. The controller is configured to obtain a busy time for executing the access instruction and determine whether the busy time is greater than a time threshold. If the busy time is greater than the time threshold, the controller determines that the error has occurred. 如請求項1所述之記憶卡讀取裝置,其中當該錯誤產生時,該控制器用以根據該錯誤累加一錯誤次數並判斷該錯誤次數是否大於一次數臨界值, 其中如果該錯誤次數大於該次數臨界值,該控制器判斷滿足該切換條件。 The memory card reader device of claim 1, wherein when the error occurs, the controller accumulates an error count based on the error and determines whether the error count is greater than a threshold value. If the error count is greater than the threshold value, the controller determines that the switching condition is met. 如請求項1所述之記憶卡讀取裝置,還包括: 一第一指示裝置;以及 一第二指示裝置, 其中在接收該存取指令之前,該控制器設定該第一指示裝置為一健康模式,並設定該第二指示裝置為該健康模式, 其中當該錯誤滿足該切換條件時,該控制器切換該第一指示裝置為一異常模式。 The memory card reader device of claim 1 further comprises: a first indicator device; and a second indicator device, wherein, before receiving the access command, the controller sets the first indicator device to a healthy mode and sets the second indicator device to the healthy mode, wherein, when the error satisfies the switching condition, the controller switches the first indicator device to an abnormal mode. 如請求項3所述之記憶卡讀取裝置,其中該第一指示裝置與該第二指示裝置為發光二極體或蜂鳴器。The memory card reader device as described in claim 3, wherein the first indicating device and the second indicating device are light-emitting diodes or buzzers. 一種記憶卡讀取裝置,包括: 一通訊介面,用以電性連接至一電子裝置; 一插槽,用以電性連接至一記憶卡;以及 一控制器,電性連接至該通訊介面與該插槽,用以接受來自該電子裝置的一存取指令,並根據該存取指令存取該記憶卡, 其中該控制器用以取得執行該存取指令的一忙碌時間,並判斷該忙碌時間是否大於一時間臨界值, 如果該忙碌時間大於該時間臨界值,該控制器判斷產生一錯誤。 A memory card reader device includes: a communication interface for electrically connecting to an electronic device; a slot for electrically connecting to a memory card; and a controller electrically connected to the communication interface and the slot, for receiving an access command from the electronic device and accessing the memory card according to the access command. The controller is configured to obtain a busy time for executing the access command and determine whether the busy time is greater than a time threshold. If the busy time is greater than the time threshold, the controller determines that an error has occurred. 如請求項5所述之記憶卡讀取裝置,其中該控制器用以根據該存取指令對該記憶卡下達多個連續存取指令,該忙碌時間對應至該多個連續存取指令的其中一連續存取指令。The memory card reading device as described in claim 5, wherein the controller is used to issue multiple continuous access instructions to the memory card according to the access instruction, and the busy time corresponds to one of the multiple continuous access instructions. 如請求項6所述之記憶卡讀取裝置,其中該控制器用以取得關於該記憶卡的多個歷史忙碌時間,計算該些歷史忙碌時間的平均值與標準差,並根據該平均值與該標準差設定該時間臨界值。A memory card reading device as described in claim 6, wherein the controller is used to obtain multiple historical busy times of the memory card, calculate the average and standard deviation of these historical busy times, and set the time threshold value based on the average and the standard deviation. 如請求項5所述之記憶卡讀取裝置,其中當該錯誤產生時,該控制器用以根據該錯誤累加一錯誤次數並判斷該錯誤次數是否大於一次數臨界值, 其中如果該錯誤次數大於該次數臨界值,該控制器用以產生一警告訊息。 The memory card reader device of claim 5, wherein when an error occurs, the controller is configured to accumulate an error count based on the error and determine whether the error count is greater than a threshold value. If the error count is greater than the threshold value, the controller is configured to generate a warning message. 如請求項8所述之記憶卡讀取裝置,還包括一指示裝置,其中該控制器用以透過該指示裝置發出該警告訊息,該指示裝置為一發光二極體或一蜂鳴器。The memory card reader device as described in claim 8 further includes an indicator device, wherein the controller is used to issue the warning message through the indicator device, and the indicator device is a light-emitting diode or a buzzer.
TW113112614A 2024-04-02 2024-04-02 Memory card reading device TWI892562B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
TW113112614A TWI892562B (en) 2024-04-02 2024-04-02 Memory card reading device
US19/082,116 US20250307089A1 (en) 2024-04-02 2025-03-17 Memory card reading device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW113112614A TWI892562B (en) 2024-04-02 2024-04-02 Memory card reading device

Publications (2)

Publication Number Publication Date
TWI892562B true TWI892562B (en) 2025-08-01
TW202540871A TW202540871A (en) 2025-10-16

Family

ID=97177316

Family Applications (1)

Application Number Title Priority Date Filing Date
TW113112614A TWI892562B (en) 2024-04-02 2024-04-02 Memory card reading device

Country Status (2)

Country Link
US (1) US20250307089A1 (en)
TW (1) TWI892562B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW201823978A (en) * 2016-12-21 2018-07-01 廣達電腦股份有限公司 Computer-implemented methods, systems for automatically updating firmware of components of a server system in a datacenter and non-transitory computer-readable storage medium
TW201908917A (en) * 2017-07-25 2019-03-01 廣達電腦股份有限公司 Discharging and charging method, non-transitory computer-readable storage medium, and system for discharging and charging a battery system
TW201911045A (en) * 2017-08-09 2019-03-16 廣達電腦股份有限公司 Server system, computer-implemented method and non-transitory computer-readable medium
TW201931820A (en) * 2018-01-05 2019-08-01 廣達電腦股份有限公司 Equipment rack and method of ensuring status reporting thereof
TW201934883A (en) * 2018-02-13 2019-09-01 廣達電腦股份有限公司 Method of controlling a plurality of cooling fan modules, server system and non-transitory computer-readable storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW201823978A (en) * 2016-12-21 2018-07-01 廣達電腦股份有限公司 Computer-implemented methods, systems for automatically updating firmware of components of a server system in a datacenter and non-transitory computer-readable storage medium
TW201908917A (en) * 2017-07-25 2019-03-01 廣達電腦股份有限公司 Discharging and charging method, non-transitory computer-readable storage medium, and system for discharging and charging a battery system
TW201911045A (en) * 2017-08-09 2019-03-16 廣達電腦股份有限公司 Server system, computer-implemented method and non-transitory computer-readable medium
TW201931820A (en) * 2018-01-05 2019-08-01 廣達電腦股份有限公司 Equipment rack and method of ensuring status reporting thereof
TW201934883A (en) * 2018-02-13 2019-09-01 廣達電腦股份有限公司 Method of controlling a plurality of cooling fan modules, server system and non-transitory computer-readable storage medium

Also Published As

Publication number Publication date
US20250307089A1 (en) 2025-10-02
TW202540871A (en) 2025-10-16

Similar Documents

Publication Publication Date Title
EP2811392B1 (en) Method and device for reducing read delay
US7979636B2 (en) Method of controlling semiconductor memory card system
CN106776196A (en) A kind of server hard disc method for monitoring state and system
US8606970B2 (en) Data writing method for non-volatile memory, and controller and storage system using the same
US8595523B2 (en) Data writing method for non-volatile memory, and controller and storage system using the same
CN104239187A (en) Hard disk state indicating device
CN105468484A (en) Method and apparatus for determining fault location in storage system
US7840836B2 (en) Storage device and data writing method utilizing the same
CN114528181A (en) Storage protection prompt processing method and device based on solid state disk, and terminal
US9626241B2 (en) Watchdogable register-based I/O
TW201933124A (en) Hot swap control circuit and related storage server system
CN113900880A (en) Storage disk detection method and device, terminal equipment and storage medium
US20190220193A1 (en) Storage device for not allowing to write data based on end of life of a disk device
US9720756B2 (en) Computing system with debug assert mechanism and method of operation thereof
CN115061641B (en) Disk fault processing method, device, equipment and storage medium
TWI892562B (en) Memory card reading device
WO2024124862A1 (en) Server-based memory processing method and apparatus, processor and an electronic device
CN120196519B (en) Fault alarm method, system, device, medium and product of PCIe device
CN113626231B (en) A method and system for configuring SAS RAID card based on BIOS
CN102122262A (en) Monitoring system and monitoring method for solid-state memory equipment
US11740790B2 (en) Electronic device and method for monitoring hard disks
CN120781856A (en) Memory card reader
CN115691636A (en) A slow disk detection method and device
TWI832800B (en) Hard drive backplane with multiple lighting specifications
CN112379832B (en) Storage medium detection method and device