WO2018094894A1 - 一种即插即用设备的检测电路、检测方法及终端 - Google Patents
一种即插即用设备的检测电路、检测方法及终端 Download PDFInfo
- Publication number
- WO2018094894A1 WO2018094894A1 PCT/CN2017/074988 CN2017074988W WO2018094894A1 WO 2018094894 A1 WO2018094894 A1 WO 2018094894A1 CN 2017074988 W CN2017074988 W CN 2017074988W WO 2018094894 A1 WO2018094894 A1 WO 2018094894A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- voltage
- detecting
- detection
- external device
- resistor
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/40—Bus structure
- G06F13/4063—Device-to-bus coupling
- G06F13/4068—Electrical coupling
- G06F13/4081—Live connection to bus, e.g. hot-plugging
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01R—MEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
- G01R19/00—Arrangements for measuring currents or voltages or for indicating presence or sign thereof
- G01R19/165—Indicating that current or voltage is either above or below a predetermined value or within or outside a predetermined range of values
- G01R19/16528—Indicating that current or voltage is either above or below a predetermined value or within or outside a predetermined range of values using digital techniques or performing arithmetic operations
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/42—Bus transfer protocol, e.g. handshake; Synchronisation
- G06F13/4282—Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
- G06F13/4295—Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus using an embedded synchronisation
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01R—MEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
- G01R15/00—Details of measuring arrangements of the types provided for in groups G01R17/00 - G01R29/00, G01R33/00 - G01R33/26 or G01R35/00
- G01R15/04—Voltage dividers
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01R—MEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
- G01R19/00—Arrangements for measuring currents or voltages or for indicating presence or sign thereof
- G01R19/165—Indicating that current or voltage is either above or below a predetermined value or within or outside a predetermined range of values
- G01R19/16566—Circuits and arrangements for comparing voltage or current with one or several thresholds and for indicating the result not covered by subgroups G01R19/16504, G01R19/16528, G01R19/16533
- G01R19/16576—Circuits and arrangements for comparing voltage or current with one or several thresholds and for indicating the result not covered by subgroups G01R19/16504, G01R19/16528, G01R19/16533 comparing DC or AC voltage with one threshold
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F1/00—Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
- G06F1/26—Power supply means, e.g. regulation thereof
- G06F1/266—Arrangements to supply power to external peripherals either directly from the computer or under computer control, e.g. supply of power through the communication port, computer controlled power-strips
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F1/00—Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
- G06F1/26—Power supply means, e.g. regulation thereof
- G06F1/28—Supervision thereof, e.g. detecting power-supply failure by out of limits supervision
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Definitions
- the present application relates to the field of circuit technologies, and in particular, to a detection circuit, a detection method, and a terminal of a plug and play device.
- OTG On-The-Go
- PC personal computer
- the OTG device can be a PC, a mobile phone, a mobile hard disk, a printer, a USB flash drive, or the like.
- one OTG device serves as a host for controlling the data transmission and reception process between the two OTG devices, and the other OTG device is used to perform transmission and reception commands with the OTG device as the host.
- the OTG device as a host is generally a device having a Universal Serial Bus (USB) master, such as a PC, a mobile phone, a mobile hard disk, a printer, or the like.
- USB Universal Serial Bus
- the host needs to detect whether the external device is an OTG device.
- a scheme for detecting whether an external device is an OTG device can be as shown in FIG.
- the detecting chip is a chip in the host for detecting whether the external device is an OTG device and controlling a data transmission and receiving process between the two OTG devices, and the designated pin in the detecting chip is used to detect whether the external device is an OTG.
- the pin of the device is the interface on the host for connecting to the external device.
- the current source inside the detection chip generates a current, and the current is injected into the detection terminal through a designated pin.
- the test chip detects the voltage at the specified pin by its own integrated comparator.
- the voltage at the specified pin is less than the preset voltage threshold, that is, the resistance of the external device is less than the preset resistance threshold, it is determined that the external device is an OTG device.
- the detection chip in the host is the PMI 8952
- the designated pin is the USB_PHY_ID pin
- the detection terminal is the USB_ID interface
- the structure of the detection circuit can be as shown in FIG. 2, where R is the equivalent resistance of the external device.
- the PMI8952 injects 51uA into the USB_ID interface via the USB_PHY_ID pin, and then detects the voltage of the USB_PHY_ID pin through the PMI8952's integrated comparator.
- the voltage of the USB_PHY_ID pin is greater than 1V, R is less than 19k ⁇ (1V/).
- PMI8952 determines that the external device is an OTG device.
- the above method for detecting whether an external device is an OTG device has the following problem: a plurality of current sources exist inside the detecting chip (such as PMI 8952 in FIG. 2), and different currents can be generated when the detecting chip is used for different purposes.
- a plurality of current sources inside the detecting chip are polled and switched, so that the detecting chip polls and outputs different currents. Therefore, when detecting whether the external device is an OTG device by the detecting chip, the current value of the current injected into the USB_ID interface by the detecting chip through the USB_PHY_ID pin may cause an inaccurate current value due to the polling switching of the current source. In turn, the accuracy of the detection result of the detection circuit is affected.
- the embodiment of the present application provides a detection circuit, a detection method, and a terminal of a plug-and-play device, which are used to solve the problem that the detection result of the existing OTG device detection solution is inaccurate.
- the present application provides a detection circuit of an OTG device, where the detection circuit includes a detection unit, a detection end, and a detection chip.
- the detecting unit includes a voltage source for generating a first voltage, and the detecting unit includes a first resistor for dividing the first voltage to obtain a second voltage, and the detecting end is connected to the external device and the detecting unit for providing
- the detection circuit is connected to the external device; the detection chip is connected to the first resistor, and is configured to determine that the external device is an OTG device when the second voltage is less than the set voltage.
- the detecting chip can also be used to determine that the external device connected to the detecting end is not an OTG device when the second voltage is greater than or equal to the set voltage.
- the first resistor included in the detecting unit divides the first voltage generated by the voltage source to obtain a second voltage, and the detecting chip determines that the external device is when the second voltage is less than the set voltage.
- the detection circuit provided by the first aspect is used to detect whether the external device is an OTG device, and the stability of the first voltage generated by the voltage source is compared with the prior art by detecting the output current of the chip to detect whether the external device is an OTG device.
- the detection chip is more accurate when the second voltage obtained by dividing the first voltage according to the first resistance determines whether the external device is an OTG device. Therefore, the detection result provided by the detection circuit provided by the first aspect is more accurate when the external device is detected by the OTG device.
- the detection chip can also be used to output a set current, wherein the set current of the output is less than the current flowing through the first resistor.
- the set current is smaller than the current flowing through the first resistor, it is possible to avoid an inaccurate detection result caused by the detection chip outputting the set current by the polling switching method.
- the greater the difference between the current flowing through the first resistor and the set current the smaller the influence of the set current on the detection result, and the more accurate the detection result of the detecting circuit.
- the detection threshold of the detection circuit can be changed by setting the value of the first voltage, the first resistance or the set current.
- the detection chip determines that the external device is an OTG device. .
- the detecting unit may further include a second resistor connected to the first resistor and the detecting chip, and the second resistor is configured to divide the second voltage.
- the detection threshold of the detecting circuit can be changed by adjusting the resistance value of the second resistor, thereby effectively preventing the problem of misidentification caused by the interface of the detecting end, and reducing the site of the OTG device where the detecting circuit is located.
- Field Failure Rate (FFR) Field Failure Rate
- the present application provides a terminal comprising the detection circuit provided in the above first aspect or any of its possible designs.
- the first resistor included in the detecting unit divides the first voltage generated by the voltage source to obtain a second voltage, and the detecting chip determines that the external device is an OTG when the second voltage is less than the set voltage. device.
- the terminal provided by the second aspect is used to detect whether the external device is an OTG device.
- the detection chip is more accurate when the second voltage obtained by dividing the first voltage according to the first resistance determines whether the external device is an OTG device. Therefore, the terminal provided by the second aspect is connected to the external device. Whether the test results for the OTG device are more accurate.
- the present application provides a method for detecting an OTG device, the method comprising the steps of: detecting a voltage source included in a detecting unit in a circuit to generate a first voltage, and detecting, by a first resistor, a voltage dividing the first voltage The second voltage is obtained; the detecting end of the detecting circuit provides a connection interface between the detecting circuit and the external device; and the detecting chip in the detecting circuit determines that the external device is an OTG device when the second voltage is less than the set voltage.
- the detecting chip can also determine that the external device is not an OTG device when the second voltage is greater than or equal to the set voltage.
- the first resistor included in the detecting unit of the detecting circuit divides the first voltage generated by the voltage source to obtain a second voltage, and the detecting chip in the detecting circuit is at the second voltage.
- the detecting method provided by the third aspect is used to detect whether the external device connected to the detecting circuit is an OTG device, and the method of detecting whether the external device is an OTG device by detecting the output current of the chip in the prior art is compared with the solution generated by the voltage source.
- the stability of a voltage is good. Therefore, when the second voltage obtained by dividing the first voltage by the first resistor determines whether the external device is an OTG device, the detection result is more accurate. Therefore, the detection method provided by the third aspect is more accurate when detecting whether the external device is an OTG device.
- the detection chip can also output a set current to the detection unit, and the set current output is smaller than the current flowing through the first resistor.
- the set current is smaller than the current flowing through the first resistor, it is possible to avoid an inaccurate detection result caused by the detection chip outputting the set current by the polling switching method.
- the greater the difference between the current flowing through the first resistor and the set current the smaller the influence of the set current on the detection result, and the more accurate the detection result of the detecting circuit.
- the detection threshold of the detection circuit can be changed by setting the value of the first voltage, the first resistance or the set current.
- the detection chip determines that the external device is an OTG device. .
- the second resistor included in the detecting unit can divide the second voltage.
- the second voltage is divided by the second resistor in the detecting unit, thereby reducing the magnitude of the current flowing from the voltage source to the external device, thereby avoiding excessive leakage current in the OTG device where the detecting circuit is connected when the external device is connected.
- the detection threshold of the detecting circuit can be changed by adjusting the resistance value of the second resistor, thereby effectively preventing the problem of misidentification caused by the interface of the detecting end, and reducing the FFR of the OTG device where the detecting circuit is located.
- FIG. 1 is a schematic diagram of a solution for detecting whether an external device is an OTG device according to the prior art
- FIG. 2 is a schematic circuit diagram of a solution for detecting whether an external device is an OTG device according to the prior art
- FIG. 3 is a schematic structural diagram of a detection circuit of an OTG device according to an embodiment of the present disclosure
- FIG. 4 is a schematic structural diagram of a detection circuit of another OTG device according to an embodiment of the present disclosure.
- FIG. 5 is a schematic flowchart of a method for detecting an OTG device according to an embodiment of the present disclosure.
- the present application relates to detecting, by a detection circuit of an OTG device, whether an external device connected to the detection circuit is an OTG device.
- the detection circuit can be placed in an OTG device as a host, and the OTG device as a host can adopt the The detection circuit detects whether the external device connected to itself is an OTG device.
- the detecting chip can generate different magnitudes of current when used for different purposes, and different magnitudes of current are output by polling switching.
- the PMI8952 can generate four different currents of 6uA, 11uA, 20uA, and 51uA.
- the currents of four different sizes are output by polling switching in the order of 6uA ⁇ 11uA ⁇ 20uA ⁇ 51uA.
- the PMI8952 detects whether the external device connected to itself is an OTG device
- the PMI8952 outputs 51uA current to the USB_ID interface through the USB_PHY_ID pin, and then the PMI8952 detects the voltage at the USB_PHY_ID pin through the internal integrated comparator.
- the voltage at the USB_PHY_ID pin is less than 1V, that is, the resistance of the external device is less than 19k ⁇ (1V/51uA ⁇ 19k ⁇ )
- the embodiment of the present invention provides a detection circuit, a detection method, and a terminal of an OTG device, which are used to solve the problem that the detection result of the existing OTG device detection solution is inaccurate.
- the detection method and the detection circuit are based on the same inventive concept. Since the detection method and the detection circuit solve the problem are similar in principle, the implementation of the detection circuit and the detection method can be referred to each other, and the repeated description is not repeated.
- the detection circuit 300 (hereinafter referred to as “detection circuit 300") of the OTG device includes a detection unit 301, a detection end 302, and a detection chip 303.
- the detecting unit 301 includes a voltage source 301a and a first resistor 301b connected in series.
- the voltage source 301a is used to generate a first voltage
- the first resistor 301b is used to divide the first voltage to obtain a second voltage.
- the detecting end 302 is connected to the external device and the detecting unit 301, and the detecting end 302 is configured to provide a connection interface between the detecting circuit 300 and the external device.
- the detecting chip 303 is connected to the first resistor 301b, and is configured to determine that the external device connected to the detecting end is an OTG device when the second voltage is less than the set voltage.
- the voltage source 301a is a voltage source configured to stably output the first voltage outside the detecting chip 303.
- the "external connection" in the external device is for the OTG device where the detection circuit 300 is located.
- the OTG device where the detection circuit 300 is located is a mobile phone
- the external device is a device connected to the mobile phone through the USB interface of the mobile phone.
- the detecting chip 303 can also be used to determine that the external device connected to the detecting end is not an OTG device when the second voltage is greater than or equal to the set voltage.
- the voltage source 301a can be selected from a Low Dropout Regulator (LDO).
- LDO Low Dropout Regulator
- the stability of the LDO output voltage is good, which can improve the accuracy of the test results.
- the detecting end 302 is configured to provide a connection interface between the detecting circuit 300 and the external device, and the detecting end 302 may be a USB interface of the OTG device where the detecting circuit 300 is located.
- the first resistor 301b included in the detecting unit 301 divides the first voltage generated by the voltage source 301a to obtain a second voltage, and the detecting chip 303 when the second voltage is less than the set voltage. , to determine that the external device is an OTG device.
- the detecting circuit 300 provided by the present application detects whether the external device connected to the detecting terminal 302 is an OTG device, compared with the prior art, in which the external device is detected as an OTG device by detecting the output current of the chip, due to the voltage source 301a.
- the stability of the first voltage is good.
- the second voltage detection external device obtained by dividing the first voltage by the first resistor 301b detects whether the external device is an OTG device, the detection result is more accurate. Therefore, the detection result when the detection circuit 300 provided by the application is external to the OTG device is more accurate.
- the first voltage is 1.8V
- the first resistance is 1k ⁇
- the set voltage is 1V
- the first voltage of 1.8V is divided by the first resistor and the second voltage is less than the set voltage of 1V.
- the detecting chip 303 that is, the external device connected to the detecting end 302 is determined to be an OTG device.
- the detection circuit 300 when the detection circuit 300 provided by the present application detects whether the external device is an OTG device, since the first voltage and the first resistance can be changed, when the external device is detected, the first voltage and/or may be set. Or a first resistor to control the detection threshold Rt of the detection circuit 300.
- the detecting terminal 302 is a USB interface
- the dirt of the USB interface may cause the USB_ID to be short-circuited (resistance value is about several thousand ohms to several tens of kilo ohms).
- the detection circuit 300 may mistakenly identify the dirtyness of the USB interface as an OTG device, causing misidentification.
- the detection threshold Rt of the detection circuit 300 can be changed by changing the first voltage and/or the first resistance in the detection circuit 300, thereby avoiding the above-mentioned misidentification.
- the detecting chip 303 can also output a set current, wherein the set current is smaller than the current flowing through the first resistor 301b.
- the detection chip 303 still outputs the set current by means of polling switching, but since the set current is smaller than the current flowing through the first resistor 301b, the detection chip 303 can be prevented from adopting the polling switching mode.
- the detection result caused by the output current is not accurate. The larger the difference between the current flowing through the first resistor 301b and the set current is, the smaller the influence of the set current on the detection result is, and the more accurate the detection result of the detecting circuit 300 is.
- the magnitude of the set current also affects the detection threshold Rt of the detection circuit 300.
- the detection threshold Rt of the detection circuit 300 is increased as compared with the case where the detection chip 303 does not output the set current. Therefore, with the above implementation, the detection threshold Rt of the detection circuit 300 can be changed by changing the magnitude of the first voltage, the first resistance, or the set current.
- the detecting unit 301 can further include a second resistor connected to the first resistor 301b and the detecting chip 303 for dividing the second voltage.
- the second resistor in the detecting unit 301 By adding the second resistor in the detecting unit 301, the magnitude of the current flowing from the voltage source 301a to the external device is reduced, thereby avoiding excessive leakage current in the OTG device where the detecting circuit 300 is located when the external device is connected, and preventing the power from being discharged. Too fast to consume.
- the detection threshold Rt of the detecting circuit 300 can be changed by adjusting the resistance value of the second resistor, thereby effectively preventing the problem of misidentification caused by the interface of the detecting end 302, and reducing the problem.
- the FFR of the OTG device in which the detection circuit 300 is located The FFR of the OTG device in which the detection circuit 300 is located.
- the voltage source 301a is generated.
- a large leakage current causes an increase in power consumption of the entire detection circuit; if the resistances of the first resistor and the second resistor are both too large, the current of the voltage source 301a is too small, even smaller than the setting of the output of the detection chip 303. Current, which in turn affects the accuracy of the test results.
- the selection of the first resistor and the second resistor can be selected empirically.
- the present application also provides a detection circuit of the OTG device as shown in FIG. 4.
- the detection circuit can be regarded as a specific implementation of the detection circuit 300 of the OTG device shown in FIG.
- PMI8952 is the detection chip
- LDO5 is the voltage source
- R1 and R2 are the first resistor and the second resistor respectively
- PMI8952 is connected to R1 and R2 through the USB_PHY_ID pin
- USB_ID is the detection terminal
- the first voltage generated by the voltage source LDO5 is 1.8V
- R1 1.8k ⁇
- R2 820 ⁇ .
- the detection circuit of the OTG device provided by the present application is used to detect whether the external device connected to the detection end is an OTG device, the accuracy of the detection result can be improved, and the OTG device can be prevented from being misidentified, and the OTG where the detection circuit is located can be reduced. FFR of the device.
- the present application further provides a terminal including the detection circuit 300 shown in FIG.
- the terminal may be a mobile phone, a personal computer (PC), a personal tablet computer, a digital camera, a printer, and the like.
- the terminal can be used to detect whether the external device connected to the terminal is an OTG device.
- OTG device For the specific implementation, refer to the related description in the detecting circuit 300 shown in FIG.
- the present application further provides a detection method of an OTG device, and an execution body of the detection method can be regarded as the detection circuit 300 shown in FIG. 3.
- the detecting circuit 300 can detect whether the external device connected to itself is an OTG device by performing the method. As shown in FIG. 5, the method includes the following steps:
- the voltage source included in the detecting unit in the detecting circuit generates a first voltage
- the detecting unit includes a first resistor that divides the first voltage to obtain a second voltage.
- the detecting end in the detecting circuit provides a connection interface between the detecting circuit and the external device;
- S503 The detecting chip in the detecting circuit determines that the external device is an OTG device when the second voltage is less than the set voltage.
- the method further includes: the detecting chip outputs the set current to the detecting unit, wherein the set current is less than the current flowing through the first resistor.
- the method further includes: the second resistor included in the detecting unit divides the second voltage.
- the method further includes: detecting that the external device is not an OTG device when the second voltage is greater than or equal to the set voltage.
- the first resistor included in the detecting unit of the detecting circuit divides the first voltage generated by the voltage source to obtain a second voltage, and the detecting chip in the detecting circuit is at the second voltage.
- the detection method provided by the present application to detect whether the external device connected to the detection circuit is an OTG device, compared with the prior art, by detecting the output current of the chip to detect whether the external device is an OTG device, the first one is generated by the voltage source. The stability of the voltage is good.
- the detection result is more accurate. Therefore, it is more accurate to detect whether the external device is an OTG device by using the detection method provided by the present application.
- the method shown in FIG. 5 can be regarded as a method used by the detecting circuit 300 shown in FIG. 3 to detect whether an external device connected to itself is an OTG device, and thus an implementation method not explained and described in detail in the method shown in FIG. Reference may be made to the related description in the detecting circuit 300 shown in FIG.
- the detection circuit, the detection method, and the terminal of the OTG device provided by the present application are compared with the prior art, by detecting the output current of the chip to detect whether the external device is an OTG device, the first voltage generated by the voltage source.
- the stability is better. Therefore, when the second voltage obtained by dividing the first voltage by the first resistor determines whether the external device is an OTG device, the detection result is more accurate. Therefore, the detection circuit, the detection method, and the detection result of the OTG device provided by the present application are more accurate when the external device is detected by the OTG device.
- embodiments of the present application can be provided as a method, system, or computer program product.
- the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment in combination of software and hardware.
- the application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
- the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
- the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
- These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
- the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Computer Hardware Design (AREA)
- Power Engineering (AREA)
- Measurement Of Current Or Voltage (AREA)
- Tests Of Electronic Circuits (AREA)
- Semiconductor Integrated Circuits (AREA)
Abstract
一种即插即用设备的检测电路、检测方法及终端,用以解决现有的OTG设备检测方案存在的检测结果不准确的问题。检测电路包括:检测单元、检测端和检测芯片。其中,检测单元包含串联的电压源和第一电阻,电压源用于产生第一电压,第一电阻用于对第一电压进行分压,得到第二电压;检测端与外接设备和检测单元连接,用于提供检测电路与外接设备的连接接口;检测芯片与第一电阻连接,用于在第二电压小于设定电压时,判断外接设备为OTG设备。
Description
本申请要求2016年11月23日提交中国专利局、申请号为201611038369.7、发明名称为“一种即插即用OTG的识别方法和设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请文件中。仅仅是为了简洁表述,其全部内容不在本申请文件中再原文重复一遍。
本申请涉及电路技术领域,尤其涉及一种即插即用设备的检测电路、检测方法及终端。
近年来,即插即用(On-The-Go,OTG)设备的应用越来越广泛,两个OTG设备间可以在脱离个人电脑(PersonalComputer,PC)的情况下直接进行数据传输,从而使得设备间的数据交换更为简单、快捷。OTG设备可以是PC、手机、移动硬盘、打印机,USB闪存盘等。在进行数据交换的两个OTG设备中,一个OTG设备作为主机,用于控制两个OTG设备间的数据发送和接收过程,另一个OTG设备用于配合作为主机的OTG设备执行发送和接收指令。
作为主机的OTG设备一般为具有通用串行总线(Universal Serial Bus,USB)主控器的设备,例如PC、手机、移动硬盘、打印机等。当某个外接设备与作为主机的OTG设备连接时,主机需要检测该外接设备是否为OTG设备。一种检测外接设备是否为OTG设备的方案可如图1所示。图1中,检测芯片为主机中用于检测外接设备是否为OTG设备以及控制两个OTG设备间的数据发送和接收过程的芯片,检测芯片中的指定管脚为用于检测外接设备是否为OTG设备的管脚,检测端为主机上用于连接外接设备的接口。检测芯片内部的电流源产生电流,并通过指定管脚向检测端灌入该电流。然后检测芯片通过自身集成的比较器检测指定管脚处的电压。当指定管脚处的电压小于预设的电压阈值时,即外接设备的电阻小于预设的电阻阈值时,判定该外接设备为OTG设备。比如,当主机中的检测芯片为PMI8952、指定管脚为USB_PHY_ID管脚,且检测端为USB_ID接口时,检测电路的结构可如图2所示,其中R为外接设备的等效电阻。在图2中,PMI8952通过USB_PHY_ID管脚向USB_ID接口灌入51uA的电流,然后通过PMI8952内部集成的比较器检测USB_PHY_ID管脚的电压,当USB_PHY_ID管脚的电压大于1V,即R小于19kΩ(1V/51uA≈19kΩ)时,PMI8952判定该外接设备为OTG设备。
上述检测外接设备是否为OTG设备的方法存在如下问题:检测芯片(比如图2中的PMI8952)内部存在多个电流源,在检测芯片用作不同用途时,可以产生不同大小的电流。检测芯片内部的多个电流源会采用轮询切换的方式,实现检测芯片轮询输出不同大小的电流。因此,在通过检测芯片检测外接设备是否为OTG设备时,检测芯片通过USB_PHY_ID管脚向USB_ID接口灌入的电流的电流值会由于电流源的轮询切换而出现灌入电流值不准确的现象,进而影响检测电路的检测结果的准确性。
综上,现有技术中,检测外接设备是否为OTG设备的方案存在检测结果不准确的问题。
发明内容
本申请实施例提供了一种即插即用设备的检测电路、检测方法及终端,用以解决现有的OTG设备检测方案存在的检测结果不准确的问题。
第一方面,本申请提供一种OTG设备的检测电路,该检测电路包括检测单元、检测端和检测芯片。其中,检测单元包含的电压源用于产生第一电压,检测单元包含的第一电阻用于对第一电压进行分压,得到第二电压;检测端与外接设备和检测单元连接,用于提供检测电路与外接设备的连接接口;检测芯片与第一电阻连接,用于在第二电压小于设定电压时,判断外接设备为OTG设备。
此外,检测芯片还可用于在第二电压大于或等于设定电压时,判断检测端连接的外接设备不是OTG设备。
其中,产生第一电压的电压源的电源品质越好,即电压源输出的第一电压的电压值越稳定,检测结果越准确。
在第一方面提供的检测电路中,检测单元包含的第一电阻对电压源产生的第一电压进行分压后得到第二电压,检测芯片在第二电压小于设定电压时,判断外接设备为OTG设备。采用第一方面提供的检测电路检测外接设备是否为OTG设备,与现有技术中通过检测芯片输出电流来检测外接设备是否为OTG设备的方案相比,由于电压源产生的第一电压的稳定性较好,因而检测芯片在根据第一电阻对该第一电压进行分压后得到的第二电压判断外接设备是否为OTG设备时,检测结果更为准确。因而,采用第一方面提供的检测电路对外接设备是否为OTG设备进行检测时的检测结果更准确。
在一种可能的设计中,检测芯片还可用于输出设定电流,其中,输出的设定电流小于流经第一电阻的电流。
在上述方案中,由于设定电流小于流经第一电阻的电流,因而可避免检测芯片采用轮询切换方式输出设定电流而导致的检测结果不准确的情况。其中,流经第一电阻的电流与设定电流的差值越大,设定电流对检测结果的影响越小,检测电路的检测结果越准确。
采用上述方案,可通过设置第一电压、第一电阻或设定电流的值来改变检测电路的检测门限,当外接设备的阻值小于该检测门限时,检测芯片即判断该外接设备为OTG设备。
在一种可能的设计中,检测单元还可包含第二电阻,该第二电阻与第一电阻和检测芯片连接,且该第二电阻用于对第二电压进行分压。
通过在检测单元中加入第二电阻,减小了由电压源流向外接设备的电流的大小,从而避免接入外接设备时检测电路所在的OTG设备中产生过大的漏电流,防止电量的过快消耗。此外,在检测电路中,还可通过调整第二电阻的阻值大小改变检测电路的检测门限,从而有效防止检测端的接口脏污导致的误识别的问题,降低了检测电路所在的OTG设备的现场故障率(Field Failure Rate,FFR)。
第二方面,本申请提供一种终端,该终端包括上述第一方面或其任一种可能的设计中所提供的检测电路。
在第二方面提供的终端中,检测单元包含的第一电阻对电压源产生的第一电压进行分压后得到第二电压,检测芯片在第二电压小于设定电压时,判断外接设备为OTG设备。采用第二方面提供的终端检测外接设备是否为OTG设备,与现有技术中通过检测芯片输出电流来检测外接设备是否为OTG设备的方案相比,由于电压源产生的第一电压的稳定性较好,因而检测芯片在根据第一电阻对该第一电压进行分压后得到的第二电压判断外接设备是否为OTG设备时,检测结果更为准确。因而,采用第二方面提供的终端对外接设
备是否为OTG设备进行检测时的检测结果更准确。
第三方面,本申请提供一种OTG设备的检测方法,该方法包括如下步骤:检测电路中的检测单元包含的电压源产生第一电压,检测单元包含的第一电阻对第一电压进行分压,得到第二电压;检测电路中的检测端提供检测电路与外接设备的连接接口;检测电路中的检测芯片在第二电压小于设定电压时,判断外接设备为OTG设备。
此外,检测芯片还可在第二电压大于或等于设定电压时,判断外接设备不是OTG设备。
采用第三方面提供的OTG设备的检测方法,检测电路中的检测单元包含的第一电阻对电压源产生的第一电压进行分压后得到第二电压,检测电路中的检测芯片在第二电压小于设定电压时,判断外接设备为OTG设备。采用第三方面提供的检测方法检测该检测电路连接的外接设备是否为OTG设备,与现有技术中通过检测芯片输出电流来检测外接设备是否为OTG设备的方案相比,由于电压源产生的第一电压的稳定性较好,因而检测芯片在根据第一电阻对该第一电压进行分压后得到的第二电压判断外接设备是否为OTG设备时,检测结果更为准确。因此,采用第三方面提供的检测方法检测外接设备是否为OTG设备时的检测结果更准确。
在一种可能的设计中,检测芯片还可将设定电流输出至检测单元,输出的该设定电流需小于流经第一电阻的电流。
在上述方案中,由于设定电流小于流经第一电阻的电流,因而可避免检测芯片采用轮询切换方式输出设定电流而导致的检测结果不准确的情况。其中,流经第一电阻的电流与设定电流的差值越大,设定电流对检测结果的影响越小,检测电路的检测结果越准确。
采用上述方案,可通过设置第一电压、第一电阻或设定电流的值来改变检测电路的检测门限,当外接设备的阻值小于该检测门限时,检测芯片即判断该外接设备为OTG设备。
在一种可能的设计中,检测单元包含的第二电阻可对第二电压进行分压。
通过检测单元中的第二电阻对第二电压进行分压,减小了由电压源流向外接设备的电流的大小,从而避免接入外接设备时检测电路所在的OTG设备中产生过大的漏电流,防止电量的过快消耗。此外,在检测电路中,还可通过调整第二电阻的阻值大小改变检测电路的检测门限,从而有效防止检测端的接口脏污导致的误识别的问题,降低了检测电路所在的OTG设备的FFR。
图1为现有技术提供的一种检测外接设备是否为OTG设备的方案的示意图;
图2为现有技术提供的一种检测外接设备是否为OTG设备的方案的电路示意图;
图3为本申请实施例提供的一种OTG设备的检测电路的结构示意图;
图4为本申请实施例提供的另一种OTG设备的检测电路的结构示意图;
图5为本申请实施例提供的一种OTG设备的检测方法的流程示意图。
下面将结合附图对本申请实施例作进一步地详细描述。
本申请涉及通过OTG设备的检测电路检测与该检测电路连接的外接设备是否为OTG设备。其中,该检测电路可置于作为主机的OTG设备中,作为主机的OTG设备可采用该
检测电路检测自身连接的外接设备是否为OTG设备。
作为主机的OTG设备在检测自身连接的外接设备是否为OTG设备时,通常采用图1所示的方案。在图1所示的方案中,检测芯片在用作不同用途时可以产生不同大小的电流,且不同大小的电流采用轮询切换的方式输出。以检测芯片为PMI8952为例,PMI8952可产生6uA、11uA、20uA、51uA四种不同大小的电流,四种不同大小的电流按照6uA→11uA→20uA→51uA的顺序采用轮询切换的方式输出。当PMI8952检测自身连接的外接设备是否为OTG设备时,PMI8952通过USB_PHY_ID管脚向USB_ID接口输出51uA的电流,然后PMI8952通过内部集成的比较器检测USB_PHY_ID管脚处的电压。当USB_PHY_ID管脚处的电压小于1V时,即外接设备的阻值小于19kΩ(1V/51uA≈19kΩ)时,判断USB_ID接口连接的外接设备为OTG设备。
在现有技术的方案中,由于6uA、11uA、20uA、51uA四种不同大小的电流采用轮询切换的方式输出,因而在PMI8952通过USB_PHY_ID管脚向USB_ID接口输出51uA的电流时,输出电流的电流值很可能不是51uA,而是四种不同大小的电流在轮询切换过程中输出的某个中间值,因而根据该电流检测USB_ID接口连接的外接设备是否为OTG设备时,存在检测结果不准确的问题。
本申请实施例提供一种OTG设备的检测电路、检测方法及终端,用以解决现有的OTG设备检测方案存在的检测结果不准确的问题。其中,检测方法和检测电路是基于同一发明构思的,由于检测方法及检测电路解决问题的原理相似,因此检测电路与检测方法的实施可以相互参见,重复之处不再赘述。
需要理解的是,在本申请的描述中,“第一”、“第二”等词汇,仅用于区分描述的目的,而不能理解为指示或暗示相对重要性,也不能理解为指示或暗示顺序。
本申请提供一种OTG设备的检测电路,参见图3,该OTG设备的检测电路300(以下简称“检测电路300”)包含检测单元301、检测端302和检测芯片303。
其中,检测单元301包含串联的电压源301a和第一电阻301b,电压源301a用于产生第一电压,第一电阻301b用于对第一电压进行分压,得到第二电压。检测端302与外接设备和检测单元301连接,检测端302用于提供检测电路300与外接设备的连接接口。检测芯片303与第一电阻301b连接,用于在第二电压小于设定电压时,判断检测端连接的外接设备为OTG设备。
需要说明的是,本申请实施例中,电压源301a是在检测芯片303外构造的一个能够稳定输出第一电压的电压源。外接设备中的“外接”是针对检测电路300所在的OTG设备而言的,比如检测电路300所在的OTG设备为手机,外接设备即为通过手机的USB接口与该手机连接的设备。
此外,检测芯片303还可用于在第二电压大于或等于设定电压时,判断检测端连接的外接设备不是OTG设备。
本申请实施例中,产生第一电压的电压源301a的电源品质越好,即电压源301a输出的第一电压的电压值越稳定,检测结果越准确。因此,电压源301a可以选用低压差线性稳压器(Low Dropout Regulator,LDO)。LDO输出电压的稳定性好,可提高检测结果的准确性。
本申请实施例中,检测端302用于提供检测电路300与外接设备的连接接口,该检测端302可以是检测电路300所在的OTG设备的USB接口。
在图3所示的检测电路300中,检测单元301包含的第一电阻301b对电压源301a产生的第一电压进行分压后得到第二电压,检测芯片303在第二电压小于设定电压时,判断外接设备为OTG设备。采用本申请提供的检测电路300检测检测端302连接的外接设备是否为OTG设备,与现有技术中通过检测芯片输出电流来检测外接设备是否为OTG设备的方案相比,由于电压源301a产生的第一电压的稳定性较好,因而检测芯片303在根据第一电阻301b对该第一电压进行分压后得到的第二电压检测外接设备是否为OTG设备时,检测结果更为准确。因而,采用本申请提供的检测电路300对外接设备是否为OTG设备进行检测时的检测结果更准确。
比如,当第一电压为1.8V、第一电阻为1kΩ、设定电压为1V时,1.8V的第一电压经过第一电阻分压后得到的第二电压小于设定电压1V时,检测芯片303即判断与检测端302连接的外接设备为OTG设备,也就是说,当外接设备的电阻小于检测门限Rt时,Rt=1V/((1.8V-1V)/1kΩ)=1.25kΩ,检测芯片303即判断与检测端302连接的外接设备为OTG设备。
此外,采用本申请提供的检测电路300对外接设备是否为OTG设备进行检测时,由于第一电压和第一电阻均可改变,因此在对外接设备进行检测时,可通过设置第一电压和/或第一电阻来控制检测电路300的检测门限Rt。比如,当检测端302为USB接口时,USB接口的脏污可能会导致USB_ID微短路(电阻值约几千欧到几十千欧),若该电阻值小于检测电路300的检测门限Rt,那么检测电路300会误将USB接口的脏污识别为OTG设备接入,造成误识别。此时,可通过改变检测电路300中的第一电压和/或第一电阻来改变检测电路300的检测门限Rt,进而避免上述误识别的情况。
本申请实施例中,检测芯片303还可输出设定电流,其中,设定电流小于流经第一电阻301b的电流。
上述检测电路300的实现方式中,检测芯片303仍采用轮询切换的方式输出设定电流,但是由于设定电流小于流经第一电阻301b的电流,因而可避免检测芯片303采用轮询切换方式输出设定电流而导致的检测结果不准确的情况。其中,流经第一电阻301b的电流与设定电流的差值越大,设定电流对检测结果的影响越小,检测电路300的检测结果越准确。
在上述实现方式中,设定电流的大小还会影响检测电路300的检测门限Rt。比如,当第一电压为1.8V、第一电阻为1kΩ、设定电压为1V、设定电流为51uA时,电压源301a的最大电流为I=1.8V/1kΩ=1.8mA>>51uA,因而检测芯片303采用轮询切换方式输出的设定电流对检测结果的影响较小。此时,检测电路300的检测门限Rt=1V/((1.8V-1V)/1kΩ-51uA)≈1.335kΩ。与检测芯片303未输出设定电流的方案相比,检测电路300的检测门限Rt增大了。因此,采用上述实现方式可通过改变第一电压、第一电阻或者设定电流的大小来改变检测电路300的检测门限Rt。
可选地,检测单元301中还可包含第二电阻,该第二电阻与第一电阻301b和检测芯片303连接,用于对第二电压进行分压。
通过在检测单元301中加入第二电阻,减小了由电压源301a流向外接设备的电流的大小,从而避免接入外接设备时检测电路300所在的OTG设备中产生过大的漏电流,防止电量的过快消耗。此外,在检测电路300中,还可通过调整第二电阻的阻值大小改变检测电路300的检测门限Rt,从而有效防止检测端302的接口脏污导致的误识别的问题,降低
了检测电路300所在的OTG设备的FFR。
比如,当第一电压为1.8V、第一电阻为1kΩ、设定电压为1V、第二电阻为820Ω时,检测电路的检测门限Rt=1V/((1.8V-1V)/1kΩ-51uA)-820Ω≈515Ω。可见,与检测单元301中未加入第二电阻的方案相比,检测电路300的检测门限Rt由1.335kΩ减小为515Ω。
本申请实施例中,在选择第一电阻和第二电阻的阻值时,若第一电阻和第二电阻的阻值均过小,那么外接设备与检测端302连接时,电压源301a会产生较大的漏电流,导致整个检测电路的耗电量增加;若第一电阻和第二电阻的阻值均过大,会导致电压源301a的电流过小,甚至小于检测芯片303输出的设定电流,进而影响检测结果的准确性。在实际实现时,第一电阻、第二电阻的选取可依经验选取。
结合以上对OTG设备的检测电路300及其各种可能的实现方式的描述,本申请还提供一种如图4所示的OTG设备的检测电路。该检测电路可视为图3所示的OTG设备的检测电路300的一种具体实现方式。
在图4所示的检测电路中,PMI8952为检测芯片,LDO5为电压源,R1和R2分别为第一电阻和第二电阻,PMI8952通过USB_PHY_ID管脚与R1和R2连接,USB_ID为检测端,R为外接设备的电阻值。其中,电压源LDO5产生的第一电压为1.8V,R1=1.8kΩ,R2=820Ω。采用图4所示的OTG设备的检测电路对USB_ID连接的外接设备是否为OTG设备进行检测时,PMI8952采用轮询切换的方式、通过USB_PHY_ID管脚输出51uA的设定电流,由于LDO5的最大电流I=1.8V/(1kΩ+820Ω)=0.98mA>>51uA,因此PMI8952输出的设定电流对检测结果的影响很小。
图4所示的OTG设备的检测电路的检测门限Rt=1V/((1.8V-1V)/1kΩ+51uA)–820Ω=355Ω。因此,当外接设备的电阻值R<Rt时,PMI8952即判断与USB_ID接口连接的外接设备为OTG设备。
综上,采用本申请提供的OTG设备的检测电路来检测检测端连接的外接设备是否为OTG设备时,可提高检测结果的准确性,同时可避免OTG设备的误识别,降低检测电路所在的OTG设备的FFR。
基于以上实施例,本申请还提供一种终端,该终端包括图3所示的检测电路300。
具体的,终端可以是手机、个人计算机(Personal Computer,PC)、个人平板电脑、数码照相机、打印机等设备。
该终端可用于检测与该终端连接的外接设备是否为OTG设备,具体实现方式可参考图3所示的检测电路300中的相关描述。
基于以上实施例,本申请还提供一种OTG设备的检测方法,该检测方法的执行主体可视为图3所示的检测电路300。检测电路300可通过执行该方法来检测与自身连接的外接设备是否为OTG设备。如图5所示,该方法包含如下步骤:
S501:检测电路中的检测单元包含的电压源产生第一电压,该检测单元包含的第一电阻对第一电压进行分压,得到第二电压;
S502:检测电路中的检测端提供检测电路与外接设备的连接接口;
S503:检测电路中的检测芯片在第二电压小于设定电压时,判断外接设备为OTG设备。
可选地,该方法还包括:检测芯片将设定电流输出至检测单元,其中,该设定电流小于流经第一电阻的电流。
可选地,该方法还包括:检测单元包含的第二电阻对第二电压进行分压。
可选地,该方法还包括:检测芯片在第二电压大于或等于设定电压时,判断外接设备不是OTG设备。
采用图5所示的OTG设备的检测方法,检测电路中的检测单元包含的第一电阻对电压源产生的第一电压进行分压后得到第二电压,检测电路中的检测芯片在第二电压小于设定电压时,判断外接设备为OTG设备。采用本申请提供的检测方法检测该检测电路连接的外接设备是否为OTG设备,与现有技术中通过检测芯片输出电流来检测外接设备是否为OTG设备的方案相比,由于电压源产生的第一电压的稳定性较好,因而检测芯片在根据第一电阻对该第一电压进行分压后得到的第二电压判断外接设备是否为OTG设备时,检测结果更为准确。因此,采用本申请提供的检测方法检测外接设备是否为OTG设备时的检测结果更准确。
图5所示的方法可视为图3所示的检测电路300在检测与自身连接的外接设备是否为OTG设备时所使用的方法,因此图5所示方法中未详细解释和描述的实现方式可参考图3所示的检测电路300中的相关描述。
综上,采用本申请提供的OTG设备的检测电路、检测方法及终端,与现有技术中通过检测芯片输出电流来检测外接设备是否为OTG设备的方案相比,由于电压源产生的第一电压的稳定性较好,因而检测芯片在根据第一电阻对该第一电压进行分压后得到的第二电压判断外接设备是否为OTG设备时,检测结果更为准确。因而,采用本申请提供的OTG设备的检测电路、检测方法及终端对外接设备是否为OTG设备进行检测时的检测结果更准确。
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本申请是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
显然,本领域的技术人员可以对本申请实施例进行各种改动和变型而不脱离本申请实施例的精神和范围。这样,倘若本申请实施例的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。
Claims (9)
- 一种即插即用OTG设备的检测电路,其特征在于,包括:检测单元,所述检测单元包含串联的电压源和第一电阻,所述电压源用于产生第一电压,所述第一电阻用于对所述第一电压进行分压,得到第二电压;检测端,与外接设备和所述检测单元连接,用于提供所述检测电路与外接设备的连接接口;检测芯片,与所述第一电阻连接,用于在所述第二电压小于设定电压时,判断所述外接设备为OTG设备。
- 如权利要求1所述的电路,其特征在于,所述检测芯片还用于输出设定电流,所述设定电流小于流经所述第一电阻的电流。
- 如权利要求1或2所述的电路,其特征在于,所述检测单元还包含第二电阻,所述第二电阻与所述第一电阻和所述检测芯片连接,所述第二电阻用于对所述第二电压进行分压。
- 如权利要求1~3任一项所述的电路,其特征在于,所述检测芯片还用于在所述第二电压大于或等于所述设定电压时,判断所述外接设备不是OTG设备。
- 一种终端,其特征在于,包括如权利要求1~4任一项所述的检测电路。
- 一种即插即用OTG设备的检测方法,其特征在于,包括:检测电路中的检测单元包含的电压源产生第一电压,所述检测单元包含的第一电阻对所述第一电压进行分压,得到第二电压;所述检测电路中的检测端提供所述检测电路与外接设备的连接接口;所述检测电路中的检测芯片在所述第二电压小于设定电压时,判断所述外接设备为OTG设备。
- 如权利要求6所述的方法,其特征在于,还包括:所述检测芯片将设定电流输出至检测单元,所述设定电流小于流经所述第一电阻的电流。
- 如权利要求6或7所述的方法,其特征在于,还包括:所述检测单元包含的第二电阻对所述第二电压进行分压。
- 如权利要求6~8任一项所述的方法,其特征在于,还包括:所述检测芯片在所述第二电压大于或等于所述设定电压时,判断所述外接设备不是OTG设备。
Priority Applications (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US16/463,380 US20200132734A1 (en) | 2016-11-23 | 2017-02-27 | Detection circuit and detection method for on-the-go device, and terminal |
CN202110281967.1A CN113220617B (zh) | 2016-11-23 | 2017-02-27 | 一种即插即用设备的检测电路、检测方法及终端 |
CN201780005028.6A CN108475247B (zh) | 2016-11-23 | 2017-02-27 | 一种即插即用设备的检测电路、检测方法及终端 |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611038369 | 2016-11-23 | ||
CN201611038369.7 | 2016-11-23 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2018094894A1 true WO2018094894A1 (zh) | 2018-05-31 |
Family
ID=62194831
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2017/074988 WO2018094894A1 (zh) | 2016-11-23 | 2017-02-27 | 一种即插即用设备的检测电路、检测方法及终端 |
Country Status (3)
Country | Link |
---|---|
US (1) | US20200132734A1 (zh) |
CN (2) | CN108475247B (zh) |
WO (1) | WO2018094894A1 (zh) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106597143B (zh) * | 2016-11-10 | 2022-01-14 | 青岛海信移动通信技术股份有限公司 | 一种测试设备以及测试方法 |
KR20220014708A (ko) * | 2020-07-29 | 2022-02-07 | 삼성전자주식회사 | 전력을 공급하는 전자 장치 및 이의 동작 방법 |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060076977A1 (en) * | 2004-09-20 | 2006-04-13 | Xiaoming Zhu | USB 1.1 for USB OTG implementation |
CN101221546A (zh) * | 2007-01-12 | 2008-07-16 | 奇岩电子股份有限公司 | 可自动检测通用串行总线主机或外围设备的装置 |
CN103186483A (zh) * | 2011-12-27 | 2013-07-03 | 比亚迪股份有限公司 | 终端、用于其的otg功能和充电功能的并行执行方法 |
CN105301386A (zh) * | 2015-09-23 | 2016-02-03 | 广东欧珀移动通信有限公司 | Otg检测电路及具有其的移动终端 |
Family Cites Families (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7268561B2 (en) * | 2004-09-20 | 2007-09-11 | Texas Instruments Incorporated | USB attach detection for USB 1.1 and USB OTG devices |
TW200707208A (en) * | 2005-08-03 | 2007-02-16 | Sunplus Technology Co Ltd | USB device capable of automatically detecting USB mode and method thereof |
JP4976839B2 (ja) * | 2006-01-13 | 2012-07-18 | キヤノン株式会社 | 電子機器及びその制御方法 |
US20080222438A1 (en) * | 2007-03-07 | 2008-09-11 | Peng-Fei Lin | Apparatus For Automatically Detecting And Differentiating Between USB Host And Device |
US7480758B2 (en) * | 2007-03-07 | 2009-01-20 | Moai Electronics Corporation | Method and apparatus for automatically switching between USB host and device |
TW200842591A (en) * | 2007-04-20 | 2008-11-01 | Genesys Logic Inc | OTG device for multi-directional transmitting GPS data and controlling method of same |
US7711870B2 (en) * | 2008-02-06 | 2010-05-04 | Panasonic Corporation | Interface detecting circuit and interface detecting method |
CN201331755Y (zh) * | 2009-01-14 | 2009-10-21 | 北京杰富瑞科技有限公司 | 具有自动主从判断电路的usb otg接口 |
US20100235546A1 (en) * | 2009-03-16 | 2010-09-16 | Jeff Terlizzi | Methods and apparatus for adaptive accessory detection and mode negotiation |
US8447890B1 (en) * | 2009-10-30 | 2013-05-21 | Cypress Semiconductor Corporation | Operation of multiple masters/hosts through a hub |
WO2013147860A1 (en) * | 2012-03-30 | 2013-10-03 | Intel Corporation | Usb hub with automatic communication mode switching |
CN106155967A (zh) * | 2015-04-23 | 2016-11-23 | 中兴通讯股份有限公司 | Usb接口复用的电路、方法和装置 |
CN105808480A (zh) * | 2016-03-01 | 2016-07-27 | 联发科技(新加坡)私人有限公司 | Usb otg设备的角色切换方法、系统及usb otg设备 |
-
2017
- 2017-02-27 CN CN201780005028.6A patent/CN108475247B/zh active Active
- 2017-02-27 CN CN202110281967.1A patent/CN113220617B/zh active Active
- 2017-02-27 US US16/463,380 patent/US20200132734A1/en not_active Abandoned
- 2017-02-27 WO PCT/CN2017/074988 patent/WO2018094894A1/zh active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060076977A1 (en) * | 2004-09-20 | 2006-04-13 | Xiaoming Zhu | USB 1.1 for USB OTG implementation |
CN101221546A (zh) * | 2007-01-12 | 2008-07-16 | 奇岩电子股份有限公司 | 可自动检测通用串行总线主机或外围设备的装置 |
CN103186483A (zh) * | 2011-12-27 | 2013-07-03 | 比亚迪股份有限公司 | 终端、用于其的otg功能和充电功能的并行执行方法 |
CN105301386A (zh) * | 2015-09-23 | 2016-02-03 | 广东欧珀移动通信有限公司 | Otg检测电路及具有其的移动终端 |
Also Published As
Publication number | Publication date |
---|---|
CN113220617A (zh) | 2021-08-06 |
CN108475247A (zh) | 2018-08-31 |
CN113220617B (zh) | 2022-10-18 |
US20200132734A1 (en) | 2020-04-30 |
CN108475247B (zh) | 2021-03-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20190260211A1 (en) | Power adapter, terminal, and method for processing impedance anomalies in charging loop | |
US10333326B2 (en) | Devices and methods for fast charging using determined maximum charging current values | |
US8769317B2 (en) | USB hub for supplying power upon determination whether a USB device is chargeable according to data transfer rate of the USB device | |
US8698449B2 (en) | Charger with detection of power input type | |
JP6549621B2 (ja) | 充電電流を調整するために専用充電器と非フローティング充電器とフローティング充電器を区別するための装置および方法 | |
US9904642B2 (en) | Detection circuit of universal serial bus | |
JP7157575B2 (ja) | 水分認識機能を含む電子装置及びその水分認識方法並びに水分認識システム | |
JP2014056287A (ja) | 電子機器及び電子機器による電源機器の判別方法 | |
US9639132B2 (en) | Systems and methods for automatic detection of a device | |
JP2013109410A (ja) | 判定回路 | |
JP2014509829A (ja) | 充電電流を測定する方法及び装置 | |
TWI584611B (zh) | 乙太網路供電系統的受電裝置檢測裝置及方法 | |
US10545908B2 (en) | Methods and apparatus to enable status change detection in a low power mode of a microcontroller unit | |
JP2017521777A5 (zh) | ||
US10284199B2 (en) | Voltage tolerant termination presence detection | |
JP2016519923A (ja) | 再充電可能バッテリの動的な充電 | |
US20130162298A1 (en) | Identifying circuit | |
WO2018094894A1 (zh) | 一种即插即用设备的检测电路、检测方法及终端 | |
CN106502368B (zh) | 一种移动终端的otg外设控制方法及系统 | |
US9599519B2 (en) | Charging a battery based on stored battery characteristics | |
WO2018195992A1 (zh) | 控制方法、usb系统和电子装置 | |
US20150253827A1 (en) | Control circuit of semiconductor memory, memory system and control system of semiconductor memory | |
US20140197804A1 (en) | Charging system and charging method thereof | |
WO2016045093A1 (zh) | 一种无线上网终端、限流控制装置及限流控制方法 | |
JP6916629B2 (ja) | 電子機器および制御方法 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 17873265 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 17873265 Country of ref document: EP Kind code of ref document: A1 |