CN107977334B - Electronic card and detection method thereof - Google Patents

Electronic card and detection method thereof 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
output signal
terminals
pcie
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 detection method thereof
Technical Field
The present disclosure relates to an electronic card and a method for detecting the same, and more particularly, to an electronic card and a method for detecting the same, which can detect a communication protocol of a host and automatically execute a corresponding firmware unit according to the communication protocol of the host to execute the corresponding communication protocol.
Background
The standard specifications of the connector applied to the electronic card are mainly classified into Mini PCI-Express standard specification, mSATA standard specification, m.2 standard specification, and the like. The Mini PCI-Express standard connector is used to support PCIe communication protocol, the mSATA standard connector is used to support SATA communication protocol, and the m.2 standard connector (predecessor is Next Generation Form Factor (NGFF)) can support SATA, PCIe, and USB3.0 communication protocols. Since the connector conforming to the m.2 standard has multiple features of small size, power saving and fast transmission speed, and can simultaneously support the above three communication protocols, the electronic card using the connector conforming to the m.2 standard becomes the mainstream.
Although the connector under the m.2 standard specification can support SATA, PCIe and USB3.0 communication protocols at the same time, the host, such as motherboard, etc. connected to the electronic card and the electronic card only carries a single communication protocol, such as the host only carries SATA communication protocol, PCIe communication protocol or USB3.0 communication protocol, and the electronic card also only carries SATA communication protocol, PCIe communication protocol or USB3.0 communication protocol, and the user cannot easily know what the communication protocol carried by the host is, so when the host and the electronic card are to perform handshake (handshake) by using Out-of-Band (OOB) signals, if the communication protocols carried by the host and the electronic card are different, the packets cannot be exchanged correctly, and the communication between the host and the electronic card cannot be performed normally, so the user must continuously try to replace the electronic card carrying different communication protocols, so as to replace the correct electronic card conforming to the communication protocol of the host, and thus, the convenience of using the electronic card of the connector under the m.2 standard is not good. Furthermore, when the electronic card is handed over through the OOB signal, the electronic card using the connector under the m.2 standard only can start the internal communication protocol when the communication protocol carried by the electronic card is the same as the communication protocol carried by the host, and then correctly exchanges packets with the host, and the electronic card cannot automatically detect the communication protocol carried by the host when being connected to the host, and further selects the corresponding communication protocol, thereby increasing the inconvenience of the electronic card using the connector under the m.2 standard.
Therefore, how to develop an electronic card and a method for detecting the same that overcome the above-mentioned disadvantages is a urgent need.
Disclosure of Invention
The present disclosure provides an electronic card and a detection method thereof, so as to solve the problems that the conventional electronic card only carries a single communication protocol, and the conventional electronic card cannot automatically detect the communication protocol carried by a host when being connected to the host, and further selects a corresponding communication protocol, resulting in poor convenience.
To achieve the above object, a preferred embodiment of the present disclosure provides a detection method for an electronic card, the electronic card including a connector, the connector conforming to m.2 standard specification, the connector including a plurality of terminals, the electronic card receiving an output signal from a host through at least one corresponding terminal of the plurality of terminals, the detection method including: step a detecting whether output signals exist in a plurality of terminals numbered 17, 19, 23 and 25 or a plurality of terminals numbered 5, 7, 11 and 13, step b determining that the communication protocol of the host is the PCIe communication protocol and terminating the detection method if the detection result is that output signals exist in a plurality of terminals numbered 17, 19, 23 and 25 or a plurality of terminals numbered 5, 7, 11 and 13, step c detecting whether output signals exist in a plurality of terminals numbered 41, 43, 47 and 49 among the plurality of terminals if the detection result is that output signals do not exist in a plurality of terminals numbered 17, 19, 23 and 25 or a plurality of terminals numbered 5, 7, 11 and 13, step d determining that the communication protocol of the host is the PCIe communication protocol or the communication SATA protocol using the output signals if the detection result is that output signals exist in a plurality of terminals numbered 41, 43, 47 and 49, and terminating the detection method, if the detection result is that the output signals do not exist in the plurality of terminals numbered 41, 43, 47 and 49, executing the step e, detecting whether the output signals exist in the plurality of terminals numbered 29, 31, 35 and 37 in the step e, determining that the communication protocol of the host is the PCIe communication protocol or the USB3.0 communication protocol by using the output signals if the output signals exist in the plurality of terminals numbered 29, 31, 35 and 37 in the step f, and terminating the detection method if the output signals do not exist in the plurality of terminals numbered 29, 31, 35 and 37 in the detection result.
To achieve the above object, another preferred embodiment of the present disclosure provides a detection method for an electronic card, the electronic card including a connector, the connector conforming to m.2 standard specification, and the connector including a plurality of terminals, the electronic card receiving an output signal from a host through at least one corresponding terminal of the plurality of terminals, the detection method including: step a sets an action set including a first action of detecting whether or not output signals exist in a plurality of terminals numbered 5, 7, 11 and 13 or 17, 19, 23 and 25 among the plurality of terminals, and determining that the communication protocol of the host is the PCIe communication protocol when the detection result is yes, a second action of detecting whether or not output signals exist in a plurality of terminals numbered 41, 43, 47 and 49, and continuing to determine that the communication protocol of the host is the PCIe communication protocol or the SATA communication protocol based on the output signals when the detection result is yes, a third action of detecting whether or not output signals exist in a plurality of terminals numbered 29, 31, 35 and 37, and continuing to determine that the communication protocol of the host is the PCIe communication protocol or the USB3.0 communication protocol based on the output signals when the detection result is yes, step b executes the first action, the second action, and a third action, And d, executing the rest actions except the actions executed in the steps b and c in the action set, and stopping the detection method.
To achieve the aforesaid objective, another preferred embodiment of the present disclosure provides an electronic card, communicating with a host, the electronic card comprising: a first firmware unit for executing SATA communication protocol; a second firmware unit to execute a PCIe communication protocol; a third firmware unit to execute a USB3.0 communication protocol; the connector accords with the M.2 standard specification and is a medium for communicating with the host, the connector also comprises a plurality of terminals, and the electronic card receives an output signal transmitted by the host through at least one corresponding terminal in the plurality of terminals; a switch unit electrically connected to the plurality of terminals; the switch unit executes a detection method, and the detection method comprises the following steps: step a detecting whether output signals exist in a plurality of terminals numbered 17, 19, 23 and 25 or a plurality of terminals numbered 5, 7, 11 and 13, step b determining that the communication protocol of the host is the PCIe communication protocol and terminating the detection method if the detection result is that output signals exist in a plurality of terminals numbered 17, 19, 23 and 25 or a plurality of terminals numbered 5, 7, 11 and 13, step c detecting whether output signals exist in a plurality of terminals numbered 41, 43, 47 and 49 among the plurality of terminals if the detection result is that output signals do not exist in any of the plurality of terminals numbered 17, 19, 23 and 25 and the plurality of terminals numbered 5, 7, 11 and 13, step d determining that the communication protocol of the host is the PCIe communication protocol or the SATA communication protocol using the output signals if the detection result is that output signals exist in a plurality of terminals numbered 41, 43, 47 and 49 among the plurality of terminals, and terminating the detection method, if the detected result is that the output signals do not exist in the plurality of terminals numbered 41, 43, 47 and 49, executing step e, detecting whether the output signals exist in the plurality of terminals numbered 29, 31, 35 and 37 in the step e, and if the output signals exist in the plurality of terminals numbered 29, 31, 35 and 37 in the step f, determining that the communication protocol of the host is the PCIe communication protocol or the USB3.0 communication protocol by using the output signals, terminating the detection method, if the output signals do not exist in the plurality of terminals numbered 29, 31, 35 and 37 in the detected result, terminating the detection method, and correspondingly executing the first firmware unit, the second firmware unit or the third firmware unit according to the result of the detection method.
Drawings
Fig. 1 is a schematic structural diagram of an electronic card separated from a host according to a preferred embodiment of the present disclosure.
Fig. 2 is a pin definition diagram of the connector conforming to the m.2 standard specification in the SATA communication protocol shown in fig. 1.
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.
Fig. 4 is a pin definition diagram of the connector conforming to the m.2 standard in the USB3.0 communication protocol shown in fig. 1.
FIG. 5 is a flowchart illustrating a detection method according to a first preferred embodiment of the present disclosure applied to the electronic card shown in FIG. 1.
FIG. 6 is a flowchart illustrating a detection method according to a second preferred embodiment of the present disclosure applied to the electronic card shown in FIG. 1.
Description of reference numerals:
1: electronic card
2: main unit
11: connector with a locking member
12: first firmware unit
13: second firmware unit
14: third firmware unit
15: switching control unit
M1-M4: flow steps of the detection method
S1-S6: flow steps of the detection method
Detailed Description
Some exemplary embodiments that incorporate the features and advantages of the present disclosure will be described in detail in the specification which follows. It is to be understood that the disclosure is capable of various modifications in various embodiments without departing from the scope of the disclosure, and that the description and drawings are to be regarded as illustrative in nature, and not as restrictive.
Fig. 1 is a schematic structural diagram of an electronic card separated from a host according to a preferred embodiment of the present disclosure. As shown in fig. 1, the electronic card 1 of the present disclosure may be, but is not limited to, a Solid State Disk (SSD) or a non-volatile memory module, and is detachably assembled with a host 2, such as a slot on a motherboard, and when the electronic card 1 is assembled with the host 2, the host 2 may output an output signal to the electronic card 1 to communicate with the electronic card 1 for data transmission, where the electronic card 1 includes a connector 11, a first firmware unit 12, a second firmware unit 13, a third firmware unit 14, and a switch unit 15. The connector 11 conforms to the m.2 standard, and the connector 11 can be inserted into the host 2, wherein the connector 11 is a medium for communicating with the host 2 and includes a plurality of terminals, when the electronic card 1 is assembled with the host 2, the plurality of terminals of the connector 11 are electrically connected with corresponding terminals (not shown) of the host 2, and the electronic card 1 receives an output signal transmitted from the host 2 through at least one of the plurality of terminals.
The first firmware unit 12 is used for executing the SATA communication protocol, so that the electronic card 1 and the host 2 can perform data transmission through the connector 11 by using the SATA communication protocol. The second firmware unit 13 and the third firmware unit are respectively configured to execute a PCIe communication protocol and a USB3.0 communication protocol, and respectively enable the electronic card 1 and the host 2 to perform data transmission through the connector 11 in a SATA communication protocol or a USB3.0 communication protocol.
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 correspondingly execute the first firmware unit 12, the second firmware unit 13 or the third firmware unit 14 according to whether the communication protocol of the host 2 is the SATA communication protocol, the PCIe communication protocol or the USB3.0 communication protocol, and further execute the SATA communication protocol, the PCIe communication protocol or the USB3.0 communication protocol, so that the host 2 and the electronic card 1 perform data transmission under the same communication protocol.
As can be seen from the above, the electronic card 1 of the present disclosure can correspondingly 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 further respectively execute the SATA communication protocol, the PCIe communication protocol, and the USB3.0 communication protocol. Therefore, the electronic card 1 can perform data transmission under the same communication protocol as the host 2, and compared with the inconvenience caused by the prior art that the electronic card only supports a single communication protocol, the electronic card 1 of the present disclosure can automatically execute the corresponding firmware unit according to the communication protocol of the host 2 to execute the corresponding communication protocol, so that the convenience can be greatly improved.
It should be further noted that the connector 11 of the electronic card 1 may have different specifications (mainly distinguished by key positions, such as B-type, M-type, B + M-type, etc.) according to different communication protocols, and the definition of the terminals of the connector 11 is different under different specifications. For example, fig. 2 is a pin definition diagram of the connector conforming to the m.2 standard in the SATA communication protocol shown in fig. 1. As shown in fig. 2, when the electronic card 1 needs to communicate with the host 2 by the SATA communication protocol, the terminals numbered 41, 43, 47 and 49 of the plurality of terminals are defined to receive the output signal output by the host 2, so that the electronic card 1 communicates with the host 2 through the plurality of terminals numbered 41, 43, 47 and 49 to establish connection.
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 fig. 3, when the electronic card 1 communicates with the host 2 according to the PCIe communication protocol, the plurality of terminals with the numbers 41, 43, 47 and 49 receive the output signal output by the host 2, the plurality of terminals with the numbers 29, 31, 35 and 37 receive the output signal output by the host 2, the plurality of terminals with the numbers 17, 19, 23 and 25 receive the output signal output by the host 2 or the plurality of terminals with the numbers 5, 7, 11 and 13 receive the output signal output by the host 2, so that the electronic card 1 communicates with the host 2 through the plurality of terminals with the numbers 41, 43, 47 and 49, the numbers 29, 31, 35 and 37, the numbers 17, 19, 23 and 25 or the numbers 5, 7, 11 and 13 to establish connection.
Fig. 4 is a pin definition diagram of the connector conforming to the m.2 standard in the USB3.0 communication protocol shown in fig. 1. As shown in fig. 4, when the electronic card 1 communicates with the host 2 according to the USB3.0 communication protocol, the terminals numbered 29, 31, 35 and 37 are defined to receive the output signal from the host 2, so that the electronic card 1 communicates with the host 2 through the terminals numbered 29, 31, 35 and 37 to establish connection.
In this embodiment, the terminals numbered 41, 43, 47 and 49 are differential signal groups (differential signal pairs) defined in the SATA communication protocol, the terminals numbered 41, 43, 47 and 49, the terminals numbered 29, 31, 35 and 37, the terminals numbered 17, 19, 23 and 25 or the terminals numbered 5, 7, 11 and 13 are differential signal groups defined in the PCIe communication protocol, the terminals numbered 29, 31, 35 and 37 are differential signal groups defined in the USB3.0 communication protocol, and the differential signal groups are used to receive output signals (i.e., differential signals) output by the host 2.
In addition, as can be seen from the above, the switch unit 15 of the electronic card 1 of the present disclosure can correspondingly execute the first firmware unit 12, the second firmware unit 13 or the third firmware unit 14 according to whether the communication protocol of the host 2 is the SATA communication protocol, the PCIe communication protocol or the USB3.0 communication protocol, and further execute the SATA communication protocol, the PCIe communication protocol or the USB3.0 communication protocol, so in order to determine whether the communication protocol of the host 2 is the SATA communication protocol, the PCIe communication protocol or the USB3.0 communication protocol, the switch unit 15 of the electronic card 1 of the present disclosure actually executes a detection method, which will be described below.
Referring to fig. 5 in conjunction with fig. 1, fig. 5 is a flowchart illustrating a detection method applied to the electronic card shown in fig. 1 according to a first preferred embodiment of the present disclosure. As shown in fig. 5, step M1 is executed to set an action set including a first action, a second action and a third action, wherein the first action is to detect whether there is an output signal at a plurality of terminals numbered 5, 7, 11 and 13 or at a plurality of terminals numbered 17, 19, 23 and 25 among the plurality of terminals of the connector 11, and when the detection result is yes, the communication protocol of the host 2 is judged to be the PCIe communication protocol, the second action is to detect whether output signals exist in a plurality of terminals with numbers 41, 43, 47 and 49, and continues to use the output signal to determine whether the communication protocol of the host 2 is the PCIe communication protocol or the SATA communication protocol if the detection result is yes, and the third action is to detect whether the output signals exist at the plurality of terminals of numbers 29, 31, 35 and 37, and continues to detect the output signal if the detection result is yes, so as to correspondingly determine the communication protocol of the host 2 as the PCIe communication protocol or the USB3.0 communication protocol according to the output signal.
Then, step M2 is executed to execute any one of the first action, the second action and the third action, and the detection method is terminated when the communication protocol of the host 2 is determined, otherwise, the next step is entered.
Then, step M3 is executed to execute any action in the action set except the action executed in step M2, and the detection method is terminated when the communication protocol of the host 2 is determined, otherwise, the next step is proceeded.
Finally, step M4 is executed, and the remaining actions in the action set except the actions executed in step M2 and step M3 are executed.
After the switch unit 15 finishes the above-mentioned 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 USB3.0 communication protocol, and further, when the communication protocol of the host 2 is determined to be the SATA communication protocol, the first firmware unit 12 is executed to execute the SATA communication protocol, and when the communication protocol of the host 2 is determined to be the PCIe communication protocol, the second firmware unit 13 is executed to execute the PCIe communication protocol, and when the communication protocol of the host 2 is determined to be the USB3.0 communication protocol, the third firmware unit 14 is executed to execute the USB3.0 communication protocol.
In some embodiments, in the second action of the action set, when the output signals are detected to exist at the terminals 41, 43, 47 and 49, the output signals are continuously utilized to determine that the communication protocol of the host 2 is the PCIe communication protocol or the SATA communication protocol according to a predetermined determination condition, which may be, but is not limited to, setting to perform determination based on the differential pressure range of the output signals, for example, if the differential pressure range of the output signals is a to B, the communication protocol of the host 2 is determined to be the PCIe communication protocol, and if the differential pressure range of the output signals is detected to be C to D, the communication protocol of the host 2 is determined to be the SATA communication protocol. Furthermore, when the output signal is used and the communication protocol of the host 2 is determined to be the PCIe communication protocol or the SATA communication protocol according to the default determination condition, the detection method is terminated.
In some embodiments, the switch unit 15 of the electronic card 1 can directly determine that the communication protocol of the output signal of the host 2 is the SATA communication protocol or the PCIe communication protocol according to the definition of the Physical layer (Physical layer) for the signal, such as the voltage or the wavelength of the signal, so that in the second action, when the output signals are detected to exist at the terminals 41, 43, 47 and 49, the switch unit 15 continues to determine that the communication protocol of the output signal is the SATA communication protocol or the PCIe communication protocol according to the definition of the Physical layer, and thus, it can determine that the communication protocol of the host 2 is the PCIe communication protocol or the SATA communication protocol. Furthermore, when the switch unit 15 continues to determine that the communication protocol of the host 2 is the PCIe communication protocol or the SATA communication protocol according to the definition of the signal in the physical layer, the detection method is terminated. In addition, in the SATA communication protocol, the USB3.0 communication protocol, and the PCIe communication protocol, the definition of the signals by the physical layer has been defined, and is not described herein again.
In some embodiments, in the third action of the action set, when the output signals are detected to exist in the terminals 29 th, 31 th, 35 th and 37 th, the output signals are continuously utilized to determine that the communication protocol of the host 2 is the PCIe communication protocol or the USB3.0 communication protocol according to another predetermined determination condition, which may be, but not limited to, setting the pressure difference range of the output signals to be used for determination, for example, if the pressure difference range of the output signals is from a to B, the communication protocol of the host 2 is determined to be the PCIe communication protocol, and if the pressure difference range of the output signals is detected to be from E to F, the communication protocol of the host 2 is determined to be the USB3.0 communication protocol. Furthermore, when the output signal is used and the communication protocol of the host 2 is determined to be the PCIe communication protocol or the USB3.0 communication protocol according to the default determination condition, the detection method is terminated.
In some embodiments, the switch unit 15 of the electronic card 1 can directly determine that the communication protocol of the output signal of the host 2 is the PCIe communication protocol or the USB3.0 communication protocol according to the definition of the signal in the Physical layer (e.g., the voltage or the wavelength of the signal), so that in the third action, when the output signals are detected to exist in the terminals 29, 31, 35, and 37, the switch unit 15 continues to determine that the communication protocol of the output signal is the PCIe communication protocol or the USB3.0 communication protocol according to the definition of the signal in the Physical layer, so as to determine that the communication protocol of the host 2 is the PCIe communication protocol or the USB3.0 communication protocol. Furthermore, when the switch unit 15 continues to determine that the communication protocol of the host 2 is the PCIe communication protocol or the USB3.0 communication protocol according to the definition of the signal in the physical layer, the detection method is terminated. In addition, in the SATA communication protocol, the USB3.0 communication protocol, and the PCIe communication protocol, the definition of the signals by the physical layer has been defined, and is not described herein again.
Of course, another preferred embodiment of the present disclosure may perform the first action in step M2 shown in fig. 5, then perform the second action in step M3, and finally perform the third action in step M4. In other words, compared to fig. 5, which does not sequence the execution sequence of the first action, the second action, and the third action, the detection method of another preferred embodiment of the present disclosure is actually preset for the execution sequence of the first action, the second action, and the third action, and according to the sequence, the flowchart of the detection method of another preferred embodiment of the present disclosure will be shown in fig. 6 and will be described below.
Referring to fig. 6 in conjunction with fig. 1, fig. 6 is a flowchart illustrating a detection method according to a second preferred embodiment of the present disclosure applied to the electronic card shown in fig. 1. As shown in fig. 6, first, step S1 is executed, and the switching unit 15 detects whether there is an output signal at the terminals numbered 17, 19, 23, and 25 or at the terminals numbered 5, 7, 11, and 13 among the terminals of the connector 11.
Next, step S2 is executed, if the switch unit 15 detects that there is an output signal 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 communication protocol of the host 2 is the PCIe communication protocol and terminates the detection method, and if the switch unit 15 detects that there is no output signal at any of the terminals numbered 17, 19, 23, and 25 and the terminals numbered 5, 7, 11, and 13, step S3 is executed.
In step S3, the switch unit 15 detects whether there is an output signal at the terminals numbered 41, 43, 47, and 49 among the terminals.
Next, step S4 is executed, if the switch unit 15 detects that the output signals exist at the terminals numbered 41, 43, 47 and 49, the switch unit 15 uses the output signals to correspondingly determine that the communication protocol of the host 2 is the PCIe communication protocol or the SATA communication protocol, and if the output signals do not exist at the terminals numbered 41, 43, 47 and 49, step S5 is executed.
Next, step S5 is executed, and the switch unit 15 detects whether there is an output signal at the terminals numbered 29 th, 31 th, 35 th and 37 th among the terminals.
Finally, step S6 is executed, if the output signals are present at the terminals numbered 29, 31, 35, and 37 as a result of the detection, the communication protocol of the host 2 is continuously determined to be the PCIe communication protocol or the USB3.0 communication protocol by using the output signals, and if the output signals are not present at the terminals numbered 29, 31, 35, and 37 as a result of the detection, the detection method is terminated.
In summary, the present disclosure provides an electronic card and a detection method thereof, wherein the electronic card includes a first firmware unit for executing an SATA communication protocol, a second firmware unit for executing a PCIe communication protocol, and a third firmware unit for executing a USB3.0 communication protocol, and the electronic card directly detects whether a communication protocol of a host is the SATA communication protocol, the PCIe communication protocol, or the USB3.0 communication protocol by using the detection method, and further automatically executes a corresponding firmware unit.

Claims (18)

1. A detection method is suitable for an electronic card, and is characterized in that the electronic card comprises a connector, the connector comprises a plurality of terminals, the electronic card receives an output signal transmitted by a host through at least one corresponding terminal in the plurality of terminals, and the detection method comprises the following steps:
step a: detecting whether the output signal exists in a plurality of the terminals numbered 17, 19, 23 and 25 or in a plurality of the terminals numbered 5, 7, 11 and 13;
step b: if the output signal exists at the terminals numbered 17, 19, 23 and 25 or at the terminals numbered 5, 7, 11 and 13 as a result of the detection, determining that the communication protocol of the host is a PCIe communication protocol and terminating the detection method, and if the output signal does not exist at the terminals numbered 17, 19, 23 and 25 or at the terminals numbered 5, 7, 11 and 13 as a result of the detection, performing step c;
step c: detecting whether the output signal exists in a plurality of terminals numbered 41, 43, 47 and 49;
step d: if the output signal exists in the terminals numbered 41, 43, 47 and 49, the output signal is used to determine that the communication protocol of the host is the PCIe communication protocol or a SATA communication protocol, and the detection method is terminated, if the output signal does not exist in the terminals numbered 41, 43, 47 and 49, step e is executed;
step e: detecting the presence of the output signal at a plurality of the terminals numbered 29, 31, 35 and 37; and
step f: if the output signal exists in the terminals numbered 29, 31, 35 and 37, the communication protocol of the host is judged to be the PCIe communication protocol or a USB3.0 communication protocol by using the output signal, and the detection method is terminated, if the output signal does not exist in the terminals numbered 29, 31, 35 and 37, the detection method is terminated.
2. The method as claimed in claim 1, further comprising in step d, if the output signal is present at the terminals numbered 41, 43, 47 and 49, determining the host communication protocol to be the PCIe communication protocol by using a differential pressure range of the output signal.
3. The method as claimed in claim 1, further comprising in step d, if the output signal is present at the terminals numbered 41, 43, 47 and 49, determining the host communication protocol to be the SATA communication protocol by using a differential pressure range of the output signal.
4. The method as claimed in claim 1, further comprising in step f, if the output signal is present at the terminals numbered 29, 31, 35 and 37, determining the host communication protocol to be the PCIe communication protocol by using a differential pressure range of the output signal.
5. The detecting method as claimed in claim 1, further comprising in step f, if the detecting result is that the output signals exist at a plurality of the terminals numbered 29 th, 31 th, 35 th and 37 th, further utilizing a differential pressure range of the output signals to determine that the communication protocol of the host is the USB3.0 communication protocol.
6. The detecting method of claim 1, further comprising in step d, if the detecting result is that the output signal exists in the terminals numbered 41, 43, 47 and 49, determining that the communication protocol of the output signal is the PCIe communication protocol or the SATA communication protocol by using a definition of a physical layer for signals, determining that the communication protocol of the host is the PCIe communication protocol when the communication protocol of the output signal is the PCIe communication protocol, and determining that the communication protocol of the host is the SATA communication protocol when the communication protocol of the output signal is the SATA communication protocol.
7. The detecting method as claimed in claim 1, further comprising in step f, if the detecting result is that the output signal exists in a plurality of the terminals numbered 29 th, 31 th, 35 th and 37 th, determining the communication protocol of the output signal to be the PCIe communication protocol or the USB3.0 communication protocol by using a definition of a signal by a physical layer, determining the communication protocol of the host to be the PCIe communication protocol when the communication protocol of the output signal is the PCIe communication protocol, and determining the communication protocol of the host to be the USB3.0 communication protocol when the communication protocol of the output signal is the USB3.0 communication protocol.
8. A detection method is suitable for an electronic card, and is characterized in that the electronic card comprises a connector, the connector comprises a plurality of terminals, the electronic card receives an output signal transmitted by a host through at least one corresponding terminal in the plurality of terminals, and the detection method comprises the following steps:
step a sets an action set including a first action, a second action and a third action, wherein the first action is detecting whether the output signal is present at a plurality of the terminals numbered 5 th, 7 th, 11 th and 13 th or 17 th, 19 th, 23 th and 25 th among the plurality of the terminals, and determines the communication protocol of the host as a PCIe communication protocol if the detection result is yes, the second action is to detect whether the output signal exists in a plurality of the terminals numbered 41, 43, 47 and 49, and continuously determining the host communication protocol as the PCIe communication protocol or a SATA communication protocol according to the output signal if the detection result is yes, the third action is to detect whether the output signal exists in the plurality of the terminals numbered 29, 31, 35 and 37, and when the detection result is yes, the communication protocol of the host is continuously judged to be the PCIe communication protocol or a USB3.0 communication protocol correspondingly according to the output signal;
step b, executing any action of the first action, the second action and the third action, and terminating the detection method when judging the communication protocol of the host, otherwise, entering the next step;
step c, executing any action except the action executed in the step b in the action set, terminating the detection method when judging the communication protocol of the host, and entering the next step if not; and
step d executes the remaining actions in the action set except the actions executed in the step b and the step c, and terminates the detection method.
9. The detection method of claim 8, further comprising performing the first action in step b.
10. The detection method of claim 9, further comprising performing the second action in step c.
11. The detecting method according to claim 8, wherein in the second action, if the detecting result is that the output signals exist at the terminals numbered 41, 43, 47 and 49, a differential pressure range of the output signals is further utilized to determine that the host communication protocol is the PCIe communication protocol.
12. The detecting method as claimed in claim 8, wherein in the second action, if the detecting result is that the output signals exist at the terminals numbered 41, 43, 47 and 49, a differential pressure range of the output signals is further utilized to determine that the communication protocol of the host is the SATA communication protocol.
13. The detecting method of claim 8, wherein in the third action, if the detecting result is that the output signals exist at the terminals numbered 29 th, 31 th, 35 th and 37 th, a differential pressure range of the output signals is further utilized to determine that the host communication protocol is the PCIe communication protocol.
14. The detecting method as claimed in claim 8, wherein in the third action, if the detecting result is that the output signals exist at the terminals numbered 29 th, 31 th, 35 th and 37 th, a differential pressure range of the output signals is further utilized to determine that the communication protocol of the host is the USB3.0 communication protocol.
15. The detecting method of claim 8, wherein in the second action, if the detecting result is that the output signal exists in the terminals numbered 41, 43, 47 and 49, a definition of a physical layer signal is further utilized to determine that the communication protocol of the output signal is the PCIe communication protocol or the SATA communication protocol, and if the communication protocol of the output signal is the PCIe communication protocol, the communication protocol of the host is determined to be the PCIe communication protocol, and if the communication protocol of the output signal is the SATA communication protocol, the communication protocol of the host is determined to be the SATA communication protocol.
16. The detecting method of claim 8, wherein in the third action, if the detecting result is that the output signal exists in the plurality of terminals numbered 29, 31, 35 and 37, a definition of a physical layer signal is further utilized to determine that the communication protocol of the output signal is the PCIe communication protocol or the USB3.0 communication protocol, and if the communication protocol of the output signal is the PCIe communication protocol, the communication protocol of the host is determined to be the PCIe communication protocol, and if the communication protocol of the output signal is the USB3.0 communication protocol, the communication protocol of the host is determined to be the USB3.0 communication protocol.
17. An electronic card for communicating with a host, the electronic card comprising:
a first firmware unit for executing a SATA communication protocol;
a second firmware unit for executing a PCIe communication protocol;
a third firmware unit for executing a USB3.0 communication protocol;
a connector, which is a medium for communicating with the host, and also comprises a plurality of terminals, wherein the electronic card receives an output signal transmitted by the host through at least one corresponding terminal in the plurality of terminals;
a switch unit electrically connected to the plurality of terminals;
the switch unit executes the detection method of 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. The electronic card of claim 17, wherein the switch unit executes the first firmware unit to enable the electronic card and the host to communicate with each other according to the SATA communication protocol when the detection method is finished and the communication protocol of the host is determined to be the SATA communication protocol, executes the second firmware unit to enable the electronic card and the host to communicate with each other according to the PCIe communication protocol when the switch unit is finished and the communication protocol of the host is determined to be the PCIe communication protocol, and executes the third firmware unit to enable the electronic card and the host to communicate with each other according to the USB3.0 communication protocol when the switch unit is finished and the communication protocol of the host is determined to be the USB3.0 communication protocol.
CN201610920025.2A 2016-10-21 2016-10-21 Electronic card and detection method thereof 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 detection method thereof

Applications Claiming Priority (1)

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

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 detection method thereof

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
RU2682911C2 (en) Reversible connector for accessory devices
CN107533529B (en) Universal serial bus intelligent concentrator
US8954628B2 (en) Portable device and peripheral extension dock
US8769160B2 (en) Multi-interface memory card and method of operation
CN106294221B (en) Electronic device and method for controlling signal strength according to mode
US10776288B2 (en) Apparatus for adapting interface type of peripheral device and method thereof
CN112041827B (en) Automatic USB host detection and port configuration method and device
US8234426B2 (en) Switching interface method for a multi-interface storage device
CN110647486B (en) PCIe link training method, end equipment and communication system
CN112996020B (en) Bluetooth-based automatic test method and device and Bluetooth test terminal
CN105701038B (en) A kind of cascade chip starting method and relevant apparatus
KR102274028B1 (en) Operating method of controller for setting link between interfaces of electronic devices, and storage device including controller
CN107977334B (en) Electronic card and detection method thereof
CN111386433A (en) Electric appliance and control method thereof
US20020084988A1 (en) Apparatus and method for automatically detecting USB mode and PS/2 mode computer keyboard
CN112860606A (en) Interface conversion device and equipment
US11334506B2 (en) Interface connection device, system and method thereof
CN104850522B (en) A kind of signal output method and device
US10909047B2 (en) Flash memory control device capable of detecting type of interface and method thereof
CN101807173A (en) Method for quickly programming more than two SPI equipment
CN105446903A (en) Information processing method and electronic device
CN111124788B (en) Detection device and configuration detection method for LBA (logical Block addressing) interval position
US11513978B2 (en) Dual data ports with shared detection line
US20240111698A1 (en) Switching device applied to a display and method of switching working modes

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