CN107977334B - Electronic card and its detection method - Google Patents

Electronic card and its detection method Download PDF

Info

Publication number
CN107977334B
CN107977334B CN201610920025.2A CN201610920025A CN107977334B CN 107977334 B CN107977334 B CN 107977334B CN 201610920025 A CN201610920025 A CN 201610920025A CN 107977334 B CN107977334 B CN 107977334B
Authority
CN
China
Prior art keywords
communication protocol
host
detection method
output signal
terminals
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.)
Active
Application number
CN201610920025.2A
Other languages
Chinese (zh)
Other versions
CN107977334A (en
Inventor
李俊昌
潘鸿文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Apacer Technology Inc
Original Assignee
Apacer Technology Inc
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 Apacer Technology Inc filed Critical Apacer Technology Inc
Priority to CN201610920025.2A priority Critical patent/CN107977334B/en
Publication of CN107977334A publication Critical patent/CN107977334A/en
Application granted granted Critical
Publication of CN107977334B publication Critical patent/CN107977334B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4204Bus transfer protocol, e.g. handshake; Synchronisation on a parallel bus
    • G06F13/4221Bus transfer protocol, e.g. handshake; Synchronisation on a parallel bus being an input/output bus, e.g. ISA bus, EISA bus, PCI bus, SCSI bus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/0024Peripheral component interconnect [PCI]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/0042Universal serial bus [USB]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Systems (AREA)

Abstract

The present disclosure relates to an electronic card and a detection method thereof, wherein the detection method is used for detecting whether output signals output by a host exist in a plurality of terminals numbered 41, 43, 47, 49, a plurality of terminals numbered 29, 31, 35, 37, a plurality of terminals numbered 17, 19, 23, 25 or a plurality of terminals numbered 5, 7, 11, 13 of a plurality of terminals of a connector of the electronic card, and determining whether a communication protocol of the host is a SATA communication protocol, a PCIe communication protocol or a USB3.0 communication protocol by using a detection result and the output signals. The electronic card and the detection method thereof can improve the use convenience of the electronic card.

Description

电子卡及其检测方法Electronic card and its detection method

技术领域technical field

本公开涉及一种电子卡及其检测方法,特别涉及一种可检测主机的通信协议,且可依据主机的通信协议而自动执行对应的固件单元,以执行对应的通信协议的电子卡及其检测方法。The present disclosure relates to an electronic card and its detection method, in particular to an electronic card capable of detecting the communication protocol of the host, and automatically executing the corresponding firmware unit according to the communication protocol of the host to execute the corresponding communication protocol and the electronic card and its detection method.

背景技术Background technique

目前应用于电子卡的连接器的标准规范主要分为Mini PCI-Express标准规范、mSATA标准规范以及M.2标准规范等。其中,作为Mini PCI-Express标准规范的连接器是用以支持PCIe通信协议,作为mSATA标准规范的连接器是用以支持SATA通信协议,作为M.2标准规范(前身为Next Generation Form Factor(NGFF))的连接器可支持SATA、PCIe及USB3.0通信协议。由于符合M.2标准规范的连接器具备体积小、省电且传输速度快的多重特性,且可同时支持上述三种通信协议,故使用M.2标准规范的连接器的电子卡将成为主流。Currently, the standard specifications for connectors used in electronic cards are mainly divided into Mini PCI-Express standard specifications, mSATA standard specifications, and M.2 standard specifications. Among them, the connector as the Mini PCI-Express standard specification is used to support the PCIe communication protocol, the connector as the mSATA standard specification is used to support the SATA communication protocol, and as the M.2 standard specification (formerly known as Next Generation Form Factor (NGFF) )) connectors can support SATA, PCIe and USB3.0 communication protocols. Since connectors conforming to the M.2 standard specification have the multiple characteristics of small size, power saving and fast transmission speed, and can support the above three communication protocols at the same time, electronic cards using the M.2 standard specification connector will become the mainstream. .

虽然M.2标准规范下的连接器可同时支持SATA、PCIe及USB 3.0通信协议,然而现今电子卡及供电子卡组接的主机,例如主板等,仅承载单一的通信协议,例如主机只承载SATA通信协议、PCIe通信协议或USB 3.0通信协议,而电子卡亦只承载SATA通信协议、PCIe通信协议或USB 3.0通信协议,又使用者并不易得知主机所承载的通信协议为何,因此当主机与电子卡通过OOB(Out-of-Band)信号进行握手(handshake)而欲进行封包的交换时,若主机与电子卡所承载的通信协议相异,封包将无法正确交换,造成主机与电子卡之间的通信无法正常进行,因此使用者必须不断尝试更换承载不同通信协议的电子卡,以祈更换到符合主机的通信协议的正确的电子卡,如此一来,使用M.2标准规范下的连接器的电子卡的便利性并不佳。更甚者,由于通过OOB信号进行交握时,目前使用M.2标准规范下的连接器的电子卡只能在所承载的通信协议与主机所承载的通信协议为相同,进而与主机正确交换封包时,才启动内部的通信协议,电子卡并无法在组接于主机时,自动检测主机所承载的通信协议为何,进而选用对应的通信协议,因此亦增加目前使用M.2标准规范下的连接器的电子卡的不便性。Although the connector under the M.2 standard specification can support SATA, PCIe and USB 3.0 communication protocols at the same time, the current electronic card and the host for electronic card assembly, such as the motherboard, only carry a single communication protocol. For example, the host only carries SATA communication protocol, PCIe communication protocol or USB 3.0 communication protocol, and the electronic card only carries the SATA communication protocol, PCIe communication protocol or USB 3.0 communication protocol, and it is not easy for the user to know the communication protocol carried by the host, so when the host When exchanging packets with the electronic card through OOB (Out-of-Band) signal handshake (handshake), if the communication protocols carried by the host and the electronic card are different, the packets will not be exchanged correctly, resulting in host and electronic card The communication between them cannot be carried out normally, so the user must constantly try to replace the electronic card carrying different communication protocols, in order to replace the correct electronic card that conforms to the communication protocol of the host. In this way, using the M.2 standard specification The convenience of the electronic card of the connector is not good. What's more, due to the OOB signal handshake, the current electronic card using the connector under the M.2 standard specification can only communicate with the host correctly when the communication protocol carried by it is the same as that carried by the host. The internal communication protocol is only activated when the packet is packaged. When the electronic card is connected to the host, it cannot automatically detect the communication protocol carried by the host, and then select the corresponding communication protocol. Therefore, it also increases the current M.2 standard specification. The inconvenience of the electronic card of the connector.

因此,如何发展一种克服上述缺点的电子卡及其检测方法,实为目前的迫切需求。Therefore, how to develop a kind of electronic card and its detection method that overcomes above-mentioned shortcoming is the present urgent demand in fact.

发明内容Contents of the invention

本公开的目的在于提供一种电子卡及其检测方法,俾解决现有电子卡因仅承载单一的通信协议,以及现有电子卡并无法在组接于主机时,自动检测主机所承载的通信协议为何,进而选用对应的通信协议,导致便利性不佳等问题。The purpose of this disclosure is to provide an electronic card and its detection method to solve the problem that the existing electronic card only carries a single communication protocol, and the existing electronic card cannot automatically detect the communication carried by the host when it is combined with the host What is the protocol, and then the corresponding communication protocol is selected, which leads to problems such as poor convenience.

为达前述目的,本公开的一较佳实施方式为提供一种检测方法,适用于电子卡,电子卡包含连接器,连接器符合M.2标准规范,且连接器包含多个端子,电子卡经由多个端子中对应的至少一端子接收主机所传来的输出信号,检测方法包含步骤:步骤a检测编号为第17、19、23及25的多个端子或编号为第5、7、11及13的多个端子是否存在输出信号,步骤b若检测的结果为编号第17、19、23及25的多个端子或编号第5、7、11及13的多个端子存在输出信号时,判定主机的通信协议为PCIe通信协议,并终止检测方法,若检测的结果为编号为第17、19、23及25的多个端子以及编号为第5、7、11及13的多个端子皆不存在输出信号时,执行步骤c,步骤c检测多个端子中编号为第41、43、47及49的多个端子是否存在输出信号,步骤d若检测的结果为编号为第41、43、47及49的多个端子存在输出信号时,利用输出信号来判定出主机的通信协议为PCIe通信协议或SATA通信协议,并终止检测方法,若检测的结果为编号为第41、43、47及49的多个端子不存在输出信号时,执行步骤e,步骤e检测多个端子中编号为第29、31、35及37的多个端子是否存在输出信号,以及步骤f若检测的结果为编号为第29、31、35及37的多个端子存在输出信号,利用输出信号判定出主机的通信协议为PCIe通信协议或USB 3.0通信协议,并终止检测方法,若检测的结果为编号为第29、31、35及37的多个端子不存在输出信号时,终止检测方法。In order to achieve the aforementioned purpose, a preferred embodiment of the present disclosure is to provide a detection method suitable for electronic cards, the electronic card includes a connector, the connector complies with the M.2 standard specification, and the connector includes a plurality of terminals, the electronic card The output signal from the host is received through at least one corresponding terminal among the plurality of terminals, and the detection method includes the steps: Step a detects a plurality of terminals numbered 17, 19, 23 and 25 or numbered 5, 7, 11 and whether there are output signals at multiple terminals of 13, if the detection result of step b is that multiple terminals with numbers 17, 19, 23 and 25 or multiple terminals with numbers 5, 7, 11 and 13 have output signals, Determine that the communication protocol of the host computer is the PCIe communication protocol, and terminate the detection method. When there is no output signal, execute step c. Step c detects whether there are output signals at multiple terminals numbered 41, 43, 47 and 49 among the multiple terminals. If the detection result of step d is that the numbers are 41, 43, When multiple terminals 47 and 49 have output signals, use the output signals to determine that the communication protocol of the host computer is the PCIe communication protocol or the SATA communication protocol, and terminate the detection method. When multiple terminals of 49 do not have output signals, execute step e, step e detects whether multiple terminals numbered 29th, 31st, 35th and 37th among the multiple terminals have output signals, and if the detection result of step f is the number There are output signals for the 29th, 31st, 35th and 37th terminals, use the output signal to determine that the communication protocol of the host is the PCIe communication protocol or the USB 3.0 communication protocol, and terminate the detection method, if the detection result is the number 29 , 31, 35 and 37, when there is no output signal from multiple terminals, the detection method is terminated.

为达前述目的,本公开另一较佳实施方式为提供一种检测方法,适用于电子卡,电子卡包含连接器,连接器符合M.2标准规范,且连接器包含多个端子,电子卡经由多个端子中对应的至少一端子接收主机所传来的输出信号,检测方法包含步骤:步骤a设定包含第一动作、第二动作以及第三动作的动作集合,其中第一动作为检测多个端子中编号为第5、7、11及13或第17、19、23及25的多个端子是否存在输出信号,并于检测结果为是时判定主机的通信协议为PCIe通信协议,第二动作为检测编号为第41、43、47及49的多个端子是否存在输出信号,并于检测结果为是时继续根据输出信号来对应判定主机的通信协议为PCIe通信协议或SATA通信协议,第三动作为检测编号第29、31、35及37的多个端子是否存在输出信号,并于检测结果为是时继续根据输出信号来对应判定主机的通信协议为PCIe通信协议或USB3.0通信协议,步骤b执行第一动作、第二动作以及第三动作中的任一动作,并于判断出主机的通信协议时终止检测方法,否则进入下一步骤,步骤c执行动作集合中除了步骤b中所执行的动作外的任一动作,并于判断出主机的通信协议时终止检测方法,否则进入下一步骤,以及步骤d执行动作集合中除了步骤b及步骤c中所执行的动作外的剩余动作,并终止检测方法。In order to achieve the aforementioned purpose, another preferred embodiment of the present disclosure is to provide a detection method suitable for electronic cards, the electronic card includes a connector, the connector conforms to the M.2 standard specification, and the connector includes multiple terminals, the electronic card The output signal from the host is received through at least one terminal corresponding to the plurality of terminals. The detection method includes steps: Step a sets an action set including a first action, a second action and a third action, wherein the first action is to detect Among the multiple terminals, whether there are multiple terminals numbered 5, 7, 11, and 13 or 17, 19, 23, and 25 have output signals, and when the detection result is yes, it is determined that the communication protocol of the host is the PCIe communication protocol. The second action is to detect whether there are output signals at the multiple terminals numbered 41, 43, 47 and 49, and continue to determine whether the communication protocol of the host is the PCIe communication protocol or the SATA communication protocol according to the output signal when the detection result is yes, The third action is to detect whether there are output signals from multiple terminals numbered 29, 31, 35, and 37, and continue to determine whether the communication protocol of the host is PCIe communication protocol or USB3.0 communication according to the output signal when the detection result is yes Protocol, step b executes any one of the first action, the second action and the third action, and terminates the detection method when the communication protocol of the host is judged, otherwise enters the next step, step c executes the action set except step b Any action other than the action performed in the action set, and terminate the detection method when the communication protocol of the host is judged, otherwise enter the next step, and step d executes actions in the action set except for the actions performed in step b and step c The remaining actions are performed and the detection method is terminated.

为达前述目的,本公开另一较佳实施方式为提供一种电子卡,与主机相互通信,电子卡包含:第一固件单元,用以执行SATA通信协议;第二固件单元,用以执行PCIe通信协议;第三固件单元,用以执行USB 3.0通信协议;连接器,符合M.2标准规范,且为与主机相互通信的媒介,连接器还包含多个端子,电子卡经由多个端子中对应的至少一端子接收主机所传来的输出信号;开关单元,与多个端子电连接;其中,开关单元执行检测方法,检测方法包含步骤:步骤a检测多个端子中编号为第17、19、23及25的多个端子或编号为第5、7、11及13的多个端子是否存在输出信号,步骤b若检测的结果为编号第17、19、23及25的多个端子或编号第5、7、11及13的多个端子存在输出信号时,判定主机的通信协议为PCIe通信协议,并终止检测方法,若检测的结果为编号为第17、19、23及25的多个端子以及编号为第5、7、11及13的多个端子皆不存在输出信号时,执行步骤c,步骤c检测多个端子中编号为第41、43、47及49的多个端子是否存在输出信号,步骤d若检测的结果为编号为第41、43、47及49的多个端子存在输出信号时,利用输出信号来判定出主机的通信协议为PCIe通信协议或SATA通信协议,并终止检测方法,若检测的结果为编号为第41、43、47及49的多个端子不存在输出信号时,执行步骤e,步骤e检测多个端子中编号为第29、31、35及37的多个端子是否存在输出信号,以及步骤f若检测的结果为编号为第29、31、35及37的多个端子存在输出信号,利用输出信号判定出主机的通信协议为PCIe通信协议或USB 3.0通信协议,并终止检测方法,若检测的结果为编号为第29、31、35及37的多个端子不存在输出信号时,终止检测方法,并根据检测方法之结果来对应执行第一固件单元、第二固件单元或第三固件单元。To achieve the aforementioned purpose, another preferred embodiment of the present disclosure is to provide an electronic card that communicates with the host computer. The electronic card includes: a first firmware unit for executing the SATA communication protocol; a second firmware unit for executing the PCIe Communication protocol; the third firmware unit is used to implement the USB 3.0 communication protocol; the connector conforms to the M.2 standard specification and is a medium for communicating with the host. The connector also includes multiple terminals, and the electronic card passes through multiple terminals. At least one corresponding terminal receives the output signal from the host; the switch unit is electrically connected to multiple terminals; wherein, the switch unit executes a detection method, and the detection method includes the steps: step a detects multiple terminals numbered 17th and 19th , 23 and 25 terminals or multiple terminals numbered 5, 7, 11 and 13 whether there are output signals, if the detection result of step b is multiple terminals or numbers numbered 17, 19, 23 and 25 When there are output signals from multiple terminals of No. 5, 7, 11 and 13, it is determined that the communication protocol of the host computer is the PCIe communication protocol, and the detection method is terminated. When there is no output signal for the terminal and the multiple terminals numbered 5th, 7th, 11th and 13th, execute step c, and step c detects whether multiple terminals numbered 41st, 43rd, 47th and 49th among the multiple terminals exist Output signal, if the result of the detection in step d is that there are output signals at multiple terminals numbered 41, 43, 47 and 49, use the output signal to determine that the communication protocol of the host is the PCIe communication protocol or the SATA communication protocol, and terminate Detection method, if the result of the detection is that there are no output signals at the terminals numbered 41st, 43rd, 47th and 49th, execute step e, and step e detects the terminals numbered 29th, 31st, 35th and 37th among the multiple terminals Whether multiple terminals have output signals, and if the detection result of step f is that multiple terminals numbered 29, 31, 35, and 37 have output signals, use the output signals to determine that the communication protocol of the host is PCIe communication protocol or USB 3.0 communication protocol, and terminate the detection method, if the result of the detection is that there are no output signals from the terminals numbered 29, 31, 35 and 37, the detection method is terminated, and the first firmware unit is executed correspondingly according to the result of the detection method , the second firmware unit or the third firmware unit.

附图说明Description of drawings

图1为本公开的较佳实施例的电子卡与一主机分离时的结构示意图。FIG. 1 is a schematic structural diagram of an electronic card in a preferred embodiment of the present disclosure when it is separated from a host.

图2为图1所示的符合M.2标准规范的连接器在SATA通信协议下的引脚定义图。FIG. 2 is a pin definition diagram of the connector conforming to the M.2 standard specification shown in FIG. 1 under the SATA communication protocol.

图3为图1所示的符合M.2标准规范的连接器在PCIe通信协议下的引脚定义图。FIG. 3 is a pin definition diagram of the connector conforming to the M.2 standard specification shown in FIG. 1 under the PCIe communication protocol.

图4为图1所示的符合M.2标准规范的连接器在USB 3.0通信协议下的引脚定义图。FIG. 4 is a pin definition diagram of the connector conforming to the M.2 standard specification shown in FIG. 1 under the USB 3.0 communication protocol.

图5为应用于图1所示的电子卡的本公开第一较佳实施例的检测方法的步骤流程图。FIG. 5 is a flow chart of the steps of the detection method of the first preferred embodiment of the present disclosure applied to the electronic card shown in FIG. 1 .

图6为应用于图1所示的电子卡的本公开第二较佳实施例的检测方法的步骤流程图。FIG. 6 is a flow chart of the steps of the detection method of the second preferred embodiment of the present disclosure applied to the electronic card shown in FIG. 1 .

附图标记说明:Explanation of reference signs:

1:电子卡1: electronic card

2:主机2: Host

11:连接器11: Connector

12:第一固件单元12: First firmware unit

13:第二固件单元13: Second firmware unit

14:第三固件单元14: The third firmware unit

15:切换控制单元15: Switch control unit

M1-M4:检测方法的流程步骤M1-M4: Process steps of detection method

S1-S6:检测方法的流程步骤S1-S6: Process steps of detection method

具体实施方式Detailed ways

体现本公开特征与优点的一些典型实施例将在后段的说明中详细叙述。应理解的是本公开能够在不同的实施方式上具有各种的变化,其皆不脱离本公开的范围,且其中的说明及附图在本质上是当作对其进行说明用,而非用于限制本公开。Some typical embodiments embodying the features and advantages of the present disclosure will be described in detail in the description in the following paragraphs. It should be understood that the disclosure is capable of various changes in different embodiments without departing from the scope of the disclosure, and that the description and drawings therein are illustrative in nature and not intended to Limit this disclosure.

图1为本公开的较佳实施例的电子卡与一主机分离时的结构示意图。如图1所示,本公开的电子卡1可为但不限于为一固态硬盘(SSD)或一非挥发性内存模块,是可分离地与主机2,例如主板上的插槽,相组接,且电子卡1与主机2组接时,主机2可输出一输出信号至电子卡1,以与电子卡1进行沟通而进行数据的传输,电子卡1是包含连接器11、第一固件单元12、第二固件单元13、第三固件单元14以及开关单元15。其中连接器11符合M.2标准规范,且连接器11可插接于主机2上,其中连接器11为与主机2相互通信的媒介,并包含多个端子,当电子卡1与主机2组接时,连接器11的多个端子是与主机2的对应的端子(未图示)电连接,且电子卡1经由多个端子中的至少一端子接收主机2所传来的输出信号。FIG. 1 is a schematic structural diagram of an electronic card in a preferred embodiment of the present disclosure when it is separated from a host. As shown in FIG. 1 , the electronic card 1 of the present disclosure may be, but not limited to, a solid state drive (SSD) or a non-volatile memory module, which is detachably connected to a host 2, such as a slot on a motherboard. , and when the electronic card 1 is combined with the host 2, the host 2 can output an output signal to the electronic card 1 to communicate with the electronic card 1 for data transmission. The electronic card 1 includes a connector 11, a first firmware unit 12 . The second firmware unit 13 , the third firmware unit 14 and the switch unit 15 . The connector 11 conforms to the M.2 standard specification, and the connector 11 can be plugged into the host 2, wherein the connector 11 is a medium for communicating with the host 2 and includes multiple terminals. When the electronic card 1 and the host 2 are combined When connected, multiple terminals of the connector 11 are electrically connected to corresponding terminals (not shown) of the host 2 , and the electronic card 1 receives an output signal from the host 2 through at least one of the multiple terminals.

第一固件单元12用以执行SATA通信协议,使电子卡1及主机2能通过连接器11以SATA通信协议的方式进行数据传输。第二固件单元13及第三固件单元分别用以执行PCIe通信协议及USB3.0通信协议,且其分别可使电子卡1及主机2通过连接器11以SATA通信协议或USB3.0通信协议的方式进行数据传输。The first firmware unit 12 is used to implement the SATA communication protocol, so that the electronic card 1 and the host 2 can perform data transmission through the connector 11 in the form of the SATA communication protocol. The second firmware unit 13 and the third firmware unit are used to implement the PCIe communication protocol and the USB3.0 communication protocol respectively, and they can respectively enable the electronic card 1 and the host computer 2 to use the SATA communication protocol or the USB3.0 communication protocol through the connector 11. way of data transmission.

开关单元15与连接器11的多个端子电连接,其中此开关单元15可以为一微控制器。开关单元15可根据主机2的通信协议为SATA通信协议、PCIe通信协议或USB 3.0通信协议而对应执行第一固件单元12、第二固件单元13或是第三固件单元14,进而执行SATA通信协议、PCIe通信协议或USB 3.0通信协议,以使主机2与电子卡1在相同的通信协议下进行数据传输。The switch unit 15 is electrically connected to a plurality of terminals of the connector 11 , wherein the switch unit 15 may be a microcontroller. The switch unit 15 can execute the first firmware unit 12, the second firmware unit 13 or the third firmware unit 14 correspondingly according to the communication protocol of the host 2 being the SATA communication protocol, the PCIe communication protocol or the USB 3.0 communication protocol, and then execute the SATA communication protocol , PCIe communication protocol or USB 3.0 communication protocol, so that the host 2 and the electronic card 1 perform data transmission under the same communication protocol.

由上可知,本公开的电子卡1可根据主机2的通信协议而对应执行第一固件单元12、第二固件单元13或第三固件单元14,进而分别执行SATA通信协议、PCIe通信协议及USB3.0通信协议。藉此电子卡1便可在与主机2相同的通信协议下进行数据传输,因此相较于现有技术的电子卡因仅支持单一的通信协议所导致的不便性,本公开的电子卡1因可依据主机2的通信协议而自动执行对应的固件单元,以执行对应的通信协议,故可大幅提升便利性。It can be seen from the above that the electronic card 1 of the present disclosure can execute the first firmware unit 12, the second firmware unit 13 or the third firmware unit 14 according to the communication protocol of the host 2, and then execute the SATA communication protocol, PCIe communication protocol and USB3 respectively. .0 communication protocol. In this way, the electronic card 1 can perform data transmission under the same communication protocol as the host 2. Therefore, compared with the inconvenience caused by the electronic card in the prior art only supporting a single communication protocol, the electronic card 1 of the present disclosure is The corresponding firmware unit can be automatically executed according to the communication protocol of the host 2 to execute the corresponding communication protocol, so the convenience can be greatly improved.

需要进一步说明的是,电子卡1的连接器11可依据所需的不同的通信协议而有不同规格(主要依键位来区分,例如B型、M型、B+M型等),而在不同规格下,连接器11的多个端子的定义则会不同。举例而言,图2为图1所示的符合M.2标准规范的连接器在SATA通信协议下的引脚定义图。如图2所示,当电子卡1需以SATA通信协议而与主机2进行通信时,则定义多个端子中编号为第41、43、47及49的端子是用来接收主机2所输出的输出信号,使电子卡1经由编号为41、43、47及49的多个端子来与主机2相互沟通而建立联机。It should be further explained that the connector 11 of the electronic card 1 can have different specifications according to different required communication protocols (mainly distinguished by key position, such as B type, M type, B+M type, etc.), and in Under different specifications, the definitions of multiple terminals of the connector 11 will be different. For example, FIG. 2 is a pin definition diagram of the connector conforming to the M.2 standard specification shown in FIG. 1 under the SATA communication protocol. As shown in Figure 2, when the electronic card 1 needs to communicate with the host 2 using the SATA communication protocol, it is defined that terminals numbered 41, 43, 47 and 49 among the multiple terminals are used to receive the output from the host 2 The output signal enables the electronic card 1 to communicate with the host 2 through terminals numbered 41 , 43 , 47 and 49 to establish a connection.

图3为图1所示的符合M.2标准规范的连接器在PCIe通信协议下的引脚定义图。如图3所示,当电子卡1以PCIe通信协议而与主机2进行通信时,则定义编号为第41、43、47及49的多个端子来接收主机2所输出的输出信号、定义编号为第29、31、35及37的多个端子来接收主机2所输出的输出信号、定义编号为第17、19、23及25的多个端子来接收主机2所输出的输出信号或定义编号为第5、7、11及13的多个端子来接收主机2所输出的输出信号,使电子卡1经由编号为第41、43、47及49、编号为第29、31、35及37、编号为第17、19、23及25或编号为第5、7、11及13的多个端子来与主机2相互沟通而建立联机。FIG. 3 is a pin definition diagram of the connector conforming to the M.2 standard specification shown in FIG. 1 under the PCIe communication protocol. As shown in Figure 3, when the electronic card 1 communicates with the host computer 2 using the PCIe communication protocol, a plurality of terminals whose numbers are defined as 41st, 43rd, 47th and 49th are used to receive the output signal output by the host computer 2, and the definition number Multiple terminals of the 29th, 31st, 35th and 37th are used to receive the output signals output by the host computer 2, and the multiple terminals defined as the 17th, 19th, 23rd and 25th terminals are used to receive the output signals or definition numbers outputted by the host computer 2 A plurality of terminals of the 5th, 7th, 11th and 13th receive the output signal output by the host computer 2, so that the electronic card 1 passes through the numbered 41st, 43rd, 47th and 49th, numbered 29th, 31st, 35th and 37th, Multiple terminals numbered 17th, 19th, 23rd and 25th or numbered 5th, 7th, 11th and 13th are used to communicate with the host 2 to establish a connection.

图4为图1所示的符合M.2标准规范的连接器在USB 3.0通信协议下的引脚定义图。如图4所示,当电子卡1以USB 3.0通信协议而与主机2进行通信时,则定义编号为第29、31、35及37的多个端子来接收主机2所输出的输出信号,使电子卡1经由编号为第29、31、35及37的多个端子而与主机2相互沟通而建立联机。FIG. 4 is a pin definition diagram of the connector conforming to the M.2 standard specification shown in FIG. 1 under the USB 3.0 communication protocol. As shown in Figure 4, when the electronic card 1 communicates with the host 2 using the USB 3.0 communication protocol, multiple terminals numbered 29, 31, 35 and 37 are defined to receive the output signal output by the host 2, so that The electronic card 1 communicates with the host 2 through terminals numbered 29, 31, 35 and 37 to establish a connection.

于本实施例中,上述编号为第41、43、47及49的多个端子为SATA通信协议中定义的差分信号组(differential signal pairs),编号为第41、43、47、49的多个端子、编号为第29、31、35、37的多个端子、编号为第17、19、23及25的多个端子或编号为第5、7、11及13的多个端子为PCIe通信协议中定义的差分信号组,编号为第29、31、35及37的多个端子为USB3.0通信协议中定义的差分信号组,上述差分信号组用以接收主机2所输出的输出信号(即差分信号)。In this embodiment, the terminals numbered 41st, 43rd, 47th, and 49th are differential signal pairs defined in the SATA communication protocol, and the terminals numbered 41st, 43rd, 47th, and 49th Terminals, multiple terminals numbered 29, 31, 35, and 37, multiple terminals numbered 17, 19, 23, and 25, or multiple terminals numbered 5, 7, 11, and 13 are PCIe communication protocols The differential signal group defined in , the multiple terminals numbered 29th, 31st, 35th and 37th are the differential signal group defined in the USB3.0 communication protocol, and the above differential signal group is used to receive the output signal output by the host 2 (ie differential signal).

另外,由上可知,本公开的电子卡1的开关单元15可根据主机2的通信协议为SATA通信协议、PCIe通信协议或USB 3.0通信协议而对应执行第一固件单元12、第二固件单元13或是第三固件单元14,进而执行SATA通信协议、PCIe通信协议或USB 3.0通信协议,因此为了判别主机2的通信协议为SATA通信协议、PCIe通信协议或USB 3.0通信协议,本公开的电子卡1的开关单元15实际上还执行一种检测方法,以下将进行说明。In addition, it can be seen from the above that the switch unit 15 of the electronic card 1 of the present disclosure can execute the first firmware unit 12 and the second firmware unit 13 correspondingly according to the communication protocol of the host 2, which is the SATA communication protocol, the PCIe communication protocol or the USB 3.0 communication protocol. Or the third firmware unit 14, and then execute the SATA communication protocol, PCIe communication protocol or USB 3.0 communication protocol, so in order to distinguish the communication protocol of the host 2 as the SATA communication protocol, PCIe communication protocol or USB 3.0 communication protocol, the electronic card of the present disclosure The switch unit 15 of 1 actually also implements a detection method, which will be described below.

请参阅图5,并配合图1,其中图5为应用于图1所示的电子卡的本公开第一较佳实施例的检测方法的步骤流程图。如图5所示,首先,执行步骤M1,设定包含第一动作、第二动作以及第三动作的动作集合,其中第一动作为检测连接器11的多个端子中编号为第5、7、11及13的多个端子或编号为第17、19、23及25的多个端子是否存在输出信号,并于检测结果为是时判定主机2的通信协议为PCIe通信协议,第二动作为检测编号为第41、43、47及49的多个端子是否存在输出信号,并于检测结果为是时继续利用输出信号来判定主机2的通信协议为PCIe通信协议或SATA通信协议,第三动作为检测编号第29、31、35及37的多个端子是否存在输出信号,并于检测结果为是时继续检测输出信号,以根据输出信号来对应判定主机2的通信协议为PCIe通信协议或USB 3.0通信协议。Please refer to FIG. 5 , together with FIG. 1 , wherein FIG. 5 is a flow chart of the steps of the detection method of the first preferred embodiment of the present disclosure applied to the electronic card shown in FIG. 1 . As shown in FIG. 5 , first, step M1 is executed to set an action set including the first action, the second action and the third action, wherein the first action is to detect the terminals numbered 5 and 7 among the multiple terminals of the connector 11 , a plurality of terminals 11 and 13 or a plurality of terminals numbered 17, 19, 23 and 25 have output signals, and when the detection result is yes, it is determined that the communication protocol of the host computer 2 is the PCIe communication protocol, and the second action is Detect whether there are output signals at multiple terminals numbered 41, 43, 47, and 49, and continue to use the output signals to determine whether the communication protocol of the host computer 2 is the PCIe communication protocol or the SATA communication protocol when the detection result is yes, and the third action To detect whether there are output signals at multiple terminals numbered 29, 31, 35, and 37, and continue to detect the output signals when the detection result is yes, so as to determine whether the communication protocol of the host 2 is the PCIe communication protocol or USB according to the output signals 3.0 communication protocol.

接着,执行步骤M2,执行第一动作、第二动作以及第三动作中的任一动作,并于判断出主机2的通信协议时终止检测方法,否则进入下一步骤。Next, execute step M2, execute any one of the first action, the second action and the third action, and terminate the detection method when the communication protocol of the host 2 is determined, otherwise enter the next step.

再来,执行步骤M3,执行该动作集合中除了步骤M2中所执行的动作外的任一动作,并于判断出主机2的通信协议时终止检测方法,否则进入下一步骤。Next, execute step M3, execute any action in the action set except the action executed in step M2, and terminate the detection method when the communication protocol of the host 2 is determined, otherwise enter the next step.

最后,执行步骤M4,执行该动作集合中除了步骤M2及步骤M3中所执行的动作外的剩余动作。Finally, step M4 is executed to execute the remaining actions in the action set except the actions executed in step M2 and step M3.

当开关单元15结束上述检测方法后,开关单元15便可判断出主机2的通信协议为SATA通信协议、PCIe通信协议或USB 3.0通信协议,进而于判定主机2的通信协议为SATA通信协议时,执行第一固件单元12而执行SATA通信协议,而于判定主机2的通信协议为PCIe通信协议时,则执行第二固件单元13而执行PCIe通信协议,并于判定主机2的通信协议为USB3.0通信协议时,执行第三固件单元14而执行USB 3.0通信协议。After the switch unit 15 ends the above detection method, the switch unit 15 can determine that the communication protocol of the host 2 is the SATA communication protocol, the PCIe communication protocol or the USB 3.0 communication protocol, and then when it is determined that the communication protocol of the host 2 is the SATA communication protocol, Execute the first firmware unit 12 and execute the SATA communication protocol, and when it is determined that the communication protocol of the host computer 2 is the PCIe communication protocol, then execute the second firmware unit 13 and execute the PCIe communication protocol, and determine that the communication protocol of the host computer 2 is USB3. When the communication protocol is 0, the third firmware unit 14 is executed to execute the USB 3.0 communication protocol.

于一些实施例中,于动作集合之第二动作中,当检测到为第41、43、47及49的多个端子存在输出信号时,则会继续利用输出信号并依循一默认判断条件来判定主机2的通信协议为PCIe通信协议或SATA通信协议,该预设判断条件可为但不限于设定为以输出信号的压差范围来进行判断,例如,若输出信号的压差范围为A~B,则判定主机2的通信协议为PCIe通信协议,若检测到输出信号的压差范围为C~D,则判定主机2的通信协议为SATA通信协议。更甚者,当利用输出信号并依循默认判断条件而判定主机2的通信协议为PCIe通信协议或SATA通信协议后,则终止检测方法。In some embodiments, in the second action of the action set, when it is detected that there are output signals for terminals 41, 43, 47, and 49, the output signals will continue to be used and a default judgment condition will be used to determine The communication protocol of the host 2 is the PCIe communication protocol or the SATA communication protocol. The preset judgment condition can be, but not limited to, set to be judged by the differential pressure range of the output signal. For example, if the differential pressure range of the output signal is A~ B, then it is determined that the communication protocol of the host 2 is the PCIe communication protocol, and if it is detected that the pressure difference range of the output signal is C~D, then it is determined that the communication protocol of the host 2 is the SATA communication protocol. What's more, when the communication protocol of the host 2 is determined to be the PCIe communication protocol or the SATA communication protocol according to the default judgment condition by using the output signal, the detection method is terminated.

于一些实施例中,电子卡1的开关单元15可直接根据物理层(Physical layer)对信号的定义,例如信号的电压或波长,而判断主机2的输出信号的通信协议为SATA通信协议或PCIe通信协议,因此于第二动作中,当检测到为第41、43、47及49的多个端子存在输出信号时,开关单元15继续根据物理层对信号的定义,进而得知输出信号的通信协议为SATA通信协议或PCIe通信协议,如此一来,即可判定主机2的通信协议为PCIe通信协议或SATA通信协议。更甚者,当开关单元15继续根据物理层对信号的定义,进而得知主机2的通信协议为PCIe通信协议或SATA通信协议后,则终止检测方法。此外,于SATA通信协议、USB 3.0通信协议以及PCIe通信协议中,已明确定义物理层对信号的定义方式,于此不再赘述。In some embodiments, the switch unit 15 of the electronic card 1 can directly judge the communication protocol of the output signal of the host 2 as the SATA communication protocol or PCIe according to the definition of the signal by the physical layer (Physical layer), such as the voltage or wavelength of the signal. Communication protocol, so in the second action, when it is detected that there are output signals for the 41st, 43rd, 47th and 49th terminals, the switch unit 15 continues to define the signal according to the physical layer, and then knows the communication of the output signal The protocol is the SATA communication protocol or the PCIe communication protocol. In this way, it can be determined that the communication protocol of the host 2 is the PCIe communication protocol or the SATA communication protocol. What's more, when the switch unit 15 continues to define the signal according to the physical layer, and then learns that the communication protocol of the host 2 is the PCIe communication protocol or the SATA communication protocol, the detection method is terminated. In addition, in the SATA communication protocol, the USB 3.0 communication protocol, and the PCIe communication protocol, the way the physical layer defines signals has been clearly defined, and will not be repeated here.

于一些实施例中,于动作集合的第三动作中,当检测到为第29、31、35及37的多个端子存在输出信号时,则会继续利用输出信号并依循另一预设判断条件来判定主机2的通信协议为PCIe通信协议或USB 3.0通信协议,该另一预设判断条件可为但不限于设定为以输出信号的压差范围来进行判断,例如,若输出信号的压差范围为A~B,则判定主机2的通信协议为PCIe通信协议,若检测到输出信号的压差范围为E~F,则判定主机2的通信协议为USB 3.0通信协议。更甚者,当利用输出信号并依循默认判断条件而判定主机2的通信协议为PCIe通信协议或USB 3.0通信协议后,则终止检测方法。In some embodiments, in the third action of the action set, when it is detected that there are output signals for the 29th, 31st, 35th and 37th terminals, the output signal will continue to be used and another preset judgment condition will be followed To determine whether the communication protocol of the host computer 2 is the PCIe communication protocol or the USB 3.0 communication protocol, the other preset judgment condition can be, but not limited to, set to be judged by the pressure difference range of the output signal, for example, if the voltage of the output signal If the difference range is A-B, it is determined that the communication protocol of the host 2 is the PCIe communication protocol, and if the detected output signal pressure difference range is E-F, it is determined that the communication protocol of the host 2 is the USB 3.0 communication protocol. What's more, when the communication protocol of the host 2 is determined to be the PCIe communication protocol or the USB 3.0 communication protocol according to the default judgment condition by using the output signal, the detection method is terminated.

于一些实施例中,电子卡1的开关单元15可直接根据物理层(Physical layer)对信号的定义,例如信号的电压或波长,而判断主机2的输出信号的通信协议为PCIe通信协议或USB 3.0通信协议,因此于第三动作中,当检测到为第29、31、35及37的多个端子存在输出信号时,开关单元15继续根据物理层对信号的定义,进而得知输出信号的通信协议为PCIe通信协议或USB 3.0通信协议,如此一来,即可判定主机2的通信协议为PCIe通信协议或USB3.0通信协议。更甚者,当开关单元15继续根据物理层对信号的定义,进而得知主机2的通信协议为PCIe通信协议或USB 3.0通信协议后,则终止检测方法。此外,于SATA通信协议、USB3.0通信协议以及PCIe通信协议中,已明确定义物理层对信号的定义方式,于此不再赘述。In some embodiments, the switch unit 15 of the electronic card 1 can directly determine whether the communication protocol of the output signal of the host 2 is the PCIe communication protocol or USB according to the definition of the signal by the physical layer (Physical layer), such as the voltage or wavelength of the signal. 3.0 communication protocol, so in the third action, when it is detected that there are output signals for the 29th, 31st, 35th and 37th terminals, the switch unit 15 continues to define the signal according to the physical layer, and then knows the output signal The communication protocol is the PCIe communication protocol or the USB 3.0 communication protocol. In this way, it can be determined that the communication protocol of the host 2 is the PCIe communication protocol or the USB 3.0 communication protocol. What's more, when the switch unit 15 continues to define the signal according to the physical layer, and then learns that the communication protocol of the host 2 is the PCIe communication protocol or the USB 3.0 communication protocol, the detection method is terminated. In addition, in the SATA communication protocol, the USB3.0 communication protocol, and the PCIe communication protocol, the way of defining signals at the physical layer has been clearly defined, and will not be repeated here.

当然,本公开的另一较佳实施例可于图5所示的步骤M2中执行第一动作,接着,于步骤M3中,执行第二动作,最后,于步骤M4中,执行第三动作。换言之,相较于图5并未对第一动作、第二动作及第三动作的执行顺序进行排序,本公开的另一较佳实施例的检测方法实际上则针对第一动作、第二动作及第三动作的执行顺序预先设定,而依据上述的顺序则本公开的另一较佳实施例的检测方法的流程图将如图6所示,以下将进行说明。Of course, another preferred embodiment of the present disclosure can execute the first action in step M2 shown in FIG. 5 , then execute the second action in step M3 , and finally execute the third action in step M4 . In other words, compared to FIG. 5 , the execution order of the first action, the second action, and the third action is not sorted. The detection method in another preferred embodiment of the present disclosure actually targets the first action, the second action and the execution order of the third action are preset, and according to the above order, the flow chart of the detection method in another preferred embodiment of the present disclosure will be shown in FIG. 6 , which will be described below.

请参阅图6,并配合图1,其中图6为应用于图1所示的电子卡的本公开第二较佳实施例的检测方法的步骤流程图。如图6所示,首先,执行步骤S1,开关单元15检测连接器11的多个端子中编号为第17、19、23及25的多个端子或编号为第5、7、11及13的多个端子是否存在输出信号。Please refer to FIG. 6 , together with FIG. 1 , wherein FIG. 6 is a flow chart of the steps of the detection method of the second preferred embodiment of the present disclosure applied to the electronic card shown in FIG. 1 . As shown in Figure 6, at first, step S1 is executed, and the switch unit 15 detects a plurality of terminals numbered 17th, 19th, 23rd, and 25th or numbered 5th, 7th, 11th, and 13th among the multiple terminals of the connector 11. Whether there are output signals at multiple terminals.

接着,执行步骤S2,若开关单元15检测的结果为编号第17、19、23及25的多个端子或编号第5、7、11及13的多个端子存在输出信号,开关单元15判定主机2的通信协议为PCIe通信协议,并终止检测方法,若开关单元15检测的结果为编号为第17、19、23及25的多个端子以及编号为第5、7、11及13的多个端子皆不存在输出信号,则执行步骤S3。Next, step S2 is executed. If the detection result of the switch unit 15 is that there are output signals at the terminals numbered 17, 19, 23, and 25 or at the terminals numbered 5, 7, 11, and 13, the switch unit 15 determines that the host The communication protocol of 2 is the PCIe communication protocol, and the detection method is terminated. If the detection result of the switch unit 15 is a plurality of terminals numbered 17, 19, 23 and 25 and a plurality of terminals numbered 5, 7, 11 and 13 If there is no output signal at any of the terminals, step S3 is executed.

于步骤S3中,开关单元15检测多个端子中编号为第41、43、47及49的多个端子是否存在输出信号。In step S3 , the switch unit 15 detects whether there are output signals at terminals numbered 41st, 43rd, 47th and 49th among the terminals.

接着,执行步骤S4,若开关单元15检测的结果为编号为第41、43、47及49的多个端子存在输出信号,则开关单元15利用输出信号来对应判定主机2的通信协议为PCIe通信协议或SATA通信协议,若检测的结果为编号为第41、43、47及49的多个端子不存在输出信号,则执行步骤S5。Next, step S4 is executed, if the detection result of the switch unit 15 is that there are output signals at the terminals numbered 41st, 43rd, 47th and 49th, then the switch unit 15 uses the output signals to correspondingly determine that the communication protocol of the host computer 2 is PCIe communication protocol or SATA communication protocol, if the result of the detection is that there are no output signals from terminals numbered 41st, 43rd, 47th and 49th, then step S5 will be executed.

再来,执行步骤S5,开关单元15检测多个端子中编号为第29、31、35及37的多个端子是否存在输出信号。Next, step S5 is executed, and the switch unit 15 detects whether there are output signals at the terminals numbered 29th, 31st, 35th and 37th among the terminals.

最后,执行步骤S6,若检测的结果为编号为第29、31、35及37的多个端子存在输出信号,则继续利用输出信号来对应判定主机2的通信协议为PCIe通信协议或USB 3.0通信协议,若检测的结果为编号为第29、31、35及37的多个端子不存在输出信号,则终止检测方法。Finally, step S6 is executed, if the result of the detection is that there are output signals at multiple terminals numbered 29, 31, 35, and 37, then continue to use the output signals to determine whether the communication protocol of the host 2 is the PCIe communication protocol or USB 3.0 communication According to the protocol, if the result of the detection is that there are no output signals at the terminals numbered 29, 31, 35 and 37, the detection method is terminated.

综上所述,本公开提供一种电子卡及其检测方法,其中本公开的电子卡包含用以执行SATA通信协议的第一固件单元、用以执行PCIe通信协议的第二固件单元及用以执行USB 3.0通信协议的第三固件单元,且电子卡利用该检测方法而直接检测出主机的通信协议为SATA通信协议、PCIe通信协议或USB 3.0通信协议,进而自动执行对应的固件单元,因此相较于传统电子卡皆只承载单一的通信协议,且无法在组接于主机时,自动检测主机所承载的通信协议为何,本公开的电子卡的便利性可大幅提升。In summary, the present disclosure provides an electronic card and a detection method thereof, wherein the electronic card of the present disclosure includes a first firmware unit for executing the SATA communication protocol, a second firmware unit for executing the PCIe communication protocol, and a second firmware unit for executing the PCIe communication protocol. The third firmware unit that executes the USB 3.0 communication protocol, and the electronic card uses this detection method to directly detect that the communication protocol of the host is the SATA communication protocol, the PCIe communication protocol or the USB 3.0 communication protocol, and then automatically executes the corresponding firmware unit. Compared with traditional electronic cards that only carry a single communication protocol and cannot automatically detect the communication protocol carried by the host when assembled to the host, the convenience of the electronic card of the present disclosure can be greatly improved.

Claims (18)

1.一种检测方法,适用于一电子卡,其特征在于,该电子卡包含一连接器,且该连接器包含多个端子,该电子卡经由多个该端子中对应的至少一该端子接收一主机所传来的一输出信号,该检测方法包含步骤:1. A detection method, suitable for an electronic card, characterized in that the electronic card includes a connector, and the connector includes a plurality of terminals, and the electronic card receives through at least one corresponding terminal in the plurality of terminals An output signal sent by a host, the detection method includes steps: 步骤a:检测编号为第17、19、23及25的多个该端子或编号为第5、7、11及13的多个该端子是否存在该输出信号;Step a: Detect whether the output signal exists in a plurality of terminals numbered 17th, 19th, 23rd and 25th or a plurality of terminals numbered 5th, 7th, 11th and 13th; 步骤b:若检测的结果为编号第17、19、23及25的多个该端子或编号第5、7、11及13的多个该端子存在该输出信号时,判定该主机的通信协议为一PCIe通信协议,并终止该检测方法,若检测的结果为编号为第17、19、23及25的多个该端子以及编号为第5、7、11及13的多个该端子皆不存在该输出信号时,执行步骤c;Step b: If the result of the detection is that there are output signals from multiple terminals numbered 17, 19, 23, and 25 or multiple terminals numbered 5, 7, 11, and 13, it is determined that the communication protocol of the host is A PCIe communication protocol, and terminate the detection method, if the detection result is that multiple terminals numbered 17, 19, 23 and 25 and multiple terminals numbered 5, 7, 11 and 13 do not exist When the signal is output, perform step c; 步骤c:检测多个该端子中编号为第41、43、47及49的多个该端子是否存在该输出信号;Step c: Detect whether the output signal exists in a plurality of terminals numbered 41st, 43rd, 47th and 49th among the plurality of terminals; 步骤d:若检测的结果为编号为第41、43、47及49的多个该端子存在该输出信号时,利用该输出信号来判定出该主机的通信协议为该PCIe通信协议或一SATA通信协议,并终止该检测方法,若检测的结果为编号为第41、43、47及49的多个该端子不存在该输出信号时,执行步骤e;Step d: If the result of the detection is that the output signals are present in a plurality of the terminals numbered 41, 43, 47 and 49, use the output signals to determine that the communication protocol of the host is the PCIe communication protocol or a SATA communication agreement, and terminate the detection method, if the result of the detection is that the output signal does not exist in a plurality of terminals numbered 41st, 43rd, 47th and 49th, execute step e; 步骤e:检测多个该端子中编号为第29、31、35及37的多个该端子是否存在该输出信号;以及Step e: Detecting whether the output signal exists in a plurality of terminals numbered 29th, 31st, 35th and 37th among the plurality of terminals; and 步骤f:若检测的结果为编号为第29、31、35及37的多个该端子存在该输出信号,利用该输出信号判定出该主机的通信协议为该PCIe通信协议或一USB 3.0通信协议,并终止该检测方法,若检测的结果为编号为第29、31、35及37的多个该端子不存在该输出信号时,终止该检测方法。Step f: If the result of the detection is that the output signals are present in multiple terminals numbered 29th, 31st, 35th and 37th, use the output signals to determine that the communication protocol of the host is the PCIe communication protocol or a USB 3.0 communication protocol , and terminate the detection method, if the result of the detection is that there is no output signal at the terminals numbered 29th, 31st, 35th and 37th, the detection method is terminated. 2.如权利要求1所述的检测方法,还包含于步骤d中,若检测的结果为编号为第41、43、47及49的多个该端子存在该输出信号时,还利用该输出信号的一压差范围来判定出该主机的通信协议为该PCIe通信协议。2. The detection method as claimed in claim 1, further comprising in step d, if the result of the detection is that the output signals are present in a plurality of terminals numbered 41, 43, 47 and 49, the output signals are also used It is determined that the communication protocol of the host is the PCIe communication protocol based on a pressure difference range. 3.如权利要求1所述的检测方法,还包含于步骤d中,若检测的结果为编号为第41、43、47及49的多个该端子存在该输出信号时,还利用该输出信号的一压差范围来判定出该主机的通信协议为该SATA通信协议。3. The detection method as claimed in claim 1, further comprising in step d, if the result of the detection is that the output signals are present in a plurality of terminals numbered 41, 43, 47 and 49, the output signals are also used It is determined that the communication protocol of the host computer is the SATA communication protocol based on a pressure difference range. 4.如权利要求1所述的检测方法,还包含于步骤f中,若检测的结果为编号为第29、31、35及37的多个该端子存在该输出信号时,还利用该输出信号的一压差范围来判定出该主机的通信协议为该PCIe通信协议。4. The detection method as claimed in claim 1, further comprising in step f, if the result of the detection is that the output signal is present in a plurality of terminals numbered 29, 31, 35 and 37, the output signal is also used It is determined that the communication protocol of the host is the PCIe communication protocol based on a pressure difference range. 5.如权利要求1所述的检测方法,还包含于步骤f中,若检测的结果为编号为第29、31、35及37的多个该端子存在该输出信号时,还利用该输出信号的一压差范围来判定出该主机的通信协议为该USB 3.0通信协议。5. The detection method as claimed in claim 1, further comprising in step f, if the result of the detection is that the output signal is present at a plurality of terminals numbered 29, 31, 35 and 37, the output signal is also used It is determined that the communication protocol of the host is the USB 3.0 communication protocol based on a pressure difference range. 6.如权利要求1所述的检测方法,还包含于步骤d中,若检测的结果为编号为第41、43、47及49的多个该端子存在该输出信号时,还利用一物理层对信号的定义来判定该输出信号的通信协议为该PCIe通信协议或该SATA通信协议,并于该输出信号的通信协议为该PCIe通信协议时,判定该主机的通信协议为该PCIe通信协议,于该输出信号的通信协议为该SATA通信协议时,判定该主机的通信协议为该SATA通信协议。6. The detection method as claimed in claim 1, further comprising in step d, if the result of the detection is that the output signals are present in a plurality of terminals numbered 41, 43, 47 and 49, a physical layer is also used Determine the communication protocol of the output signal as the PCIe communication protocol or the SATA communication protocol by the definition of the signal, and when the communication protocol of the output signal is the PCIe communication protocol, determine that the communication protocol of the host computer is the PCIe communication protocol, When the communication protocol of the output signal is the SATA communication protocol, it is determined that the communication protocol of the host is the SATA communication protocol. 7.如权利要求1所述的检测方法,还包含于步骤f中,若检测的结果为编号为第29、31、35及37的多个该端子存在该输出信号时,还利用一物理层对信号的定义来判定该输出信号的通信协议为该PCIe通信协议或该USB 3.0通信协议,并于该输出信号的通信协议为该PCIe通信协议时,判定该主机的通信协议为该PCIe通信协议,于该输出信号的通信协议为该USB 3.0通信协议时,判定该主机的通信协议为该USB 3.0通信协议。7. The detection method as claimed in claim 1, further comprising in step f, if the result of the detection is that the output signals are present in a plurality of terminals numbered 29, 31, 35 and 37, a physical layer is also used Define the signal to determine that the communication protocol of the output signal is the PCIe communication protocol or the USB 3.0 communication protocol, and when the communication protocol of the output signal is the PCIe communication protocol, determine that the communication protocol of the host is the PCIe communication protocol When the communication protocol of the output signal is the USB 3.0 communication protocol, it is determined that the communication protocol of the host is the USB 3.0 communication protocol. 8.一种检测方法,适用于一电子卡,其特征在于,该电子卡包含一连接器,且该连接器包含多个端子,该电子卡经由多个该端子中对应的至少一该端子接收一主机所传来的一输出信号,该检测方法包含步骤:8. A detection method applicable to an electronic card, characterized in that the electronic card includes a connector, and the connector includes a plurality of terminals, and the electronic card receives through at least one corresponding terminal of the plurality of terminals An output signal sent by a host, the detection method includes steps: 步骤a设定包含一第一动作、一第二动作以及一第三动作的一动作集合,其中该第一动作为检测多个该端子中编号为第5、7、11及13或第17、19、23及25的多个该端子是否存在该输出信号,并于检测结果为是时判定该主机的通信协议为一PCIe通信协议,该第二动作为检测编号为第41、43、47及49的多个该端子是否存在该输出信号,并于检测结果为是时继续根据该输出信号来对应判定该主机的通信协议为该PCIe通信协议或一SATA通信协议,该第三动作为检测编号第29、31、35及37的多个该端子是否存在该输出信号,并于检测结果为是时继续根据该输出信号来对应判定该主机的通信协议为该PCIe通信协议或一USB 3.0通信协议;Step a sets an action set comprising a first action, a second action and a third action, wherein the first action is to detect a plurality of terminals numbered 5th, 7th, 11th and 13th or 17th, 19, 23 and 25 a plurality of this terminal whether there is this output signal, and judge the communication protocol of this main frame is a PCIe communication protocol when the detection result is yes, and this second action is that detection number is the 41st, 43rd, 47th and Whether the multiple terminals of 49 have the output signal, and when the detection result is yes, continue to correspondingly determine that the communication protocol of the host computer is the PCIe communication protocol or a SATA communication protocol according to the output signal, and the third action is the detection number Whether the plurality of terminals of the 29th, 31st, 35th and 37th have the output signal, and when the detection result is yes, continue to correspondingly determine that the communication protocol of the host computer is the PCIe communication protocol or a USB 3.0 communication protocol according to the output signal ; 步骤b执行该第一动作、该第二动作以及该第三动作中的任一动作,并于判断出该主机的通信协议时终止该检测方法,否则进入下一步骤;Step b: Execute any one of the first action, the second action, and the third action, and terminate the detection method when the communication protocol of the host is determined, otherwise enter the next step; 步骤c执行该动作集合中除了该步骤b中所执行的动作外的任一动作,并于判断出该主机的通信协议时终止该检测方法,否则进入下一步骤;以及Step c executes any action in the action set except the action performed in step b, and terminates the detection method when the communication protocol of the host is determined, otherwise enters the next step; and 步骤d执行该动作集合中除了该步骤b及该步骤c中所执行的动作外的剩余动作,并终止该检测方法。Step d executes the remaining actions in the action set except the actions executed in step b and step c, and terminates the detection method. 9.如权利要求8所述的检测方法,还包含于步骤b中,执行该第一动作。9. The detection method according to claim 8, further comprising performing the first action in step b. 10.如权利要求9所述的检测方法,还包含于步骤c中,执行该第二动作。10. The detection method according to claim 9, further comprising performing the second action in step c. 11.如权利要求8所述的检测方法,其中于该第二动作中,若检测的结果为编号为第41、43、47及49的多个该端子存在该输出信号时,还利用该输出信号的一压差范围来判定出该主机的通信协议为该PCIe通信协议。11. The detection method according to claim 8, wherein in the second action, if the result of the detection is that the output signals are present at a plurality of the terminals numbered 41, 43, 47 and 49, the output signal is also used It is determined that the communication protocol of the host computer is the PCIe communication protocol based on a pressure difference range of the signal. 12.如权利要求8所述的检测方法,其中于该第二动作中,若检测的结果为编号为第41、43、47及49的多个该端子存在该输出信号时,还利用该输出信号的一压差范围来判定出该主机的通信协议为该SATA通信协议。12. The detection method according to claim 8, wherein in the second action, if the result of the detection is that the output signals are present at a plurality of terminals numbered 41st, 43rd, 47th and 49th, the output signal is also used It is determined that the communication protocol of the host computer is the SATA communication protocol based on a pressure difference range of the signal. 13.如权利要求8所述的检测方法,其中于该第三动作中,若检测的结果为编号为第29、31、35及37的多个该端子存在该输出信号时,还利用该输出信号的一压差范围来判定出该主机的通信协议为该PCIe通信协议。13. The detection method according to claim 8, wherein in the third action, if the result of the detection is that the output signals are present at a plurality of the terminals numbered 29, 31, 35 and 37, the output signal is also used It is determined that the communication protocol of the host computer is the PCIe communication protocol based on a pressure difference range of the signal. 14.如权利要求8所述的检测方法,其中于该第三动作中,若检测的结果为编号为第29、31、35及37的多个该端子存在该输出信号时,还利用该输出信号的一压差范围来判定出该主机的通信协议为该USB 3.0通信协议。14. The detection method according to claim 8, wherein in the third action, if the result of the detection is that the output signals are present at a plurality of the terminals numbered 29, 31, 35 and 37, the output signal is also used It is determined that the communication protocol of the host is the USB 3.0 communication protocol based on a pressure difference range of the signal. 15.如权利要求8所述的检测方法,其中于该第二动作中,若检测的结果为编号为第41、43、47及49的多个该端子存在该输出信号时,还利用一物理层对信号的定义来判定该输出信号的通信协议为该PCIe通信协议或该SATA通信协议,并于该输出信号的通信协议为该PCIe通信协议时,判定该主机的通信协议为该PCIe通信协议,于该输出信号的通信协议为该SATA通信协议时,判定该主机的通信协议为该SATA通信协议。15. The detection method according to claim 8, wherein in the second action, if the result of the detection is that the output signals are present at a plurality of terminals numbered 41, 43, 47 and 49, a physical The layer defines the signal to determine that the communication protocol of the output signal is the PCIe communication protocol or the SATA communication protocol, and when the communication protocol of the output signal is the PCIe communication protocol, determine that the communication protocol of the host is the PCIe communication protocol , when the communication protocol of the output signal is the SATA communication protocol, it is determined that the communication protocol of the host is the SATA communication protocol. 16.如权利要求8所述的检测方法,其中于该第三动作中,若检测的结果为编号为第29、31、35及37的多个该端子存在该输出信号时,还利用一物理层对信号的定义来判定该输出信号的通信协议为该PCIe通信协议或该USB 3.0通信协议,并于该输出信号的通信协议为该PCIe通信协议时,判定该主机的通信协议为该PCIe通信协议,于该输出信号的通信协议为该USB 3.0通信协议时,判定该主机的通信协议为该USB 3.0通信协议。16. The detection method according to claim 8, wherein in the third action, if the result of the detection is that the output signals are present at a plurality of terminals numbered 29, 31, 35 and 37, a physical Layer defines the signal to determine that the communication protocol of the output signal is the PCIe communication protocol or the USB 3.0 communication protocol, and when the communication protocol of the output signal is the PCIe communication protocol, determine that the communication protocol of the host is the PCIe communication protocol, when the communication protocol of the output signal is the USB 3.0 communication protocol, it is determined that the communication protocol of the host is the USB 3.0 communication protocol. 17.一种电子卡,与一主机相互通信,其特征在于,该电子卡包含:17. An electronic card that communicates with a host, characterized in that the electronic card includes: 一第一固件单元,用以执行一SATA通信协议;A first firmware unit, used to execute a SATA communication protocol; 一第二固件单元,用以执行一PCIe通信协议;A second firmware unit, used to execute a PCIe communication protocol; 一第三固件单元,用以执行一USB 3.0通信协议;A third firmware unit, used to execute a USB 3.0 communication protocol; 一连接器,为与该主机相互通信的媒介,该连接器还包含多个端子,该电子卡经由多个该端子中对应的至少一该端子接收该主机所传来的一输出信号;A connector, which is a medium for mutual communication with the host, and the connector also includes a plurality of terminals, and the electronic card receives an output signal from the host through at least one corresponding terminal of the plurality of terminals; 一开关单元,与多个该端子电连接;a switch unit electrically connected to a plurality of the terminals; 其中,该开关单元执行权利要求1所述的检测方法,并根据该检测方法的结果来对应执行该第一固件单元、该第二固件单元或该第三固件单元。Wherein, the switch unit executes the detection method according to claim 1, and correspondingly executes the first firmware unit, the second firmware unit or the third firmware unit according to the result of the detection method. 18.如权利要求17所述的电子卡,其中,该开关单元于该检测方法结束后且判定该主机的通信协议为该SATA通信协议时,该开关单元执行该第一固件单元,以使该电子卡与该主机以该SATA通信协议相互通信,而该开关单元于该检测方法结束后且判定该主机的通信协议为该PCIe通信协议时,该开关单元执行该第二固件单元,以使该电子卡与该主机以该PCIe通信协议相互通信,而该开关单元于该检测方法结束后且判定该主机的通信协议为该USB 3.0通信协议时,该开关单元执行该第三固件单元,以使该电子卡与该主机以该USB3.0通信协议相互通信。18. The electronic card as claimed in claim 17, wherein, when the switch unit determines that the communication protocol of the host computer is the SATA communication protocol after the detection method ends, the switch unit executes the first firmware unit, so that the The electronic card and the host communicate with each other through the SATA communication protocol, and when the switch unit determines that the communication protocol of the host is the PCIe communication protocol after the detection method is completed, the switch unit executes the second firmware unit so that the The electronic card and the host communicate with each other using the PCIe communication protocol, and the switch unit executes the third firmware unit when the switch unit determines that the communication protocol of the host is the USB 3.0 communication protocol after the detection method is completed, so that The electronic card and the host communicate with each other through the USB3.0 communication protocol.
CN201610920025.2A 2016-10-21 2016-10-21 Electronic card and its detection method Active CN107977334B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610920025.2A CN107977334B (en) 2016-10-21 2016-10-21 Electronic card and its detection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610920025.2A CN107977334B (en) 2016-10-21 2016-10-21 Electronic card and its detection method

Publications (2)

Publication Number Publication Date
CN107977334A CN107977334A (en) 2018-05-01
CN107977334B true CN107977334B (en) 2019-12-24

Family

ID=62003839

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610920025.2A Active CN107977334B (en) 2016-10-21 2016-10-21 Electronic card and its detection method

Country Status (1)

Country Link
CN (1) CN107977334B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109857695A (en) * 2018-12-27 2019-06-07 曙光信息产业(北京)有限公司 The interface switch system of server master board

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102687131A (en) * 2009-11-24 2012-09-19 微软公司 Configurable connector for system-level communication

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8239581B2 (en) * 2008-05-15 2012-08-07 Seagate Technology Llc Data storage device compatible with multiple interconnect standards
US9552316B2 (en) * 2014-03-29 2017-01-24 Intel Corporation Techniques for adaptive interface support
US10049076B2 (en) * 2015-04-02 2018-08-14 Western Digital Technologies, Inc. Methods and systems for implementing high speed serial interface bus having inhomogeneous lane bundles and encodings

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102687131A (en) * 2009-11-24 2012-09-19 微软公司 Configurable connector for system-level communication

Also Published As

Publication number Publication date
CN107977334A (en) 2018-05-01

Similar Documents

Publication Publication Date Title
TWI602127B (en) Electronic card and detecting method thereof
JP4633826B2 (en) High-speed peripheral connection interface
CN103092799B (en) Universal serial bus (USB) device and method for recognition of host operating system
US8533380B2 (en) Apparatus for peer-to-peer communication over a universal serial bus link
CN110647486B (en) PCIe link training method, end equipment and communication system
CN103365689A (en) Singlechip parallel burning method
CN110008169A (en) Communication method of security chip
CN103098039B (en) High-speed peripheral device interconnection bus port collocation method and equipment
KR20130142865A (en) Active cable management
TW201810060A (en) Connector with USB form factor, data transmission device and data storage device thereof
CN107977334B (en) Electronic card and its detection method
CN105183678A (en) Communication method and device for terminal interface
CN105279110B (en) A kind of method and USB device of USB device identification host system
CN105094886A (en) Device and method for burning serial number to lower computer containing RS (Recommended Standard) 485 bus from PC (Personal Computer) machine
CN104123257B (en) Universal serial bus device, communication method and computer readable storage medium
CN104102561A (en) Universal sequence bus testing device
CN103281219B (en) A kind of monitor the method and device that ISOIEC7816-3 interface data is mutual
CN114116415B (en) Hard disk backboard, hard disk lighting control system, method, device and medium
US11513978B2 (en) Dual data ports with shared detection line
CN105760325A (en) System and method for supporting hot swapping of USB (universal serial bus) storage device under DOS (disk operating system)
CN214122825U (en) Industrial control mainboard based on TengRui D2000 treater
CN113806273A (en) PCI express data transfer control system
CN104484634A (en) Memory card dilation detection method and card reader with dilation detection function
CN204331767U (en) A kind of frequency read/write
CN104424137A (en) Server unit, virtual media device and access method of virtual media device

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
GR01 Patent grant
GR01 Patent grant