CN109992551A - USB c-type interface message read method and information read circuit - Google Patents

USB c-type interface message read method and information read circuit Download PDF

Info

Publication number
CN109992551A
CN109992551A CN201910280618.0A CN201910280618A CN109992551A CN 109992551 A CN109992551 A CN 109992551A CN 201910280618 A CN201910280618 A CN 201910280618A CN 109992551 A CN109992551 A CN 109992551A
Authority
CN
China
Prior art keywords
type
partial pressure
bus
usb
bus transfer
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.)
Granted
Application number
CN201910280618.0A
Other languages
Chinese (zh)
Other versions
CN109992551B (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.)
Xian Wingtech Information Technology Co Ltd
Original Assignee
Shanghai Smell Information Technology Co Ltd
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 Shanghai Smell Information Technology Co Ltd filed Critical Shanghai Smell Information Technology Co Ltd
Priority to CN201910280618.0A priority Critical patent/CN109992551B/en
Publication of CN109992551A publication Critical patent/CN109992551A/en
Application granted granted Critical
Publication of CN109992551B publication Critical patent/CN109992551B/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/40Bus structure
    • G06F13/4063Device-to-bus coupling
    • G06F13/4068Electrical coupling
    • G06F13/4086Bus impedance matching, e.g. termination
    • 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/0016Inter-integrated circuit (I2C)
    • 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/38Universal adapter
    • G06F2213/3812USB port controller

Landscapes

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

Abstract

The present invention provides a kind of USB c-type interface message read methods, this method comprises: external data reading device obtains reading data type and according to the resistance value of the pull down resistor in the reading data type adjustment external data reading device;The control module of electronic equipment obtains the partial pressure value of pull-up resistor, and judges the corresponding bus transfer type of reading data type by partial pressure value;Wherein, pull-up resistor is located on the mainboard of electronic equipment, and after external data reading device is connect with electronic equipment, pull-up resistor is connected with pull down resistor;Control module according to bus transfer type to signal switching module issue control instruction, corresponding signal transmission passage is opened with indication signal switching module.The present invention can directly read the status information in CPU or EC by external data reading device, improve the remediation efficiency of system when the system of electronic equipment goes wrong.

Description

USB c-type interface message read method and information read circuit
Technical field
The present embodiments relate to electronic circuit technology more particularly to a kind of USB c-type interface message read methods and letter Cease reading circuit.
Background technique
Universal serial bus bus (Universal Serial Bus, USB), is the most-often used bus of digital product. Its common version is USB2.0, USB3.x (including USB3.0, USB3.1).Its common interface has A type, c-type, Micro type. Wherein c-type interface, due to smaller, function is more, it has also become mainstream, or even the product having only use c-type interface, and c-type connects Mouth includes 2 groups of USB2.0 signals.
The system of electronic equipment goes wrong, can not normal use when, it usually needs mainboard is dismantled, with lead by centre Manage the shape in device (Central Processing Unit, CPU) or embedded controller (Embed Controller, EC) The export of state information, and then the reason of analysis system failure, to be repaired.But this method needs are more complex, and consume It is time-consuming.
Summary of the invention
The present invention provides the method and information read circuit of a kind of USB c-type interface reading information, is set with realizing in electronics When standby system goes wrong, the system status information in CPU or EC is quickly and easily read, with analysis system failure cause, The significant increase efficiency of system reparation.
In a first aspect, the embodiment of the invention provides a kind of methods that USB c-type interface reads information, this method comprises:
External data reading device obtains reading data type and according to the reading data type adjustment external data Read the resistance value of the pull down resistor in equipment;
The control module of electronic equipment obtains the partial pressure value of pull-up resistor, and judges that the data are read by the partial pressure value Take the corresponding bus transfer type of type;Wherein, the pull-up resistor is located on the mainboard of the electronic equipment, the external number According to read equipment USB c-type interface connect with the USB c-type interface of the electronic equipment after, the pull-up resistor with it is described under Pull-up resistor series connection;
The control module is issued to the signal switching module of the electronic equipment according to the bus transfer type and is controlled Instruction, to indicate that the signal switching module opens signal transmission passage corresponding with the bus transfer type.
Second aspect, the embodiment of the invention also provides a kind of USB c-type interface message reading circuit, which includes: Control module, signal switching module and pull-up resistor;
The pull-up resistor is set on the mainboard of the electronic equipment;The USB c-type interface of external data reading device Drop-down after being connect with the USB c-type interface of the electronic equipment, in the pull-up resistor and the external data reading device Resistance series connection;
The control module is used to obtain the partial pressure value that the pull-up resistor generates, and by described in partial pressure value judgement The corresponding bus transfer type of reading data type that external data reading device is chosen;
The control module is used to issue control instruction to the signal switching module according to the bus transfer type;
The signal switching module opens signal transmission corresponding with the bus transfer type according to the control instruction Channel.
The present invention is by control module according to the pull down resistor of external data reading device to the mainboard chip of electronic equipment The partial pressure value that middle pull-up resistor generates judges the corresponding bus transfer class of reading data type that external data reading device is chosen Type, and then control instruction is issued to the signal switching module of electronic equipment, open signal corresponding with the bus transfer type Transmission channel.In the present invention by the USB c-type interface of electronic equipment respectively with universal asynchronous receiving-transmitting transmitter bus (Universal Asynchronous Receiver/Transmitter, UART) and bidirectional two-line synchronous serial bus (Inter-Integrated Circuit, I2C) connection, wherein UART bus is used to read the status information of CPU, and I2C is used for Read the status information of EC.When the system of electronic equipment goes wrong, can be directly read by external data reading device The status information of electronic equipment CPU or EC, and then analysis system failure cause greatly improve the reparation effect of electronic apparatus system Rate.
Detailed description of the invention
Fig. 1 is the method flow diagram of the USB c-type interface reading information in the embodiment of the present invention one;
Fig. 2 is the schematic diagram of one of embodiment of the present invention two USB c-type interface message reading circuit;
Fig. 3 is the schematic diagram of one of embodiment of the present invention three USB c-type interface message reading circuit.
Specific embodiment
The present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining the present invention rather than limiting the invention.It also should be noted that in order to just Only the parts related to the present invention are shown in description, attached drawing rather than entire infrastructure.
Embodiment one
The embodiment of the present invention is suitable for the USB c-type of external data reading device when the system of electronic equipment goes wrong The case where interface is connect with the USB c-type interface of the electronic equipment, status information to read electronic equipment CPU or EC.Electronics Equipment for example can be mobile phone, apparatus such as computer, and external data reading device is for example also possible to another such as mobile phone or computer Electronic equipment.Fig. 1 is that the method flow diagram of the USB c-type interface reading information in the embodiment of the present invention one should referring to Fig. 1 Method the following steps are included:
S101, external data reading device obtain reading data type and according to the reading data type adjustment external datas Read the resistance value of the pull down resistor in equipment.
When the system of electronic equipment breaks down, the letter of electronic equipment can be read by external data reading device The reason of ceasing, and then being occurred according to the information analysis failure of reading.Specifically, the USB c-type interface of external data reading device It is connect with the USB c-type interface of electronic equipment, user can choose reading data in the software interface of external data reading device Type.Pull down resistor is provided in external data reading device, when user selects different reading data types, the pull down resistor Resistance value can change therewith.Reading data type pass corresponding with pull down resistor resistance value is prestored in external data reading device System.After external data reading device obtains reading data type, closed according to reading data type is corresponding with pull down resistor resistance value The resistance value of pull down resistor corresponding to the reading data type obtained is searched by system, and the drop-down in external data reading device is electric Resistance is adjusted to the resistance value.
It can choose a variety of resistances when it should be noted that adjusting the resistance value of the pull down resistor in external data reading device Value, but need to remove resistance value used in usb protocol, such as 5.1K ohm.If when electronic equipment normal use, external data is read Equipment is taken normally to connect with electronic equipment, the resistance value of the pull down resistor of external data reading device is without adjusting at this time, the drop-down The resistance value of resistance is generally resistance value used in usb protocol, therefore the resistance value of the pull down resistor after adjusting needs to exclude usb protocol Used in resistance value.
The control module acquisition pull-up resistor partial pressure value of S102, electronic equipment, and reading data class is judged by partial pressure value The corresponding bus transfer type of type.
Wherein, pull-up resistor, the USB c-type interface and electricity of external data reading device are provided on the mainboard of electronic equipment Pull-up electricity after the USB c-type interface connection of sub- equipment, on the pull down resistor and electronic equipment mainboard of external data reading device Resistance series connection.Since the resistance value that different data reads the corresponding pull down resistor of type is different, can cause upper on electronic equipment mainboard The partial pressure value of pull-up resistor is different.Control module can compare the partial pressure value of pull-up resistor with reference voltage, judge the partial pressure Whether value is located in the range of reference voltage, and then determines the bus transfer type of reading data type, such as determines to be UART Type or I2C type.
S103, control module issue control instruction to the signal switching module of electronic equipment according to bus transfer type, with Indication signal switching module opens signal transmission passage corresponding with bus transfer type.
According to determining bus transfer type, the control issued to the signal switching module of electronic equipment refers to control module It enables, signal switching module opens corresponding signal transmission passage in turn, so that external data reading device passes through corresponding signal Transmission channel reads the status information in electronic equipment.
The present invention selects the pull down resistor of different resistance values according to different reading data types, and then can be according to pull-up The partial pressure value of resistance determines the corresponding bus transfer type of the reading data type, then controls to the transmission of signal switching module Instruction makes external data reading device read electricity by corresponding signal transmission passage to open corresponding signal transmission passage Status information in sub- device systems, especially in the system jam of electronic equipment, provided by the embodiment of the present invention The method that USB c-type interface reads information, can be in the case where not dismantling electronic equipment mainboard, and quick and convenient reading electronics is set The status information of standby system, and then may be implemented quickly to analyze the reason of electronic equipment breaks down, significant increase system are repaired Multiple efficiency.
Optionally, reading data type includes central processor CPU data and embedded controller EC data.
CPU is the arithmetic core and control core of computer or electronic product, is often used the state that UART bus reads CPU Information.EC is also referred to as KBC (Keyboard Controller, keyboard controller), and during system starting, EC is controlled absolutely The timing of most of signal of interest.After electronic equipment booting, EC controls keyboard, indicator light, fan, the devices such as Trackpad.It removes Except this, EC also controls the states such as the standby of system, suspend mode, commonly uses the status information that I2C bus reads EC.
Further, the control module of electronic equipment obtains the partial pressure value that pull-up resistor generates, and is judged by partial pressure value The corresponding bus transfer type of reading data type, comprising:
The control module of electronic equipment obtains the partial pressure value that pull-up resistor generates, and belongs to first voltage range in partial pressure value When interior, determine that the corresponding bus transfer type of reading data type is UART bus transfer type, belongs to the second electricity in partial pressure value When pressing in range, determine that the corresponding bus transfer type of reading data type is I2C bus transfer type;
Correspondingly, control module issues control instruction to the signal switching module of electronic equipment according to bus transfer type, Signal transmission passage corresponding with bus transfer type is opened with indication signal switching module, comprising:
When bus transfer type is UART bus transfer type, control module is sent out to the signal switching module of electronic equipment First control instruction out opens UART bus transfer channel with indication signal switching module;It is I2C bus in bus transfer type When transport-type, control module issues the second control instruction to the signal switching module of electronic equipment, switches mould with indication signal Block opens I2C bus transfer channel.
The USB c-type interface two sides of electronic equipment is separately connected UART bus and I2C bus, due to USB c-type interface from Two sides is not different from the point of view of in appearance, therefore in actual use it is possible that anti-inserted situation.For above situation, the present invention Embodiment provide USB c-type interface message read method can also include:
After the USB c-type interface connection of the USB c-type interface and electronic equipment of external data reading device, if external data The data that equipment does not receive electronic equipment within the set time are read, external data reading device generation turn-over is inserted again to be mentioned Show, to prompt user that will connect after the USB c-type interface turn-over of external data reading device with the USB c-type interface of electronic equipment It connects.
After the USB c-type interface connection of the USB c-type interface and electronic equipment of external data reading device, if external data The data that equipment does not receive electronic equipment within the set time are read, illustrate the USB c-type of external data reading device Interface is anti-inserted, so external data reading device can be by way of generating turn-over and inserting prompt again, to prompt user will at this time It is connect again with the USB c-type interface of electronic equipment after the USB c-type interface turn-over of external data reading device.
In addition, scheme provided by the invention is for external to data in the electronic equipment in electronic equipment course of normal operation Reading has no effect on.That is, being connect in electronic equipment course of normal operation with external data reading device, external data reading device The data in electronic equipment can also be normally read by universal serial bus transmission channel.Specific implementation is as follows:
If connecting in electronic equipment course of normal operation with external data reading device, external data reading device is not under The resistance value of pull-up resistor is adjusted, therefore the partial pressure value of the pull-up resistor of the control module acquisition of electronic equipment is preset value.I.e. The control module of electronic equipment issues data transmission when partial pressure value is equal to default usb protocol partial pressure value, to signal switching module Instruction opens universal serial bus transmission channel with indication signal switching module.Wherein, usb protocol partial pressure value is preset equal to outer When portion's reading data equipment does not adjust the resistance value of pull down resistor, the partial pressure value of pull-up resistor.Above-mentioned set-up mode can guarantee electricity The external normal reading to data in the electronic equipment in sub- equipment course of normal operation.
Embodiment two
Fig. 2 is the schematic diagram of one of embodiment of the present invention two USB c-type interface message reading circuit, as shown in Fig. 2, The USB c-type interface message reading circuit includes: control module 100, signal switching module 104 and pull-up resistor 105;
Pull-up resistor 105 is set on the mainboard of electronic equipment, pull down resistor is provided in external data reading device, outside After the USB c-type interface connection of the USB c-type interface and electronic equipment of portion's reading data equipment, pull-up resistor and external data are read The pull down resistor in equipment is taken to connect and (be not shown in Fig. 2 and series connection relationship is shown).
Specifically, user can choose reading data type in the software interface of external data reading device.User's selection When different reading data type, the resistance value of the pull down resistor can change therewith.Data are prestored in external data reading device Read the corresponding relationship of type and pull down resistor resistance value.After external data reading device obtains reading data type, according to data The resistance value of pull down resistor corresponding to the reading data type of the corresponding relationship lookup acquisition of type and pull down resistor resistance value is read, And the pull down resistor in external data reading device is adjusted to the resistance value.
Control module 100 is used to obtain the partial pressure value of the generation of pull-up resistor 105, and judges that external data is read by partial pressure value Take the corresponding bus transfer type of selected reading data type of equipment.
Control module 100 issues control instruction, signal switching module to signal switching module 104 according to bus transfer type 104 open signal transmission passage corresponding with bus transfer type according to control instruction.
USB c-type interface message reading circuit provided in an embodiment of the present invention can be determined according to the partial pressure value of pull-up resistor The corresponding bus transfer type of reading data type, it is corresponding to open then to the transmission control instruction of signal switching module Signal transmission passage makes external data reading device read the state in electronic apparatus system by corresponding signal transmission passage Information, especially in the system jam of electronic equipment, USB c-type interface message provided by the embodiment of the present invention is read Circuit, can be in the case where not dismantling electronic equipment mainboard, the quick and convenient status information for reading electronic apparatus system, in turn It may be implemented quickly to analyze the reason of electronic equipment breaks down, the significant increase efficiency of system reparation.
Optionally, control module 100 is used to obtain the partial pressure value of the generation of pull-up resistor 105, and belongs to first in partial pressure value When in voltage range, determine that the corresponding bus transfer type of reading data type is UART bus transfer type, in partial pressure value category When within the scope of second voltage, determine that the corresponding bus transfer type of reading data type is I2C bus transfer type.
Wherein, control module 100 may include the components such as comparator, the partial pressure of the pull-up resistor 105 for will acquire Value compared with first voltage range and second voltage range, judges whether the partial pressure value of pull-up resistor 105 falls in the first electricity respectively It presses within the scope of range or second voltage, and is issued and instructed to signal switching module 104 according to judging result, open corresponding letter Cease transmission channel.
Signal switching module 104 includes the first signal switching module 102 and second signal switching module 103.It is passed in bus When defeated type is UART bus transfer type, control module 100 issues the first control instruction to the first signal switching module 102, To indicate that the first signal switching module 102 opens UART bus transfer channel.It is I2C bus transfer type in bus transfer type When, control module 100 issues the second control instruction to second signal switching module 103, to indicate second signal switching module 103 Open I2C bus transfer channel.
Control module 100 includes that the first partial pressure test lead 1, second divides test lead 2, the 3, first electricity of first voltage upper limit end Pressure limit end 4, second voltage upper limit end 5, second voltage lower limit end 6, the first output end 7 and second output terminal 8.First signal is cut Changing the mold block 102 includes the first enable end 9, the first universal serial bus end 11, UART bus end 10 and third output end 12;Second Signal switching module 103 includes the second enable end 13, the second universal serial bus end 15, I2C bus end 14 and the 4th output end 16。
First partial pressure test lead 1 connects the first end 17 of pull-up resistor 105, and the second partial pressure test lead 2 connects pull-up resistor 105 second end 18;First voltage upper limit end 3, first voltage lower limit end 4, second voltage upper limit end 5 and second voltage lower limit end 6 connect with the mainboard of electronic equipment;First voltage upper limit end 3 is used to obtain the first voltage upper limit value of first voltage range, First voltage lower limit end 4 is used to obtain the first voltage lower limit value of first voltage range, and second voltage upper limit end 5 is for obtaining the The second voltage upper limit value of two voltage ranges, second voltage lower limit end 6 are used to obtain the second voltage lower limit of second voltage range Value.
First output end 7 is connect with the first enable end 9, and second output terminal 8 is connect with the second enable end 13, UART bus end 10 are connected by the central processor CPU of UART bus and electronic equipment;I2C bus end 14 passes through I2C bus and embedded control Device EC processed is connected;First universal serial bus end 11 and the second universal serial bus end 15 are by universal serial bus in Central processor CPU is connected;Third output end 12 and the 4th output end 16 are connected with USB c-type interface.
The first enable end 9 and the second enable end 13 of signal switching module 104 are exported according to control module 100 first respectively The control instruction at end 7 and second output terminal 8, opens corresponding signal transmission passage.
Illustratively, when it is UART bus transfer type that number, which reads the corresponding bus transfer type of type, control module 100 the first output end 7 exports high level, low level is otherwise exported, when the first enable end 9 of the first signal switching module 102 When receiving the high level signal of 100 first output end 7 of control module output, UART bus end 10 and third output end 12 connect Logical, UART information transfer channel is opened, and reads so as to which the status information in electronic equipment CPU is transferred to external data Equipment, when the first output end 7 exports low level, the first universal serial bus end 11 is connected to third output end 12, USB2.0 Information transfer channel is opened.When the corresponding bus transfer type of reading data type is I2C bus transfer type, mould is controlled The second output terminal 8 of block 100 exports high level, low level is otherwise exported, when the second enable end of second signal switching module 103 13 when receiving the high level signal of 100 second output terminal 8 of control module output, and I2C bus end 14 and the 4th output end 16 connect Logical, I2C information transfer channel is opened, and sets so as to which the status information in electronic equipment EC is transferred to external data reading Standby, when second output terminal 8 exports low level, the second universal serial bus end 15 is connected to the 4th output end 16, USB2.0 letter Breath transmission channel is opened.
The control module of USB c-type interface message reading circuit provided in an embodiment of the present invention is according to the partial pressure of pull-up resistor Value judges the corresponding bus transfer type of reading data type, and then indication signal switching module opens corresponding signal transmission Information in electronic equipment CPU or EC is transferred to external data reading device by channel.When electronic apparatus system breaks down When, using the information read circuit, the shape in CPU or EC can be quickly exported in the case where not tearing electronic equipment mainboard open State information carries out accident analysis, has been obviously improved the efficiency of system reparation.
Embodiment three
Fig. 3 is the schematic diagram of one of embodiment of the present invention three USB c-type interface message reading circuit, as shown in figure 3, Control module includes the first control module 200 and the second control module 201 in the present embodiment;Signal switching module includes the first letter Number switching module 202 and second signal switching module 203;
First control module 200 and the second control module 201 are used to obtain the partial pressure value of the generation of pull-up resistor 204, the One control module 200 determines the corresponding bus transfer type of reading data type when partial pressure value belongs in first voltage range For UART bus transfer type, the second control module 201 determines reading data class when partial pressure value belongs within the scope of second voltage The corresponding bus transfer type of type is I2C bus transfer type;First control module 200 is in the corresponding bus of reading data type When transport-type is UART bus transfer type, the first control instruction is issued to the first signal switching module 202, to indicate first Signal switching module 202 opens UART bus transfer channel;Second control module 201 is passed in the corresponding bus of reading data type When defeated type is I2C bus transfer type, the second control instruction is issued to second signal switching module 203, with the second letter of instruction Number switching module 203 opens I2C bus transfer channel.
First control module 200 includes that the first partial pressure test lead 1, second divides test lead 2, first voltage upper limit end 3, the One lower voltage limit end 4 and the first output end 9;
Second control module 201 includes third partial pressure test lead 5, the 4th partial pressure test lead 6, second voltage upper limit end 7, the Two lower voltage limit ends 8 and second output terminal 10;
First signal switching module 202 includes the first enable end 12, the first universal serial bus end 13, UART bus end 11 With third output end 14;First signal switching module 202 is total including the second enable end 16, the second universal serial bus end 17, I2C Line end 15 and the 4th output end 18;
First partial pressure test lead 1 connects the first end 19 of pull-up resistor 204, and the second partial pressure test lead 2 connects pull-up resistor 204 second end 20;Third divides the first end 19 that test lead 5 connects pull-up resistor 204, and the 4th partial pressure test lead 6 connects The second end 20 of pull-up resistor 204;
First voltage upper limit end 3, first voltage lower limit end 4, second voltage upper limit end 7 and second voltage lower limit end 8 with The mainboard of electronic equipment connects;First voltage upper limit end 3 is used to obtain the first voltage upper limit value of first voltage range, the first electricity Pressure limit end 4 is used to obtain the first voltage lower limit value of first voltage range, and second voltage upper limit end 7 is for obtaining second voltage The second voltage upper limit value of range, second voltage lower limit end 8 are used to obtain the second voltage lower limit value of second voltage range;
First output end 9 is connect with the first enable end 12, and second output terminal 10 is connect with the second enable end 16, UART bus End 11 is connected by the central processor CPU of UART bus and electronic equipment;I2C bus end 15 by I2C bus with it is embedded Controller EC is connected;First universal serial bus end 13 and the second universal serial bus end 17 by universal serial bus with Central processor CPU is connected;Third output end 14 and the 4th output end 18 are connected with USB c-type interface;
Illustratively, when it is UART bus transfer type that reading data type, which corresponds to bus transfer type, the first control First output end 9 of module 200 exports high level, otherwise exports low level, and first when the first signal switching module 202 is enabled When end 12 receives the high level signal of the output of the first output end of control module 9, UART bus end 11 and third output end 14 connect Logical, UART information transfer channel is opened, and reads so as to which the status information in electronic equipment CPU is transferred to external data Equipment, when the first output end 9 of the first control module 200 exports low level, the first universal serial bus end 13 and third output 14 connection of end, USB2.0 information transfer channel are opened.It is I2C bus transfer when reading data type corresponds to bus transfer type When type, the second output terminal 10 of the second control module 201 exports high level, otherwise exports low level, when second signal switches When second enable end 16 of module 203 receives the high level signal of the output of control module second output terminal 10, I2C bus end 15 It is connected to the 4th output end 18, I2C information transfer channel is opened, so as to transmit the status information in electronic equipment EC To external data reading device, when the second output terminal 10 of the second control module 201 exports low level, the first general serial is total Line end 17 is connected to the 4th output end 18, then USB2.0 information transfer channel is opened.
USB c-type interface message reading circuit provided in an embodiment of the present invention can pass through the partial pressure value of detection pull-up resistor Judge the corresponding bus transfer type of reading data type that external data reading device is chosen, and then can open and be passed with bus The corresponding signal transmission passage of defeated type.So USB c-type interface message reading circuit provided by the embodiment of the present invention can be with It is straight by external data reading device in the case where electronic apparatus system goes wrong such as blue screen or system failure The CPU for reading electronic equipment or the status information in EC are connect, finds out failure cause so as to analyze, therefore may not need and dismantle The mainboard of electronic equipment greatly improves the efficiency of system reparation, and new solution is provided for system reparation.
It should be noted that the USB c-type interface two sides due to electronic equipment is separately connected UART bus and I2C bus, Therefore need by the terminal on the USB c-type interface two sides of electronic equipment respectively with signal switching module different bus transport-type pair The output end connection answered.Optionally, the USB c-type interface message reading circuit of embodiment two and embodiment three can be done as follows Setting:
The USB c-type interface of electronic equipment includes opposite the first face and the second face, then the USB c-type that can be set connects The third output end of mouth information read circuit is connect with the terminal in the first face, and the 4th output end is connect with the terminal in the second face.
Note that the above is only a better embodiment of the present invention and the applied technical principle.It will be appreciated by those skilled in the art that The present invention is not limited to specific embodiments here, be able to carry out for a person skilled in the art it is various it is apparent variation, again Adjustment and substitution are without departing from protection scope of the present invention.Therefore, although by above embodiments to the present invention carried out compared with For detailed description, but the present invention is not limited to the above embodiments only, without departing from the inventive concept, can be with Including more other equivalent embodiments, and the scope of the invention is determined by the scope of the appended claims.

Claims (10)

1. a kind of USB c-type interface message read method characterized by comprising
External data reading device obtains reading data type and the reading of the external data according to reading data type adjustment is set The resistance value of pull down resistor in standby;
The control module of electronic equipment obtains the partial pressure value of pull-up resistor, and judges the reading data class by the partial pressure value The corresponding bus transfer type of type;Wherein, the pull-up resistor is located on the mainboard of the electronic equipment, and the external data is read After taking the USB c-type interface of equipment to connect with the USB c-type interface of the electronic equipment, the pull-up resistor and drop-down electricity Resistance series connection;
The control module issues control instruction to the signal switching module of the electronic equipment according to the bus transfer type, To indicate that the signal switching module opens signal transmission passage corresponding with the bus transfer type.
2. USB c-type interface message read method according to claim 1, which is characterized in that the reading data type Including central processor CPU data and embedded controller EC data;
The control module of the electronic equipment obtains the partial pressure value that pull-up resistor generates, and judges the number by the partial pressure value According to the corresponding bus transfer type of reading type, comprising:
The control module of electronic equipment obtains the partial pressure value that pull-up resistor generates, and belongs to first voltage range in the partial pressure value When interior, determine the corresponding bus transfer type of the reading data type for universal asynchronous receiving-transmitting transmitter UART bus transfer class Type determines that the corresponding bus transfer type of the reading data type is when the partial pressure value belongs within the scope of second voltage Bidirectional two-line synchronous serial bus I2C bus transfer type;
The control module issues control instruction to the signal switching module of the electronic equipment according to the bus transfer type, To indicate that the signal switching module opens signal transmission passage corresponding with the bus transfer type, comprising:
When the bus transfer type is UART bus transfer type, the control module switches mould to the signal of electronic equipment Block issues the first control instruction, to indicate that the signal switching module opens UART bus transfer channel;In the bus transfer When type is I2C bus transfer type, the control module issues the second control instruction to the signal switching module of electronic equipment, To indicate that the signal switching module opens I2C bus transfer channel.
3. USB c-type interface message read method according to claim 2, which is characterized in that further include:
After the USB c-type interface of the external data reading device is connect with the USB c-type interface of the electronic equipment, if described External data reading device does not receive the data of electronic equipment within the set time, and the external data reading device produces Raw turn-over inserts prompt again, with prompt user by after the USB c-type interface turn-over of the external data reading device with the electronics The USB c-type interface of equipment connects.
4. USB c-type interface message read method according to claim 2, which is characterized in that further include:
The control module of the electronic equipment is when the partial pressure value is equal to default usb protocol partial pressure value, the switching of Xiang Suoshu signal Module issues data transfer instruction, to indicate that the signal switching module opens universal serial bus transmission channel;It is described default When usb protocol partial pressure value does not adjust the resistance value of the pull down resistor equal to the external data reading device, the pull-up resistor Partial pressure value.
5. a kind of USB c-type interface message reading circuit characterized by comprising control module, signal switching module and pull-up Resistance;
The pull-up resistor is set on the mainboard of the electronic equipment;The USB c-type interface of external data reading device and institute After the USB c-type interface connection for stating electronic equipment, the pull down resistor in the pull-up resistor and the external data reading device Series connection;
The control module is used to obtain the partial pressure value that the pull-up resistor generates, and judges the outside by the partial pressure value The corresponding bus transfer type of reading data type that reading data equipment is chosen;
The control module is used to issue control instruction to the signal switching module according to the bus transfer type;The letter Number switching module opens signal transmission passage corresponding with the bus transfer type according to the control instruction.
6. USB c-type interface message reading circuit according to claim 5, which is characterized in that
The control module is used to obtain the partial pressure value that the pull-up resistor generates, and belongs to first voltage model in the partial pressure value When enclosing interior, the corresponding bus transfer type of the reading data type is determined for UART bus transfer type, in the partial pressure value When belonging within the scope of second voltage, determine the corresponding bus transfer type of the reading data type for I2C bus transfer type;
The signal switching module includes the first signal switching module and second signal switching module;
When the corresponding bus transfer type of reading data type is UART bus transfer type, the control module is to institute It states the first signal switching module and issues the first control instruction, to indicate that first signal switching module opens UART bus transfer Channel;
When it is I2C bus transfer type that the data class, which reads the corresponding bus transfer type of type, the control module to The second signal switching module issues the second control instruction, is passed with indicating that the second signal switching module opens I2C bus Defeated channel.
7. USB c-type interface message reading circuit according to claim 5, which is characterized in that the control module includes First control module and the second control module, the signal switching module include that the first signal switching module and second signal switch Module;
First control module and second control module are used to obtain the partial pressure value that the pull-up resistor generates;
When the partial pressure value belongs in first voltage range, first control module determines that the reading data type is corresponding Bus transfer type be UART bus transfer type;
When the partial pressure value belongs within the scope of second voltage, second control module determines that the reading data type is corresponding Bus transfer type be I2C bus transfer type;
When the bus transfer type is UART bus transfer type, first control module switches to first signal Module issues the first control instruction, to indicate that first signal switching module opens UART bus transfer channel;
When the bus transfer type is I2C bus transfer type, second control module switches to the second signal Module issues the second control instruction, to indicate that the second signal switching module opens I2C bus transfer channel.
8. USB c-type interface message reading circuit according to claim 6, which is characterized in that the control module includes First partial pressure test lead, the second partial pressure test lead, first voltage upper limit end, first voltage lower limit end, second voltage upper limit end, the Two lower voltage limit ends, the first output end and second output terminal;
First signal switching module includes that the first enable end, the first universal serial bus end, UART bus end and third are defeated Outlet;The second signal switching module includes that the second enable end, the second universal serial bus end, I2C bus end and the 4th are defeated Outlet;
The first partial pressure test lead connects the first end of the pull-up resistor, and the second partial pressure test lead connects the pull-up The second end of resistance;First voltage upper limit end, first voltage lower limit end, second voltage upper limit end and described Two lower voltage limit ends are connect with the mainboard of the electronic equipment;First voltage upper limit end is for obtaining first voltage range First voltage upper limit value, first voltage lower limit end is used to obtain the first voltage lower limit value of first voltage range, described Second voltage upper limit end is used to obtain the second voltage upper limit value of second voltage range, and second voltage lower limit end is for obtaining The second voltage lower limit value of second voltage range;
First output end is connect with the first enable end, and the second output terminal is connect with second enable end, described UART bus end is connect by UART bus with the central processor CPU of the electronic equipment;The I2C bus end passes through I2C Bus is connected with embedded controller EC;First universal serial bus end and second universal serial bus end are logical Universal serial bus is crossed to be connected with central processor CPU;The third output end and the 4th output end with the electricity The USB c-type interface of sub- equipment is connected.
9. USB c-type interface message reading circuit according to claim 7, which is characterized in that first control module Including the first partial pressure test lead, the second partial pressure test lead, first voltage upper limit end, first voltage lower limit end and the first output end;
Second control module includes third partial pressure test lead, the 4th partial pressure test lead, second voltage upper limit end, second voltage Lower limit end and second output terminal;
First signal switching module includes that the first enable end, the first universal serial bus end, UART bus end and third are defeated Outlet;First signal switching module includes that the second enable end, the second universal serial bus end, I2C bus end and the 4th are defeated Outlet;
The first partial pressure test lead connects the first end of the pull-up resistor, and the second partial pressure test lead connects the pull-up The second end of resistance;The third partial pressure test lead connects the first end of the pull-up resistor, and the 4th partial pressure test lead connects Connect the second end of the pull-up resistor;
Under first voltage upper limit end, first voltage lower limit end, second voltage upper limit end and the second voltage Limit end is connect with the mainboard of the electronic equipment;First voltage upper limit end is used to obtain the first electricity of first voltage range Upper limit value is pressed, first voltage lower limit end is used to obtain the first voltage lower limit value of first voltage range, the second voltage Upper limit end is used to obtain the second voltage upper limit value of second voltage range, and second voltage lower limit end is for obtaining second voltage The second voltage lower limit value of range;
First output end is connect with the first enable end, and the second output terminal is connect with second enable end, described UART bus end is connect by UART bus with the central processor CPU of the electronic equipment;The I2C bus end passes through I2C Bus is connected with embedded controller EC;First universal serial bus end and second universal serial bus end are logical Universal serial bus is crossed to be connected with central processor CPU;The third output end and the 4th output end with the electricity The USB c-type interface of sub- equipment is connected.
10. USB c-type interface message reading circuit according to claim 8 or claim 9, which is characterized in that the electronic equipment USB c-type interface include opposite the first face and the second face, the third output end is connect with the terminal in first face;Institute The 4th output end is stated to connect with the terminal in second face.
CN201910280618.0A 2019-04-09 2019-04-09 USB C-type interface information reading method and information reading circuit Active CN109992551B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910280618.0A CN109992551B (en) 2019-04-09 2019-04-09 USB C-type interface information reading method and information reading circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910280618.0A CN109992551B (en) 2019-04-09 2019-04-09 USB C-type interface information reading method and information reading circuit

Publications (2)

Publication Number Publication Date
CN109992551A true CN109992551A (en) 2019-07-09
CN109992551B CN109992551B (en) 2021-10-26

Family

ID=67132572

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910280618.0A Active CN109992551B (en) 2019-04-09 2019-04-09 USB C-type interface information reading method and information reading circuit

Country Status (1)

Country Link
CN (1) CN109992551B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110825591A (en) * 2019-10-28 2020-02-21 闻泰通讯股份有限公司 System information reading method, reading device and electronic equipment
CN115223310A (en) * 2022-06-30 2022-10-21 无锡睿勤科技有限公司 OTG priority selection circuit and multichannel charging circuit

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5581197A (en) * 1995-05-31 1996-12-03 Hewlett-Packard Co. Method of programming a desired source resistance for a driver stage
CN102184134A (en) * 2010-06-22 2011-09-14 上海盈方微电子有限公司 System-on-chip performance analyzer
CN103064489A (en) * 2011-10-21 2013-04-24 华为终端有限公司 Method for selecting internal circuit according to conditions of universal serial bus (USB) interface and terminal
CN103198033A (en) * 2012-01-06 2013-07-10 联阳半导体股份有限公司 Apparatus and method of identifying a USB or an MHL device
CN105321555A (en) * 2014-06-27 2016-02-10 台湾积体电路制造股份有限公司 Memory chip and layout design for manufacturing same
CN106445858A (en) * 2015-08-13 2017-02-22 联想(北京)有限公司 Information processing method, information processing module and electronic device
CN106556752A (en) * 2015-09-25 2017-04-05 鸿富锦精密工业(武汉)有限公司 GPIO interface circuit for detecting
US20170351638A1 (en) * 2016-06-03 2017-12-07 Delta Electronics, Inc. Usb type-c adapter module and activating method for the same
EP3364267A1 (en) * 2017-02-16 2018-08-22 Astronics Advanced Electronic Systems Corp. Control of temperature in a usb type c source through re-negotiation of power delivery object
CN108491343A (en) * 2018-02-11 2018-09-04 广州视源电子科技股份有限公司 Terminal device, data transmission system and method
US20180276178A1 (en) * 2017-03-24 2018-09-27 Samsung Electronics Co., Ltd. Electronic device and method for controlling external electronic device connected to usb type-c connector
CN208271000U (en) * 2018-06-27 2018-12-21 南京朴厚生态科技有限公司 A kind of data collecting instrument equipment being able to carry out customization
CN109376040A (en) * 2018-09-12 2019-02-22 普联技术有限公司 A kind of Type-C interface detection method, device and system

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5581197A (en) * 1995-05-31 1996-12-03 Hewlett-Packard Co. Method of programming a desired source resistance for a driver stage
CN102184134A (en) * 2010-06-22 2011-09-14 上海盈方微电子有限公司 System-on-chip performance analyzer
CN103064489A (en) * 2011-10-21 2013-04-24 华为终端有限公司 Method for selecting internal circuit according to conditions of universal serial bus (USB) interface and terminal
CN103198033A (en) * 2012-01-06 2013-07-10 联阳半导体股份有限公司 Apparatus and method of identifying a USB or an MHL device
CN105321555A (en) * 2014-06-27 2016-02-10 台湾积体电路制造股份有限公司 Memory chip and layout design for manufacturing same
CN106445858A (en) * 2015-08-13 2017-02-22 联想(北京)有限公司 Information processing method, information processing module and electronic device
CN106556752A (en) * 2015-09-25 2017-04-05 鸿富锦精密工业(武汉)有限公司 GPIO interface circuit for detecting
US20170351638A1 (en) * 2016-06-03 2017-12-07 Delta Electronics, Inc. Usb type-c adapter module and activating method for the same
EP3364267A1 (en) * 2017-02-16 2018-08-22 Astronics Advanced Electronic Systems Corp. Control of temperature in a usb type c source through re-negotiation of power delivery object
US20180276178A1 (en) * 2017-03-24 2018-09-27 Samsung Electronics Co., Ltd. Electronic device and method for controlling external electronic device connected to usb type-c connector
CN108491343A (en) * 2018-02-11 2018-09-04 广州视源电子科技股份有限公司 Terminal device, data transmission system and method
CN208271000U (en) * 2018-06-27 2018-12-21 南京朴厚生态科技有限公司 A kind of data collecting instrument equipment being able to carry out customization
CN109376040A (en) * 2018-09-12 2019-02-22 普联技术有限公司 A kind of Type-C interface detection method, device and system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110825591A (en) * 2019-10-28 2020-02-21 闻泰通讯股份有限公司 System information reading method, reading device and electronic equipment
CN110825591B (en) * 2019-10-28 2023-05-26 闻泰通讯股份有限公司 System information reading method, reading device and electronic equipment
CN115223310A (en) * 2022-06-30 2022-10-21 无锡睿勤科技有限公司 OTG priority selection circuit and multichannel charging circuit

Also Published As

Publication number Publication date
CN109992551B (en) 2021-10-26

Similar Documents

Publication Publication Date Title
US7765344B2 (en) Apparatus and method for dynamically providing hub or host operations
US8234086B2 (en) Detection of multiple powered devices connected to an inline power delivery channel
EP2584471A1 (en) Method and terminal for selecting internal circuit according to USB interface status
CN208538116U (en) Test macro and interface test device
CN101452051B (en) Data processing device and method
CN102054370B (en) USB (universal serial bus) cable controller and electronic reading device using same
CN109992551A (en) USB c-type interface message read method and information read circuit
CN103198033A (en) Apparatus and method of identifying a USB or an MHL device
CN103558907B (en) Electronic device and method for reducing power consumption of electronic device
CN102854417B (en) Master test board and testing method thereof
US7707336B2 (en) Universal serial bus (USB) system with single port and host controller thereof
CN112948186B (en) Detection device and detection method of interface signal
CN115904849B (en) PCIE link signal testing method, system, computer equipment and medium
CN112505393A (en) Electric vehicle instrument signal detection method and system
CN204256725U (en) A kind of pick-up unit
CN105137965A (en) Detection method and apparatus for multichannel igniting control system
US20130096859A1 (en) Resistance determining system
CN114069801A (en) Quick charging connection circuit, quick charging connection device and charging control method
CN211827247U (en) PCIE SSD opens card tool
CN110943888B (en) Convenient full-function serial port detection method and device
TW201447564A (en) Device for testing a graphics card
CN114443385A (en) Multi-interface testing device and server system
CN114490206A (en) Interface performance test method and system
CN108152625B (en) Efficient general Sensor function detection system and algorithm for self-capacitance capacitive screen
CN106451617A (en) Electronic device and charging method thereof

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
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20211228

Address after: 710086 Building 1, fengdongwangcheng, Fengdong new town, Xi'an City, Shaanxi Province

Patentee after: Xi'an Wentai Information Technology Co.,Ltd.

Address before: 2000 000 4-6 Floor, Building No. 188, Pingfu Road, Xuhui District, Shanghai

Patentee before: SHANGHAI WINGTECH INFORMATION TECHNOLOGY Co.,Ltd.