CN116306757A - Memory card type identification method - Google Patents
Memory card type identification method Download PDFInfo
- Publication number
- CN116306757A CN116306757A CN202111563369.XA CN202111563369A CN116306757A CN 116306757 A CN116306757 A CN 116306757A CN 202111563369 A CN202111563369 A CN 202111563369A CN 116306757 A CN116306757 A CN 116306757A
- Authority
- CN
- China
- Prior art keywords
- card
- secure digital
- digital card
- pin
- express
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06K—GRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
- G06K19/00—Record carriers for use with machines and with at least a part designed to carry digital markings
- G06K19/06—Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code
- G06K19/067—Record carriers with conductive marks, printed circuits or semiconductor circuit elements, e.g. credit or identity cards also with resonating or responding marks without active components
- G06K19/07—Record carriers with conductive marks, printed circuits or semiconductor circuit elements, e.g. credit or identity cards also with resonating or responding marks without active components with integrated circuit chips
- G06K19/073—Special arrangements for circuits, e.g. for protecting identification code in memory
- G06K19/07309—Means for preventing undesired reading or writing from or onto record carriers
- G06K19/07372—Means for preventing undesired reading or writing from or onto record carriers by detecting tampering with the circuit
Landscapes
- Engineering & Computer Science (AREA)
- Computer Hardware Design (AREA)
- Computer Security & Cryptography (AREA)
- General Engineering & Computer Science (AREA)
- Microelectronics & Electronic Packaging (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Credit Cards Or The Like (AREA)
Abstract
Description
技术领域technical field
本发明涉及安全数字(Secure Digital,SD)存储卡,尤其涉及SD卡的读卡装置、电子装置及识别SD卡种类的方法。The invention relates to a secure digital (Secure Digital, SD) memory card, in particular to a card reading device for the SD card, an electronic device and a method for identifying the type of the SD card.
背景技术Background technique
目前较常见的安全数字存储卡有以下三种:传统SD卡(legacy SD card)、支持快速周边组件互连(Peripheral Component Interconnect Express)接口(以下简称PCIe接口)的SD卡(即,SD快速(SD Express)卡)以及支持第二类超高速(Ultra High Speed typeII,UHS-II)接口(以下简称UHS-II接口)的SD卡(以下简称UHS-II SD卡)。SD Express卡及UHS-II SD卡皆向下相容传统SD卡。然而,由于SD Express卡及UHS-II SD卡在信号接触点排列上完全相同,但PCIe接口为交流(Alternating Current,AC)耦合的接口且UHS-II接口为直流(Direct Current,DC)耦合的接口,所以识别SD Express卡及UHS-II SD卡并不容易,造成使用者诸多不便。再者,若读卡机要同时向下支持传统SD卡,则识别存储卡的种类更是一大挑战。At present, there are three types of secure digital memory cards that are more common: traditional SD card (legacy SD card), SD card that supports Peripheral Component Interconnect Express (PCIe interface) (hereinafter referred to as PCIe interface) (that is, SD Express (SD card) SD Express) card) and SD cards that support the second type of Ultra High Speed (Ultra High Speed type II, UHS-II) interface (hereinafter referred to as UHS-II interface) (hereinafter referred to as UHS-II SD card). Both SD Express cards and UHS-II SD cards are backward compatible with traditional SD cards. However, since the SD Express card and the UHS-II SD card are identical in signal contact point arrangement, the PCIe interface is an AC (Alternating Current, AC) coupled interface and the UHS-II interface is a DC (Direct Current, DC) coupled interface Interface, so it is not easy to identify SD Express card and UHS-II SD card, causing users a lot of inconvenience. Furthermore, if the card reader needs to support the traditional SD card at the same time, it is a big challenge to identify the type of the memory card.
因此,需要一种识别SD卡种类的方法。Therefore, a method for identifying the type of SD card is needed.
发明内容Contents of the invention
鉴于现有技术的不足,本发明的一目的在于提供一种识别SD卡种类的方法,以改善现有技术的不足。In view of the deficiencies of the prior art, an object of the present invention is to provide a method for identifying the type of an SD card to improve the deficiencies of the prior art.
本发明的一实施例提供一种存储卡种类识别方法,用来识别一安全数字卡的种类,该安全数字卡的引脚编号遵循安全数字协会所制定的一安全数字卡规范,该方法包含:对该安全数字卡进行一第二类超高速安全数字卡初始化程序及一安全数字快速卡初始化程序的其中一者;控制该安全数字卡的一编号4引脚实质上为0伏特;控制该安全数字卡的一编号14引脚实质上为0伏特;对该安全数字卡进行该第二类超高速安全数字卡初始化程序及该安全数字快速卡初始化程序的另一者;以及,判断该安全数字卡是否为一第二类超高速安全数字卡或是否为一安全数字快速卡。An embodiment of the present invention provides a memory card type identification method for identifying the type of a secure digital card. The pin number of the secure digital card follows a secure digital card specification formulated by the Secure Digital Association. The method includes: performing one of a
本发明的另一实施例提供一种存储卡种类识别方法,用来识别一安全数字卡的种类,该安全数字卡的引脚编号遵循安全数字协会所制定的一安全数字卡规范,该方法包含:对该安全数字卡进行一传统安全数字卡初始化程序;以及,按序判断该安全数字卡是否为一安全数字快速卡、一第二类超高速安全数字卡或一传统安全数字卡。Another embodiment of the present invention provides a method for identifying the type of memory card, which is used to identify the type of a secure digital card. The pin number of the secure digital card follows a secure digital card specification formulated by the Secure Digital Association. The method includes : Carrying out a conventional SD card initialization program on the SD card; and, sequentially judging whether the SD card is a SD Express card, a
本发明的另一实施例提供一种存储卡种类识别方法,用来识别一安全数字卡的种类,该安全数字卡的引脚编号遵循安全数字协会所制定的一安全数字卡规范,该方法包含:对该安全数字卡进行一第二类超高速安全数字卡初始化程序;判断该安全数字卡是否为一第二类超高速安全数字卡;当该安全数字卡非为该第二类超高速安全数字卡时,控制该安全数字卡的一编号4引脚实质上为0伏特、控制该安全数字卡的一编号14引脚实质上为0伏特,以及对该安全数字卡进行一传统安全数字卡初始化程序;判断该安全数字卡是否为一安全数字快速卡;以及,当该安全数字卡非为该安全数字快速卡时,判断该安全数字卡是否为一传统安全数字卡。Another embodiment of the present invention provides a method for identifying the type of memory card, which is used to identify the type of a secure digital card. The pin number of the secure digital card follows a secure digital card specification formulated by the Secure Digital Association. The method includes : Carry out a second-class ultra-high-speed secure digital card initialization program to the secure digital card; judge whether the secure digital card is a second-class ultra-high-speed secure digital card; In the case of a digital card, a
相较于现有技术,发明的存储卡种类识别方法可以至少识别SD Express卡、UHS-II SD卡及传统SD卡。Compared with the prior art, the invented memory card type identification method can at least identify SD Express card, UHS-II SD card and traditional SD card.
有关本发明的特征、实作与技术效果,兹配合附图作实施例详细说明如下。The features, implementation and technical effects of the present invention are described in detail as follows with reference to the accompanying drawings.
附图说明Description of drawings
图1为本发明电子装置的一实施例的功能方框图;Fig. 1 is a functional block diagram of an embodiment of the electronic device of the present invention;
图2显示安全数字卡的接脚编号;Figure 2 shows the pin numbers of the Secure Digital card;
图3显示本发明存储卡种类识别方法的一实施例的流程图;Fig. 3 shows the flowchart of an embodiment of the memory card type identification method of the present invention;
图4显示图3的步骤S11的一实施例的流程图;Fig. 4 shows the flowchart of an embodiment of step S11 of Fig. 3;
图5显示图3的步骤S21的一实施例的流程图;Fig. 5 shows the flowchart of an embodiment of step S21 of Fig. 3;
图6显示图3的步骤S13的一实施例的流程图;Fig. 6 shows the flowchart of an embodiment of step S13 of Fig. 3;
图7显示图3的步骤S22的一实施例的流程图;Fig. 7 shows the flowchart of an embodiment of step S22 of Fig. 3;
图8显示图3的步骤S15的一实施例的流程图;Fig. 8 shows the flowchart of an embodiment of step S15 of Fig. 3;
图9显示图3的步骤S23的一实施例的流程图;Fig. 9 shows the flowchart of an embodiment of step S23 of Fig. 3;
图10显示本发明存储卡种类识别方法的另一实施例的流程图;Fig. 10 shows the flowchart of another embodiment of the memory card type identification method of the present invention;
图11显示图10的步骤S16的一实施例的流程图;Fig. 11 shows the flowchart of an embodiment of step S16 of Fig. 10;
图12显示本发明存储卡种类识别方法的另一实施例的流程图;Fig. 12 shows the flowchart of another embodiment of the memory card type identification method of the present invention;
图13显示图12的步骤S24的一实施例的流程图;Fig. 13 shows the flowchart of an embodiment of step S24 of Fig. 12;
图14显示图12的步骤S25的一实施例的流程图;Fig. 14 shows the flowchart of an embodiment of step S25 of Fig. 12;
图15显示图12的步骤S26的一实施例的流程图;Fig. 15 shows the flowchart of an embodiment of step S26 of Fig. 12;
图16显示本发明存储卡种类识别方法的另一实施例的流程图;以及Fig. 16 shows the flowchart of another embodiment of the memory card type identification method of the present invention; and
图17显示图16的步骤S27的一实施例的流程图。FIG. 17 shows a flowchart of an embodiment of step S27 in FIG. 16 .
符号说明Symbol Description
10A:电子装置10A: Electronics
20:SD卡20: SD card
12:芯片12: chip
C1、C2:电容C1, C2: capacitance
11A:读卡装置11A: Card reader device
18:存储卡插槽18: Memory card slot
S0、S1、S2、S4、S5、S7:信号S0, S1, S2, S4, S5, S7: signal
P1、P3、P2、P4:接脚P1, P3, P2, P4: pins
105:选择电路105: Select circuit
120:控制电路120: Control circuit
130:桥接读卡电路130: bridge card reader circuit
135:UHS-II物理层135: UHS-II physical layer
S3:控制信号S3: Control signal
Pa、Pb:端点Pa, Pb: endpoint
S11、S12、S13、S14、S15、S16、S21、S22、S23、S24、S25、S26、S27、S31、S32、S33、S34、S35、S112、S114、S116、S118、S132、S134、S136、S138、S152、S154、S162、S164、S166、S212、S216、S218、S221、S223、S224、S225、S226、S227、S232、S234、S242、S244、S246、S252、S254、S262、S272、S274:步骤S11, S12, S13, S14, S15, S16, S21, S22, S23, S24, S25, S26, S27, S31, S32, S33, S34, S35, S112, S114, S116, S118, S132, S134, S136, S138, S152, S154, S162, S164, S166, S212, S216, S218, S221, S223, S224, S225, S226, S227, S232, S234, S242, S244, S246, S252, S254, S262, S272, S2 74: step
具体实施方式Detailed ways
以下说明内容的技术用语是参照本技术领域的习惯用语,如本说明书对部分用语有加以说明或定义,该部分用语的解释是以本说明书的说明或定义为准。The technical terms in the following description refer to the customary terms in this technical field. If some terms are explained or defined in this manual, the explanations of these terms shall be based on the descriptions or definitions in this manual.
本发明的公开内容包含支持多种SD卡的读卡装置或电子装置以及识别SD卡种类的方法。由于本发明的读卡装置及电子装置所包含的部分元件单独而言可能为已知元件,因此在不影响该装置发明的充分公开及可实施性的前提下,以下说明对于已知元件的细节将予以省略。此外,本发明的识别SD卡种类的方法的部分或全部流程可以是软件及/或固件的形式,并且可通过本发明的读卡装置或其等效装置来执行,在不影响该方法发明的充分公开及可实施性的前提下,以下方法发明的说明将着重于步骤内容而非硬件。The disclosed content of the present invention includes a card reading device or an electronic device supporting multiple SD cards and a method for identifying the type of the SD card. Since some components included in the card reading device and electronic device of the present invention may be known components individually, so without affecting the full disclosure and implementability of the invention of the device, the details of the known components are described below will be omitted. In addition, part or all of the process of the method for identifying the type of SD card of the present invention can be in the form of software and/or firmware, and can be executed by the card reader device of the present invention or its equivalent device, without affecting the method of the invention Under the premise of full disclosure and practicability, the description of the method invention below will focus on the steps rather than the hardware.
图1为本发明电子装置的一实施例的功能方框图。电子装置10A具有读卡功能,可以存取SD卡20。电子装置10A包含芯片12、电容C1、读卡装置11A、电容C2及存储卡插槽18。读卡装置11A耦接于芯片12与存储卡插槽18之间。更明确地说,读卡装置11A通过电容C1耦接芯片12,以及通过电容C2耦接存储卡插槽18。存储卡插槽18用来接收SD卡20(即,供SD卡20插入)。FIG. 1 is a functional block diagram of an embodiment of the electronic device of the present invention. The electronic device 10A has a card reading function and can access the
电容C1的一端耦接或电连接芯片12,另一端耦接或电连接读卡装置11A。电容C1作为交流耦合(AC coupling)电容。当信号的传输方向为芯片12到读卡装置11A时,芯片12与电容C1之间的信号S0包含交流成分及直流成分,而电容C1与读卡装置11A之间的信号S1只包含该交流成分,但不包含该直流成分;当信号的传输方向为读卡装置11A到芯片12时,信号S1包含交流成分及直流成分时,而信号S0只包含该交流成分,但不包含该直流成分。因为PCIe信号是一种通过交流耦合传递的信号,所以电容C1的目的之一是用来提供芯片12与读卡装置11A之间的PCIe信号连接,即,建立芯片12与读卡装置11A之间的PCIe接口。One end of the capacitor C1 is coupled or electrically connected to the
电容C2的一端耦接或电连接读卡装置11A的接脚P1,电容C2的另一端耦接或电连接存储卡插槽18的接脚P3。电容C2作为交流耦合电容。当信号的传输方向为存储卡插槽18到读卡装置11A时,接脚P3与电容C2之间的信号S5包含交流成分及直流成分,而电容C2与接脚P1之间的信号S2只包含该交流成分,但不包含该直流成分;当信号的传输方向为读卡装置11A到存储卡插槽18时,信号S2可能包含交流成分及直流成分,而信号S5只包含该交流成分,但不包含该直流成分。值得注意的是,当接脚P1与接脚P3之间传递的信号是PCIe信号时,信号S5及信号S2皆为PCIe信号。One end of the capacitor C2 is coupled or electrically connected to the pin P1 of the
读卡装置11A还包含接脚P2及接脚P4。接脚P2耦接或电连接接脚P3,接脚P4耦接或电连接存储卡插槽18的至少一接脚(图未示)。当SD卡20是传统SD卡时,读卡装置11A至少通过接脚P4存取SD卡20(信号S7是遵循传统SD卡规格的信号,以下简称传统SD卡信号)。当SD卡20是UHS-II SD卡时(此时信号S5是遵循UHS-II SD卡规格的信号,以下简称UHS-II SD卡信号),读卡装置11A至少通过接脚P2存取SD卡20,但不通过接脚P1存取SD卡20,此时接脚P1会变成边带(sideband)信号进行辅助使用,如提供时钟或是一些控制信号。当SD卡20是SDExpress卡时(此时信号S5是SD Express卡信号),读卡装置11A至少通过接脚P1存取SD卡20,但不通过接脚P2存取SD卡20。The
在一些实施例中,芯片12、电容C1、电容C2、11A及存储卡插槽18被设置于电子装置10A的电路板(图未示)上,而上述的信号S0、信号S1、信号S2、信号S5及信号S7经由电路板或导线上的走线传输。In some embodiments, the
读卡装置11A包含选择电路105(例如多工器(multiplexer,MUX))、控制电路120及桥接读卡电路130。控制电路120耦接选择电路105及桥接读卡电路130,用来控制选择电路105及桥接读卡电路130。The
桥接读卡电路130可以将传统SD卡信号(即信号S7)转换成PCIe信号(即信号S4)。桥接读卡电路130包含UHS-II物理层135,用来将UHS-II SD卡信号(例如信号S5)转换成信号S4。换言之,桥接读卡电路130是传统SD卡和UHS-II SD卡桥接读卡电路。传统SD卡和UHS-II SD卡桥接读卡电路为本技术领域技术人员所熟知,故不赘述其细节,关于传统SD卡部分,可以参考SD协会网站https://www.sdcard.org/downloads/pls/上的Physical LayerSimplified Specification;而关于UHS-II部分,可以参考UHS-II Simplified Addendum。The
选择电路105接收信号S2及信号S4。控制电路120通过控制信号S3控制选择电路105。当SD卡20为SD Express卡时,控制电路120控制选择电路105选择端点Pa;即,使电容C1与接脚P1之间形成通路(即,信号连接:信号S1=信号S2),并且使电容C1与桥接读卡电路130之间形成断路(即,不信号连接:信号S1≠信号S4)。当SD卡20为UHS-II SD卡或传统SD卡时,控制电路120控制选择电路105选择端点Pb;即,使电容C1与桥接读卡电路130之间形成通路(信号S1=信号S4),并且使电容C1与接脚P1之间形成断路(信号S1≠信号S2)。The
当SD卡20是SD Express卡时,芯片12通过以下的路径存取SD卡20:当SD卡20是UHS-II SD卡时,芯片12通过以下的路径存取SD卡20:/>当SD卡20是传统SD卡时,芯片12通过以下的路径存取SD卡20:/>换言之,读卡装置11A支持多种SD卡的存取,而采用读卡装置11A的电子装置10A则具有多种SD卡的存取能力。When the
图1中的芯片12通过PCIe接口与读卡装置11A连接或沟通;换言之,电容C1的设置可以使芯片12与读卡装置11A之间的信号传输符合PCIe规格。因此,在一些实施例中,电容C2可以被省略以节省成本或电路面积。The
图2显示安全数字卡(传统SD卡、UHS-II SD卡及SD Express卡)的接脚编号,该些接脚编号是遵循安全数字协会(Secure Digital Association)所制定的安全数字卡规范。关于该些接脚的描述及更多细节请参考SD协会网站https://www.sdcard.org/downloads/pls/的Physical Layer Simplified Specification,换言之,图2中所列的接脚或信号名称(例如时钟RCLK+/-、时钟REFCLK+/-、信号PERST#、CLKREQ#等)皆可在安全数字卡规范找到定义或相关的实作细节。Figure 2 shows the pin numbers of Secure Digital cards (traditional SD cards, UHS-II SD cards, and SD Express cards). These pin numbers follow the Secure Digital Card specification developed by the Secure Digital Association. For a description of these pins and more details, please refer to the Physical Layer Simplified Specification on the SD Association website https://www.sdcard.org/downloads/pls/, in other words, the pins or signal names listed in Figure 2 ( For example, clock RCLK+/-, clock REFCLK+/-, signal PERST#, CLKREQ#, etc.) can be found in the SD card specification or related implementation details.
在图1的实施例中,控制电路120通过接脚P1、P2、P4及/或读卡装置11A的其他接脚(图未示)来与SD卡20沟通(包含但不限于传/收时钟、命令、数据等)。为了简洁起见,在图1中省略该些接脚与控制电路120之间及与存储卡插槽18之间的连线。In the embodiment of FIG. 1 , the
图3显示本发明存储卡种类识别方法的一实施例的流程图。该流程可以由读卡装置11A执行,包含以下步骤。FIG. 3 shows a flow chart of an embodiment of the method for identifying the type of the memory card of the present invention. This process can be executed by the
步骤S11:对SD卡20进行UHS-II SD卡初始化程序。步骤S11的细节将于下方配合图4进行讨论。Step S11: Perform a UHS-II SD card initialization procedure on the
步骤S21:判断SD卡20是否为UHS-II SD卡。如果判断结果为是,则进行步骤S31;否则,进行步骤S12。步骤S21的细节将于下方配合图5进行讨论。Step S21: Determine whether the
步骤S31:继续UHS-II SD卡初始化程序(细节请参阅安全数字卡规范)。Step S31: continue with the UHS-II SD card initialization procedure (please refer to the Secure Digital Card Specification for details).
步骤S12:控制编号4接脚实质上为0伏特(V)以及控制编号14接脚实质上为0V(即,等效于关闭(turn off)编号4接脚及编号14接脚)。请注意,“实质上为某一电压”代表等于或近似该电压。Step S12 :
步骤S13:对SD卡20进行SD Express卡初始化程序。步骤S13的细节将于下方配合图6进行讨论。Step S13: carry out the SD Express card initialization program on the
步骤S22:判断SD卡20是否为SD Express卡。如果判断结果为是,则进行步骤S32;否则,进行步骤S14。步骤S22的细节将于下方配合图7进行讨论。Step S22: Determine whether the
步骤S32:继续SD Express卡初始化程序(细节请参阅安全数字卡规范)。Step S32: continue with the SD Express card initialization procedure (please refer to the Secure Digital Card specification for details).
步骤S14:步骤S14与步骤S12相同。Step S14: Step S14 is the same as step S12.
步骤S15:对SD卡20进行传统SD卡初始化程序。步骤S15的细节将于下方配合图8进行讨论。Step S15: Carry out a traditional SD card initialization procedure on the
步骤S23:判断SD卡20是否为传统SD卡。如果判断结果为是,则进行步骤S33;否则,进行步骤S34。步骤S23的细节将于下方配合图9进行讨论。Step S23: Determine whether the
步骤S33:继续传统SD卡初始化程序(细节请参阅安全数字卡规范)。Step S33: continue with the traditional SD card initialization procedure (please refer to the Secure Digital Card specification for details).
步骤S34:控制编号4接脚实质上为0V,因为SD卡20为其他种类的存储卡或非为存储卡。Step S34: The
图4显示图3的步骤S11的一实施例的流程图,包含以下步骤。FIG. 4 shows a flowchart of an embodiment of step S11 in FIG. 3 , including the following steps.
步骤S112:控制编号4接脚实质上为3.3V。Step S112 :
步骤S114:控制编号14接脚实质上为1.8V。Step S114: Control the
步骤S116:控制编号1接脚实质上为低电压(例如0V)。请参阅图2,由于安全数字卡规范在UHS-II模式下没有定义编号1接脚,所以对UHS-II模式而言编号1接脚可以为高电压或低电压。然而,对PCIe模式来说,当编号1接脚(即,PERST#)为低电压时,SD Express卡不会动作。因此,步骤S116可以防止将SD Express卡误判为UHS-II SD卡。Step S116: Control the
步骤S118:控制编号9接脚、编号2接脚及编号5接脚实质上为低电压(例如0V)。请参阅图2,由于安全数字卡规范在UHS-II模式下没有定义编号9接脚、编号2接脚及编号5接脚,所以对UHS-II模式而言此三个接脚可以为高电压或低电压。请注意,在一些实施例中,步骤S118是选择性的。Step S118 : Control the
图5显示图3的步骤S21的一实施例的流程图,包含以下步骤。FIG. 5 shows a flowchart of an embodiment of step S21 in FIG. 3 , including the following steps.
步骤S212:同时提供时钟RCLK+至编号7接脚和时钟RCLK-至编号8接脚。Step S212 : Simultaneously provide the clock RCLK+ to the
步骤S216:提供信号STB.L至编号11接脚及编号12接脚。请参阅安全数字卡规范来得知信号STB.L的定义或实作细节。Step S216 : Provide the signal STB.L to the
步骤S218:判断是否在编号15接脚及编号16接脚检测到信号STB.L。如果判断结果为是,则控制电路120可以确定SD卡20为UHS-II SD卡;否则,SD卡20非为UHS-II SD卡。Step S218: Determine whether the signal STB.L is detected at the
图6显示图3的步骤S13的一实施例的流程图,包含以下步骤。FIG. 6 shows a flowchart of an embodiment of step S13 in FIG. 3 , including the following steps.
步骤S132:控制编号4接脚实质上为3.3V。Step S132:
步骤S134:控制编号18接脚实质上为1.2V。Step S134:
步骤S136:控制编号9接脚实质上为高电压(例如3.3V)。Step S136: Control the
步骤S138:控制编号1接脚实质上为低电压(例如0V)。Step S138: Control the
图7显示图3的步骤S22的一实施例的流程图,包含以下步骤。FIG. 7 shows a flowchart of an embodiment of step S22 in FIG. 3 , including the following steps.
步骤S221:同时提供时钟RRFCLK+至编号7接脚和时钟RRFCLK-至编号8接脚。Step S221 : Simultaneously provide the clock RRFCLK+ to the
步骤S223:控制编号1接脚实质上为高电压(例如3.3V)。Step S223: Control the
步骤S224:判断编号9接脚是否实质上为低电压(例如0V)。如果判断结果为是,则控制电路120可以确定SD卡20为SD Express卡;否则,执行步骤S225。Step S224: Determine whether the
步骤S225:控制编号18接脚实质上为0V(即,等效于关闭编号18接脚)。Step S225: Control the
步骤S226:控制编号14接脚实质上为1.8V。Step S226:
步骤S227:判断编号9接脚是否实质上为低电压(例如0V)。如果判断结果为是,则控制电路120可以确定SD卡20为SD Express卡;否则,SD卡20非为SD Express卡。Step S227: Determine whether the
图8显示图3的步骤S15的一实施例的流程图,包含以下步骤。FIG. 8 shows a flowchart of an embodiment of step S15 in FIG. 3 , including the following steps.
步骤S152:控制编号4接脚实质上为3.3V。Step S152:
步骤S154:提供时钟至编号5接脚。Step S154: Provide a clock to the
图9显示图3的步骤S23的一实施例的流程图,包含以下步骤。FIG. 9 shows a flowchart of an embodiment of step S23 in FIG. 3 , including the following steps.
步骤S232:经由编号2接脚发送数个SD命令给SD卡20。Step S232: Send several SD commands to the
步骤S234:判断是否收到预期的回应。如果判断结果为是,则控制电路120可以确定SD卡20为传统SD卡;否则,SD卡20非为传统SD卡。Step S234: Determine whether the expected response is received. If the judgment result is yes, the
在一些实施例中,上述的数个SD命令及预期的回应请参阅安全数字卡规范第7.10版(可在此取得:www.sdcard.org/downloads/pls/archives/)的第36页。In some embodiments, several SD commands and expected responses described above are described on page 36 of the Secure Digital Card Specification Version 7.10 (available here: www.sdcard.org/downloads/pls/archives/).
图10显示本发明存储卡种类识别方法的另一实施例的流程图。图10与图3相似,差别在于图10的流程先判断SD卡20是否为SD Express卡,再判断SD卡20是否为UHS-II SD卡;因此,请参阅图3的讨论来了解图10的细节。然而,步骤S16与步骤S11有些许不同,步骤S16的细节将于下方配合图11进行讨论。FIG. 10 shows a flow chart of another embodiment of the method for identifying the type of the memory card of the present invention. Fig. 10 is similar to Fig. 3, the difference is that the process of Fig. 10 first judges whether
图11显示图10的步骤S16的一实施例的流程图,包含以下步骤。FIG. 11 shows a flowchart of an embodiment of step S16 in FIG. 10 , including the following steps.
步骤S162:控制编号4接脚实质上为3.3V。Step S162:
步骤S164:控制编号14接脚实质上为1.8V。Step S164:
步骤S166:控制编号1接脚、控制编号9接脚、编号2接脚及编号5接脚实质上为低电压(例如0V)。请注意,在一些实施例中,步骤S166是选择性的。Step S166 : Control the
图12显示本发明存储卡种类识别方法的另一实施例的流程图。该流程可以由读卡装置11A执行,包含以下步骤。FIG. 12 shows a flow chart of another embodiment of the method for identifying the type of the memory card of the present invention. This process can be executed by the
步骤S15:对SD卡20进行传统SD卡初始化程序。步骤S15的细节显示于图8。Step S15: Carry out a traditional SD card initialization procedure on the
步骤S24:判断SD卡20是否为SD Express卡。如果判断结果为是,则进行步骤S32;否则,进行步骤S25。步骤S24的细节将于下方配合图13进行讨论。Step S24: Determine whether the
步骤S32:继续SD Express卡初始化程序(细节请参阅安全数字卡规范)。Step S32: continue with the SD Express card initialization procedure (please refer to the Secure Digital Card specification for details).
步骤S25:判断SD卡20是否为UHS-II SD卡。如果判断结果为是,则进行步骤S35;否则,进行步骤S26。步骤S25的细节将于下方配合图14进行讨论。Step S25: Determine whether the
步骤S35:控制编号4接脚实质上为0V,并且对SD卡20进行UHS-II SD卡初始化程序(初始化的细节请参阅安全数字卡规范)。Step S35 : the
步骤S26:判断SD卡20是否为传统SD卡。如果判断结果为是,则进行步骤S33;否则,进行步骤S34。步骤S26的细节将于下方配合图15进行讨论。Step S26: Determine whether the
步骤S33:继续传统SD卡初始化程序(细节请参阅安全数字卡规范)。Step S33: continue with the traditional SD card initialization procedure (please refer to the Secure Digital Card specification for details).
步骤S34:同图3的步骤S34。Step S34: Same as step S34 in FIG. 3 .
图13显示图12的步骤S24的一实施例的流程图,包含以下步骤。FIG. 13 shows a flowchart of an embodiment of step S24 in FIG. 12 , including the following steps.
步骤S242:经由编号2接脚发送SD CMD0命令给SD卡20。Step S242: Send the SD CMD0 command to the
步骤S244:经由编号2接脚发送SD CMD8命令给SD卡20。Step S244: Send the SD CMD8 command to the
步骤S246:判断是否收到CMD8 PCIe回应。更明确地说,此步骤是判断CMD8 PCIe回应中的“PCIe response”栏位是否指示SD卡20为SD Express卡。如果判断结果为是,则控制电路120可以确定SD卡20为SD Express卡;否则,SD卡20非为SD Express卡。Step S246: Determine whether a CMD8 PCIe response is received. More specifically, this step is to determine whether the "PCIe response" field in the CMD8 PCIe response indicates that the
关于SD CMD0命令、SD CMD8命令及CMD8 PCIe回应请参阅全数字卡规范第7.10版的第81页。For SD CMD0 command, SD CMD8 command and CMD8 PCIe response, please refer to page 81 of All Digital Card Specification Version 7.10.
图14显示图12的步骤S25的一实施例的流程图,包含以下步骤。FIG. 14 shows a flowchart of an embodiment of step S25 in FIG. 12 , including the following steps.
步骤S252:经由编号2接脚发送SD ACMD41命令给SD卡20。Step S252 : Send the SD ACMD41 command to the
步骤S254:判断SD卡20是否为ACMD41 UHS-II SD卡状态。更明确地说,此步骤是判断SD卡20的回应中的“UHS-II status”栏位是否指示SD卡20为UHS-II SD卡。如果判断结果为是,则控制电路120可以确定SD卡20为UHS-II SD卡;否则,SD卡20非为UHS-II SD卡。Step S254: Determine whether the
关于SD ACMD41命令及ACMD41 UHS-II SD卡状态请参阅全数字卡规范第7.10版的第39页。For SD ACMD41 commands and ACMD41 UHS-II SD card status, please refer to page 39 of All Digital Card Specification Version 7.10.
图15显示图12的步骤S26的一实施例的流程图,包含以下步骤。FIG. 15 shows a flowchart of an embodiment of step S26 in FIG. 12 , including the following steps.
步骤S262:判断是否从SD卡20收到CMD8命令及ACMD41命令。如果判断结果为是,则控制电路120可以确定SD卡20为传统SD卡;否则,SD卡20非为传统SD卡。Step S262: Judging whether the CMD8 command and the ACMD41 command are received from the
图16显示本发明存储卡种类识别方法的另一实施例的流程图。该流程可以由读卡装置11A执行,包含以下步骤。FIG. 16 shows a flow chart of another embodiment of the method for identifying the type of the memory card of the present invention. This process can be executed by the
步骤S11:对SD卡20进行UHS-II SD卡初始化程序。步骤S11细节显示于图4。Step S11: Perform a UHS-II SD card initialization procedure on the
步骤S21:判断SD卡20是否为UHS-II SD卡。如果判断结果为是,则进行步骤S31;否则,进行步骤S12。步骤S21的细节显示于图5。Step S21: Determine whether the
步骤S31:继续UHS-II SD卡初始化程序(细节请参阅安全数字卡规范)。Step S31: continue with the UHS-II SD card initialization procedure (please refer to the Secure Digital Card Specification for details).
步骤S12:控制编号4接脚实质上为0V以及控制编号14接脚实质上为0V。Step S12 : the
步骤S15:对SD卡20进行传统SD卡初始化程序。步骤S15的细节显示于图8。Step S15: Carry out a traditional SD card initialization procedure on the
步骤S24:判断SD卡20是否为SD Express卡。如果判断结果为是,则进行步骤S32;否则,进行步骤S27。步骤S24的细节显示于图13。Step S24: Determine whether the
步骤S32:继续SD Express卡初始化程序(细节请参阅安全数字卡规范)。Step S32: continue with the SD Express card initialization procedure (please refer to the Secure Digital Card specification for details).
步骤S27:判断SD卡20是否为传统SD卡。如果判断结果为是,则进行步骤S33;否则,进行步骤S34。步骤S27的细节将于下方配合图17进行讨论。Step S27: Determine whether the
步骤S33:继续传统SD卡初始化程序(细节请参阅安全数字卡规范)。Step S33: continue with the traditional SD card initialization procedure (please refer to the Secure Digital Card specification for details).
步骤S34:同图3的步骤S34。Step S34: Same as step S34 in FIG. 3 .
图17显示图16的步骤S27的一实施例的流程图,包含以下步骤。FIG. 17 shows a flowchart of an embodiment of step S27 in FIG. 16 , including the following steps.
步骤S272:经由编号2接脚发送SD ACMD41命令给SD卡20。Step S272 : Send the SD ACMD41 command to the
步骤S274:判断是否收到SD卡20回应SD ACMD41命令。如果判断结果为是,则控制电路120可以确定SD卡20为传统SD卡;否则,SD卡20非为传统SD卡。Step S274: Determine whether the
综上所述,本公开还提供四种存储卡种的类识别方法(图3、图10、图12及图16)。图1的装置或电路可以采用该四种方法的任一种来判断SD卡20的种类。To sum up, the present disclosure also provides four kinds of memory card type identification methods ( FIG. 3 , FIG. 10 , FIG. 12 and FIG. 16 ). The device or circuit in FIG. 1 can use any one of the four methods to determine the type of the
前述实施例虽以传统SD卡、SD Express卡及UHS-II SD卡为例,然此并非对本发明的限制,本技术领域人员可依本发明的公开适当地将本发明应用于其它类型的SD存储卡。Although the foregoing embodiments take traditional SD cards, SD Express cards and UHS-II SD cards as examples, this is not a limitation of the present invention, and those skilled in the art can appropriately apply the present invention to other types of SD cards according to the disclosure of the present invention. storage card.
由于本技术领域技术人员可通过本公开的装置发明的公开内容来了解本公开的方法发明的实施细节与变化,因此,为避免赘文,在不影响该方法发明的公开要求及可实施性的前提下,重复的说明在此予以省略。请注意,前述图示中,元件的形状、尺寸及比例仅为示意,是供本技术领域技术人员了解本发明之用,非用以限制本发明。此外,在一些实施例中,前述的流程图中所提及的步骤可依实际操作调整其前后顺序,甚至可同时或部分同时执行。Because those skilled in the art can understand the implementation details and changes of the disclosed method invention through the disclosure content of the disclosed device invention, therefore, in order to avoid redundant text, the disclosure requirements and implementability of the method invention will not be affected. Under the premise, repeated descriptions are omitted here. Please note that the shapes, sizes and proportions of the elements in the foregoing illustrations are only illustrative, and are for those skilled in the art to understand the present invention, and are not intended to limit the present invention. In addition, in some embodiments, the steps mentioned in the aforementioned flow charts may be adjusted in sequence according to actual operations, and may even be executed simultaneously or partly simultaneously.
虽然本发明的实施例如上所述,然而该些实施例并非用来限定本发明,本技术领域技术人员可依据本发明的明示或隐含的内容对本发明的技术特征施以变化,凡此种种变化均可能属于本发明所寻求的专利保护范围,换言之,本发明的专利保护范围须视本说明书的权利要求所界定者为准。Although the embodiments of the present invention are as described above, these embodiments are not intended to limit the present invention, and those skilled in the art can make changes to the technical characteristics of the present invention according to the explicit or implicit contents of the present invention, all of which Changes may all belong to the scope of patent protection sought by the present invention. In other words, the scope of patent protection of the present invention must be defined by the claims in this specification.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202111563369.XA CN116306757A (en) | 2021-12-20 | 2021-12-20 | Memory card type identification method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202111563369.XA CN116306757A (en) | 2021-12-20 | 2021-12-20 | Memory card type identification method |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN116306757A true CN116306757A (en) | 2023-06-23 |
Family
ID=86776624
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202111563369.XA Pending CN116306757A (en) | 2021-12-20 | 2021-12-20 | Memory card type identification method |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN116306757A (en) |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20120092044A1 (en) * | 2010-10-13 | 2012-04-19 | Ability Enterprise Co., Ltd. | Circuit for swapping a memory card in an electronic device |
| JP2018180769A (en) * | 2017-04-07 | 2018-11-15 | パナソニックIpマネジメント株式会社 | Host device and identification method |
| CN109904647A (en) * | 2017-12-08 | 2019-06-18 | 西部数据技术公司 | Memory card pin layout for avoiding conflicting in combination card connector slot |
| US20200034317A1 (en) * | 2017-04-07 | 2020-01-30 | Panasonic Intellectual Property Management Co., Ltd. | Slave device and host device |
| US20200233595A1 (en) * | 2019-01-18 | 2020-07-23 | Silicon Motion Inc. | Initialization methods and associated controller, memory device and host |
| US20200285598A1 (en) * | 2017-03-22 | 2020-09-10 | Realtek Semiconductor Corporation | Memory Card Access Module and Memory Card Access Method |
-
2021
- 2021-12-20 CN CN202111563369.XA patent/CN116306757A/en active Pending
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20120092044A1 (en) * | 2010-10-13 | 2012-04-19 | Ability Enterprise Co., Ltd. | Circuit for swapping a memory card in an electronic device |
| US20200285598A1 (en) * | 2017-03-22 | 2020-09-10 | Realtek Semiconductor Corporation | Memory Card Access Module and Memory Card Access Method |
| JP2018180769A (en) * | 2017-04-07 | 2018-11-15 | パナソニックIpマネジメント株式会社 | Host device and identification method |
| US20200034317A1 (en) * | 2017-04-07 | 2020-01-30 | Panasonic Intellectual Property Management Co., Ltd. | Slave device and host device |
| CN109904647A (en) * | 2017-12-08 | 2019-06-18 | 西部数据技术公司 | Memory card pin layout for avoiding conflicting in combination card connector slot |
| US20200233595A1 (en) * | 2019-01-18 | 2020-07-23 | Silicon Motion Inc. | Initialization methods and associated controller, memory device and host |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US6895447B2 (en) | Method and system for configuring a set of wire lines to communicate with AC or DC coupled protocols | |
| US7519756B2 (en) | Method and apparatus for controlling connections of PC cards and a passive-card-adapting card used for connecting one of the PC cards to the apparatus | |
| US7285023B1 (en) | Expresscard device | |
| US7934946B2 (en) | Media power protection system and method | |
| CN101695088B (en) | Module identification method and terminal | |
| US10162723B2 (en) | Electronic card and detecting method thereof | |
| TWI760615B (en) | Method for performing detect control of write protection command of memory device, associated control chip and associated electronic device | |
| JP2001075746A (en) | Integrated pc card host controller for detecting and operating plural extended cards | |
| US10776288B2 (en) | Apparatus for adapting interface type of peripheral device and method thereof | |
| US10089270B2 (en) | Interchangeable power and signal contacts for IO connectors | |
| CN110554990A (en) | Mainboard circuit compatible with PCIE and SATA circuits | |
| CN107239372A (en) | Electronic device and detection method thereof | |
| TWI789148B (en) | Method of identifying type of memory card | |
| CN116306757A (en) | Memory card type identification method | |
| US10747702B2 (en) | Interposer systems for information handling systems | |
| CN112799986B (en) | Universal serial bus switching circuit and related electronic device | |
| US20160117278A1 (en) | Peripheral protocol negotiation | |
| US20060095626A1 (en) | Multifunction adapter | |
| WO2021115202A1 (en) | Electronic device, and method for identifying subscriber identity module (sim) card and memory card | |
| CN116362275A (en) | Card reading device and electronic device with card reading function | |
| CN108631130B (en) | Concentrator | |
| US12468651B2 (en) | Card reading device and electronic device with card reading function | |
| CN104076891A (en) | Multifunctional pin circuit device | |
| TWI559155B (en) | Input/output port switching method and electronic device and system thereof | |
| CN101661311A (en) | Computer system |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination |