WO2017177377A1 - 一种USB Type-C端口设备识别对端设备的方法、装置和系统 - Google Patents

一种USB Type-C端口设备识别对端设备的方法、装置和系统 Download PDF

Info

Publication number
WO2017177377A1
WO2017177377A1 PCT/CN2016/079076 CN2016079076W WO2017177377A1 WO 2017177377 A1 WO2017177377 A1 WO 2017177377A1 CN 2016079076 W CN2016079076 W CN 2016079076W WO 2017177377 A1 WO2017177377 A1 WO 2017177377A1
Authority
WO
WIPO (PCT)
Prior art keywords
pin
voltage
usb type
port
vbus
Prior art date
Application number
PCT/CN2016/079076
Other languages
English (en)
French (fr)
Inventor
许仲杰
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2016/079076 priority Critical patent/WO2017177377A1/zh
Priority to CN201680084473.1A priority patent/CN109478176B/zh
Publication of WO2017177377A1 publication Critical patent/WO2017177377A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation

Definitions

  • the present invention relates to the field of USB connection technologies, and in particular, to a USB Type-C port device, a method, device and device for identifying a peer device.
  • USB Type-A ports the mainstream USB ports of smart phone chargers, PCs, and notebook computers are mainly USB Type-A ports.
  • USB Type-C port will become the trend of USB ports for electronic products such as PCs, notebook computers, USB chargers, smart phones, and tablets.
  • USB "Type-C to Type-C cable" will become the mainstream charging cable for future electronic products such as smartphones, PCs, laptop USB chargers, and tablet PCs.
  • USB Type-A port device will always be the master device.
  • the USB specification stipulates that when the USB port of the USB Type-C port device is a dual role port (DRP), the master device or the slave device can be determined according to the role of the USB port of the peer device during the connection establishment process; When the USB port of the Type-C port device is a Down Facing Port (DFP), it only acts as the master device during the connection establishment process; or the USB port of the USB Type-C port device is the Up Facing Port (UFP). When the connection is established, only the slave device is made.
  • DFP Down Facing Port
  • UFP Up Facing Port
  • USB Type-C port device When a USB Type-C port device is connected to a USB Type-A port device, the USB Type-C port device can only be a slave device, but it is not known whether the peer device is a USB Type-A port device.
  • the embodiment of the invention provides a USB Type-C port device method for identifying a peer device, a USB Type-C port device and a device for identifying a peer device.
  • a method for identifying a peer device by a USB Type-C port device includes a configuration channel CC pin and a VBUS pin.
  • the method specifically includes: detecting, by the USB Type-C port device, a voltage of the CC pin and a voltage of the VBUS pin; determining that the voltage of the CC pin becomes a stable intermediate level and appears on the VBUS pin a high-level time sequence; when the voltage of the CC pin becomes a stable intermediate level and a high level appears on the VBUS pin, it is determined that the peer device is a USB Type-A port device; When the intermediate level of the voltage of the CC pin becomes stable earlier than the high level appears on the VBUS pin, it is determined that the peer device is not a USB Type-A port device.
  • the detecting, by the USB Type-C port device, a voltage of the CC pin and a voltage of the VBUS pin includes: a voltage of the CC pin Obtaining a voltage value of the VBUS pin while changing to a stable intermediate level; determining that the voltage of the CC pin becomes a stable intermediate level and a time sequence of a high level on the VBUS pin is: determining the Whether the voltage value of the VBUS pin is a high level; when the voltage value of the VBUS pin is a high level, the voltage of the CC pin becomes a stable intermediate level while the VBUS pin appears High level; when the voltage value of the VBUS pin is not high level, the voltage of the CC pin becomes a stable intermediate level earlier than the high level appears on the VBUS pin.
  • the detecting, by the USB Type-C port device, a voltage of the CC pin and a voltage of the VBUS pin includes: detecting the CC pin and The voltage of the VBUS pin, recording the time point at which the voltage of the CC pin becomes a stable intermediate level, recording a time point at which a high level appears on the VBUS pin; and determining the voltage of the CC pin
  • the time sequence that becomes stable at the intermediate level and the high level appears on the VBUS pin is: a time point at which it is judged that the voltage of the CC pin becomes a stable intermediate level and a high level appears on the VBUS pin
  • the method when determining that the peer device is a USB Type-A port device, the method further includes: the USB Type-C port device and the USB Type - The A port device negotiates a charging scheme that supports the normal fast charging protocol, which does not include the USB PD charging protocol.
  • the determining that the voltage of the CC pin becomes a stable intermediate level and the time sequence of a high level on the VBUS pin is when the USB is
  • the Type-C port device is a slave device
  • a USB Type-C port device in a second aspect, includes a USB Type-C port, an application processor and a microcontroller, and the USB Type-C port includes a configuration channel (configuration) Channel) CC pin and VBUS pin, the microcontroller is connected to the CC pin and the VBUS pin, the microcontroller is connected to the application processor; the microcontroller is used to detect the CC a voltage of the pin and a voltage of the VBUS pin; the microcontroller or the application processor is configured to determine that the voltage of the CC pin becomes a stable intermediate level and a high level occurs on the VBUS pin Sequence; when the voltage of the CC pin becomes a stable intermediate level and a high level appears on the VBUS pin, it is determined that the peer device is a USB Type-A port device; when the CC tube If the voltage of the foot becomes a stable intermediate level earlier than the high level appears on the VBUS pin, the peer device is not a USB Type-A port device
  • the application processor is configured to determine that a voltage of the CC pin becomes a stable intermediate level and a time sequence in which a high level occurs on the VBUS pin
  • the microcontroller is further configured to report a result of detecting a voltage of the CC pin and a voltage of the VBUS pin to the application processor.
  • the microcontroller determines that the peer device is a USB Type-A port device, or the peer device is not a USB Type-A port device.
  • the microcontroller is further configured to report that the peer device of the application processor is or is not a USB Type-A port device.
  • the microcontroller is used by the microcontroller to detect the CC pin
  • the voltage and the voltage of the VBUS pin include: the microcontroller detects a voltage of the CC pin, and acquires a voltage value of the VBUS pin while a voltage of the CC pin becomes a stable intermediate level;
  • the timing sequence of the microcontroller or the application processor for determining that the voltage of the CC pin becomes stable and the high level of the VBUS pin are: determining whether the voltage value of the VBUS pin is Is a high level; when the voltage value of the VBUS pin is a high level, the voltage of the CC pin becomes a stable intermediate level while a high level appears on the VBUS pin; When the voltage value of the VBUS pin is not high, the voltage of the CC pin becomes a stable intermediate level earlier than the high level appears on the VBUS pin.
  • the microcontroller is configured to detect a voltage of the CC pin and the VBUS tube
  • the voltage of the foot includes: the microcontroller detects a voltage of the CC pin and a voltage of the VBUS pin, records a time point at which the voltage of the CC pin becomes a stable intermediate level, and the VBUS a time point at which a high level appears on the pin; the microcontroller or the application processor is configured to determine that the voltage of the CC pin becomes a stable intermediate level and the time sequence of a high level on the VBUS pin is : determining a time point at which the voltage of the CC pin becomes a stable intermediate level and appearing on the VBUS pin The sequence of the high-level time points, if the time point at which the voltage of the CC pin becomes a stable intermediate level is the same as the time point at which the high level appears on the VBUS pin, the CC pin The voltage of the
  • the application processing The device when determining that the peer device is a USB Type-A port device, the application processing The device further includes instructing the USB Type-C port device to negotiate with the USB Type-A port device for a charging scheme supporting a normal fast charging protocol, the normal fast charging protocol not including a USB PD charging protocol.
  • the microcontroller or the application processor determines a voltage of the CC pin
  • the time sequence that becomes stable and the high level appears on the VBUS pin is: when the USB Type-C port device is a slave device, it is determined that the voltage of the CC pin becomes a stable intermediate level and The order in which the high level appears on the VBUS pin;
  • the peer device When the intermediate level of the voltage of the CC pin becomes stable earlier than the high level appears on the VBUS pin, the peer device is not a USB Type-A port device: when the CC tube The voltage at the foot becomes a stable intermediate level earlier than the high level on the VBUS pin, and the peer device is a USB Type-C port device.
  • the USB Type-C port device further includes a USB controller, where the USB controller is configured to determine the USB Type-C devices are slave devices.
  • the microcontroller is disposed in the USB controller.
  • the third aspect provides a device for identifying a peer device, which is applied to a USB Type-C port device, where the Type-C port of the USB Type-C port device includes a configuration channel CC pin and a VBUS.
  • the device includes: a detecting unit configured to detect a voltage of the CC pin and a voltage of the VBUS pin; and a processing unit configured to determine that the voltage of the CC pin becomes a stable intermediate level and the VBUS tube A high-level time sequence appears on the foot; the peer device is configured to be connected to the USB Type-C port of the USB Type-C port device through a USB cable; when the voltage of the CC pin becomes stable At the same time as the intermediate level, a high level appears on the VBUS pin, determining that the peer device is a USB Type-A port device; when the voltage of the CC pin becomes stable, the intermediate level is earlier than the A high level appears on the VBUS pin, and the peer device is not a USB Type-A port device.
  • the detecting unit is specifically configured to: detect a voltage of the CC pin, and the voltage of the CC pin becomes a stable intermediate level Obtaining a voltage value of the VBUS pin; the processing unit is specifically configured to: determine whether the voltage value of the VBUS pin is a high level; when the voltage value of the VBUS pin is a high level, the CC tube When the voltage of the foot becomes a stable intermediate level, a high level appears on the VBUS pin; when the voltage value of the VBUS pin is not a high level, the voltage of the CC pin becomes a stable middle. The level is higher than the level on the VBUS pin.
  • the detecting unit is configured to: detect a voltage of the CC pin and the VBUS pin, and record that the voltage of the CC pin becomes stable. a time point of an intermediate level and a time point at which a high level appears on the VBUS pin; the processing unit is specifically configured to: determine a time point at which the voltage of the CC pin becomes a stable intermediate level, and The sequence of time points at which the high level appears on the VBUS pin.
  • the time at which the voltage of the CC pin becomes a stable intermediate level is the same as the time point at which the high level appears on the VBUS pin, then The voltage of the CC pin becomes a stable intermediate level while a high level appears on the VBUS pin; if the voltage of the CC pin becomes a stable intermediate level, the time point is earlier than the VBUS When a high level time point appears on the pin, the voltage of the CC pin becomes a stable intermediate level earlier than the VBUS tube A high level appears on the foot.
  • the device further includes a negotiating unit, when determining that the peer device is a USB Type - an A port device, the negotiating unit is configured to negotiate a charging scheme supporting the normal fast charging protocol with the USB Type-A port device, the normal fast charging protocol not including a USB PD charging protocol.
  • the USB Type-C port device in the embodiment of the present invention can identify whether the peer device is a USB Type-A port device when connecting. Further, when the peer device is identified as a USB Type-A port device, the normal fast charging protocol can be directly negotiated, so that the USB Type-C port device and the USB Type-A port device enter the fast charging mode as soon as possible.
  • the fourth aspect provides a method for the USB Type-C port device to identify the peer device, where the Type-C port of the USB Type-C port device includes a configuration channel CC pin and a VBUS pin.
  • the method specifically includes: detecting, by the USB Type-C port device, a voltage of the CC pin; acquiring a voltage value of the VBUS pin while a voltage of the CC pin becomes a stable intermediate level; determining the Whether the voltage value of the VBUS pin is a high level; when the voltage value of the VBUS pin is a high level, determining that the peer device is a USB Type-A port device; when the voltage value of the VBUS pin is If it is low, it is determined that the peer device is not a USB Type-A port device.
  • the method when determining that the peer device is a USB Type-A port device, the method further includes: the USB Type-C port device and the USB Type - The A port device negotiates a charging scheme that supports the normal fast charging protocol, which does not include the USB PD charging protocol.
  • the determining whether the voltage value of the VBUS pin is a high level is when the USB Type-C port device is a slave device, determining Whether the voltage value of the VBUS pin is a high level; when the voltage value of the VBUS pin is a low level, it is determined that the peer device is not a USB Type-A port device: when the VBUS tube If the voltage value of the pin is low, it is determined that the peer device is a USB Type-C port device.
  • a USB Type-C port device the USB Type-C The port device includes a USB Type-C port, an application processor and a microcontroller, and the USB Type-C port includes a configuration channel CC pin and a VBUS pin, and the microcontroller and the CC pin Connected to a VBUS pin, the microcontroller is coupled to the application processor; the microcontroller is configured to detect a voltage of the CC pin, when a voltage of the CC pin becomes a stable intermediate level Simultaneously obtaining a voltage value of the VBUS pin; the microcontroller or the application processor is configured to determine whether the voltage value of the VBUS pin is a high level; when the voltage value of the VBUS pin is a high level, Then determining that the peer device is a USB Type-A port device; when the voltage value of the VBUS pin is a low level, determining that the peer device is not a USB Type-A port device.
  • the application processor further includes: when determining that the peer device is a USB Type-A port device, indicating the USB Type-C port device and the device The USB Type-A port device negotiates a charging scheme that supports the normal fast charging protocol, which does not include the USB PD charging protocol.
  • the USB Type-C port device further includes a USB controller, where the USB controller is connected to the application processor, and the USB controller is used to Determining that the USB Type-C port device is a master device or a slave device, and reporting the report to the application processor; the application processor is further configured to: when the USB Type-C port device is a slave device, The voltage value of the VBUS pin is low, and it is determined that the peer device is a USB Type-C port device.
  • the microcontroller is in the USB controller.
  • the USB Type-C port device of the embodiment of the present invention can be at the opposite end by determining whether the voltage value of the VBUS pin is high when the voltage of the CC pin becomes a stable intermediate level.
  • the normal fast charging protocol can be directly negotiated, so that the USB Type-C port device and the USB Type-A port device enter the fast charging mode as soon as possible.
  • FIG. 1A is a Type-A to Type-C cable according to an embodiment of the present invention.
  • FIG. 1B is a Type-A to Type-C cable according to an embodiment of the present invention.
  • FIG. 2A is a schematic diagram of an internal circuit of a CC pin of a DFP device according to an embodiment of the present invention
  • 2B is a schematic diagram of an internal circuit of a CC pin of a UFP device according to an embodiment of the present invention
  • 2C is a schematic diagram of an internal circuit of a CC pin of a DRP device according to an embodiment of the present invention
  • FIG. 3 is a voltage waveform of a channel pin and a power pin of a DRP device and a DRP device according to an embodiment of the present invention
  • FIG. 4 is a voltage waveform of a configuration channel pin and a power pin of a DRP device and a UFP device according to an embodiment of the present invention
  • FIG. 5 is a voltage waveform of a channel pin and a power pin of a DRP device and a DFP device according to an embodiment of the present invention
  • FIG. 6 is a voltage waveform of a configuration channel pin and a power pin of a UFP device and a DFP device according to an embodiment of the present invention
  • FIG. 7 is a voltage waveform of a configuration channel pin and a power pin of a DRP device and a USB Type-A port device according to an embodiment of the present invention
  • FIG. 8 is a voltage waveform of a channel pin and a power pin of a UFP device and a USB Type-A port device according to an embodiment of the present invention
  • FIG. 9 is a structural diagram of a USB Type-C port device according to an embodiment of the present invention.
  • FIG. 10 is a structural diagram of another USB Type-C port device according to an embodiment of the present invention.
  • FIG. 11 is a schematic diagram of a USB Type-C port device for identifying a peer device according to an embodiment of the present invention.
  • FIG. 12 is a schematic diagram of a method for identifying a peer device of a DRP device according to an embodiment of the present invention.
  • FIG. 13 is a schematic diagram of a method for identifying a peer device by a UFP device according to an embodiment of the present invention
  • FIG. 14 is a USB Type-C port device according to an embodiment of the present invention.
  • the USB port type may include a Type C (USB Type-C) port and a Type A (USB Type-A) port, and a Type B (USB Type-B) port.
  • the following devices for Type A ports are called USB Type-A port devices, and so on. Since the USB Type-B port device always acts as a slave device, when connected to a USB Type-C port device, the USB Type-C port device acts as a master device.
  • the USB Type-A port device acts only as a master device, and when connected to a USB Type-C port device, the USB Type-C port device acts as a slave device.
  • the USB Type-C port device is connected to another peer device through the USB port, according to the USB Type-C cable and connector specification version 1.1 (Universal Serial Bus Type-C Cable and Connector Specification, revision 1.1)
  • the role type of the USB Type-C port of the USB Type-C port device may be one of three roles, as shown in Table 1.
  • the UFP in Table 1 above is used to indicate an Up Facing Port (UFP).
  • the DFP in the above table is used to indicate a Down Facing Port (DFP).
  • the DRP in the above table is used to indicate a dual role port ( Dual Role Port, DRP).
  • the USB Type-C port device with USB Type-C port as DRP is called DRP device.
  • the USB Type-C port device with USB Type-C port is UFP is called UFP device, and USB Type-C port is DFP.
  • the USB Type-C port device is called a DFP device.
  • the USB port of the first device when the USB port of the first device is a USB Type-C port, the first device is connected to a second device through a USB cable.
  • the USB port of the second device is a USB Type-A port, the USB connection can be established only when the first device is a UFP device or a DRP device.
  • the USB specification stipulates that the USB Type-C port in the USB Type-C port device supports forward and reverse insertion, including multiple pins, including the configuration channel (English name: Configuration Chanel, referred to as CC) pin, and the CC pin includes One of the CC1 pin and the CC2 pin, one of the CC1 pin and the CC2 pin is connected to the CC pin in the Type-C plug of the USB cable when the USB Type-C port device is connected to the USB cable.
  • the internal circuit design of the CC pin on the USB Type-C port device of different roles is different. As shown in Figure 2A, the DFP device has its CC pin connected to the 5V high level through the Rp resistor.
  • the CC pin When the DFP device is not connected to the peer device, the voltage on the CC pin is high. As shown in Figure 2B, the UFP device has its CC pin grounded through the Rd resistor. Therefore, when the UFP device is not connected to the peer device, The voltage on the CC pin is low; as shown in Figure 2C, the CC pin is alternately connected to the 5V high level through the Rp resistor or grounded through the Rd resistor. Therefore, when the DRP device is not connected to the peer device, The voltage on the CC pin alternates between a high level and a low level. Specifically, as shown in FIGS. 3 to 8.
  • the CC pin in Figure 2A to Figure 2C is CC1 pin or CC2 pin. This is an internal circuit diagram.
  • the CC pin in the specific product is also connected to the internal device of the USB Type-C port device.
  • a USB device When a USB device is connected, a device is pulled up to a 5V level CC pin (one of the CC1 pin and the CC2 pin) through Rp and a CC pin (CC1 pin and grounded through the Rd ground of the opposite device).
  • One of the CC2 pins is connected, so the voltage of the CC1 pin or CC2 pin in the CC pin will become a stable intermediate level, and the stable intermediate level value is Rd*5V/(Rp+Rd). .
  • the USB specification stipulates that when the USB Type-C port device is not connected to the peer device, the VBUS pin is not powered, and after connecting the peer device to complete the CC identification, the USB Tpye-C as the master device is used.
  • the VBUS of the port device is powered on.
  • the CC recognizes that the voltage of the CC pin has become a stable intermediate level, from a high level or a low level to the stable intermediate level, and the stable intermediate level depends on the resistance values of Rp and Rd. set.
  • the USB Type-C port device detects the voltage of the CC pin whether it is connected to the peer device. After the CC is recognized, the USB Type-C port device can also be stabilized by detecting the voltage of the CC pin.
  • the intermediate level changes to a high level or a low level to determine that the USB Type-C port device is disconnected from the peer device.
  • the VBUS pin on the USB Type-A port device is always powered.
  • the USB Type-C port device acts as the master device or the slave device.
  • the voltage change of the CC pin of the USB Type-C port device is determined.
  • CC The voltage of the pin drops from a high level to a stable intermediate level, then the USB Type-C port device acts as the master device; the voltage of the CC pin rises from a low level to the stable intermediate level, then the USB Type-C port devices are slave devices.
  • the device 1 and the device 2, which are labeled in Figures 3 to 8, are connected, meaning that the device 1 and the device 2 are connected by a USB cable.
  • the voltage on the CC pin changes from a high level or a low level to a stable intermediate level, ie CC identification is completed. Therefore, the point in time when the CC identification is completed can be understood as the point in time when the device 1 and the device 2 are connected through the USB cable.
  • the voltage waveforms in the figures refer to the voltage waveforms of the respective CC pins and VBUS pins of the two devices.
  • the USB Type A port of the USB Type-A port device does not have a CC pin. Therefore, the voltage waveform of the CC pin in the USB Type-A port device in the figure refers to the USB Type-A port device connecting the USB Type-A to the Type-C cable, but not connected to the USB Type-C port. Voltage waveform of the CC pin in the Type-C plug of the USB Type-A to Type-C cable.
  • the USB Type-C cable and connector specification version 1.1 specifies that the Type-C plug of the USB Type-A to Type-C cable connected to the USB Type-C port device passes the CC pin through the Rp resistor.
  • VBUS pin connections The VBUS pin of the USB Type-A port device is always powered, that is, the voltage of the VBUS pin can be detected as a high level. Therefore, the high level of the CC pin of the USB Type-A port device is always present.
  • the USB Type-B port of the USB Type-B port device does not have a CC pin. Therefore, the voltage waveform of the CC pin in the USB Type-B port device refers to the cable of the USB Type-B port device connecting Type-B to Type-C, but not connected to the USB Type-C port device. -B to the voltage waveform of the CC pin in the Type-C plug in the Type-C cable.
  • the USB Type-C cable and connector specification version 1.1 specifies that the Type-B to Type-C cable in the Type-C plug connected to the USB Type-C port device connects the CC pin to the ground through the Rd resistor. Therefore, the CC pin when the USB Type-B port device is not connected to the peer device is low.
  • the power supply voltage on the VBUS pin is high, such as 5V.
  • the VBUS pin When the VBUS pin is powered externally or receives power from the peer device, there is a high level, no supply voltage. It is low, such as 0V.
  • USB Tyep-C port device 1 is a DRP device
  • a USB Tyep-C port device. 2 is a DRP device.
  • the voltage waveforms of the CC pins of the USB ports of the device 1 and the device 2 are alternately changed from high to low.
  • the voltage waveform of the CC pin of the DRP device 1 port changes from a high level to a stable intermediate level when the high and low levels alternate; DRP device 2 port The voltage waveform of the CC pin rises from a low level to a stable intermediate level when the high and low levels alternate.
  • device 1 and device 2 change to a stable intermediate level, CC identification is completed, device 1 is the master device, and device 2 is the slave device. After a period of time after CC identification is completed, device 1 starts charging device 2, and device 1 and device 2 have a high level at the same time as the VBUS pin.
  • the USB Tyep-C port device 1 is a DRP device
  • the USB Tyep-C port device 2 is a UFP device.
  • the voltage waveform of the CC pin of the device 1 alternates between high and low levels, and the voltage waveform of the CC pin of the device 2 is low.
  • the voltage waveform of the CC pin of the DRP device 1 port changes from a high level to a stable intermediate level when the high and low levels alternate; the CC tube of the UFP device 2 port The voltage waveform of the foot rises from a low level to a stable intermediate level.
  • device 1 and device 2 change to a stable intermediate level, CC identification is completed, device 1 is the master device, and device 2 is the slave device. After a period of time after CC identification is completed, device 1 starts charging device 2, and device 1 and device 2 have a high level at the same time as the VBUS pin.
  • the USB Tyep-C port device 1 is a DRP device
  • the USB Tyep-C port device 2 is a DFP device.
  • the voltage waveform of the CC pin of the device 1 alternates between high and low levels, and the voltage waveform of the CC pin of the device 2 is high.
  • device 1 and device 2 are connected by a USB cable, since device 2 is a DFP device, device 1 can only be a slave device.
  • the voltage waveform of the CC pin of the DRP device 1 port changes from low level to a stable intermediate level when the high and low levels alternately change; the voltage waveform of the CC pin of the DFP device 2 port decreases from the high level to a stable state.
  • the middle level When device 1 and device 2 change to a stable intermediate level, CC identification is completed, device 1 is a slave device, and device 2 is a master device. After completing a period of time after the CC is identified, the device 2 starts charging the device 1, and the device 1 and the VBUS pin of the device 2 simultaneously Is now high.
  • the USB Tyep-C port device 1 is a UFP device
  • the USB Tyep-C port device 2 is a DFP device.
  • the voltage waveform of the CC pin of the device 1 is a low level
  • the voltage waveform of the CC pin of the device 2 is a high level.
  • the voltage waveform of the CC pin of the UFP device 1 port changes from a low level to a stable intermediate level; the voltage waveform of the CC pin of the DFP device 2 port is high. The level drops to a stable intermediate level.
  • device 1 and device 2 change to a stable intermediate level, CC identification is completed, device 1 is a slave device, and device 2 is a master device. After a period of time after the CC identification is completed, the device 2 starts charging the device 1, and the device 1 and the VBUS pin of the device 2 simultaneously appear at a high level.
  • the USB Type-C port device connected to the USB Type-A port device must be a DRP device or a UFP device, and cannot be a DFP device.
  • the USB Tyep-C port device 1 is a DRP device
  • the port of the device 2 is a Type-A port.
  • the USB Type-A port device 2 is connected to the USB cable at one end, and the voltage waveform of the CC pin of the USB Type-A port device 2 is detected at the Type-C plug end of the USB cable.
  • the voltage waveform of the CC pin of the USB Type-C port device 1 alternates between high and low levels.
  • the voltage of the CC pin of the two ports reaches a stable intermediate level to complete the CC identification.
  • the high level on the VBUS pin of USB Type-A port device 2 is always present.
  • the VBUS pin of device 1 of USB Type-C port also detects a high level.
  • the USB Tyep-C port device 1 is a UFP device, and the port of the device 2 is a Type-A port.
  • the Type-C plug of the USB cable detects the CC tube of the USB Type-A port device 2.
  • the voltage waveform of the pin is high, and the voltage waveform of the CC pin of the USB Type-C port device 1 is low.
  • USB Type-A port device 2 has a high level on the VBUS pin. Once device 1 and device 2 are connected, USB Type-C terminal The VBUS pin of port device 1 also detects a high level.
  • USB Type-C port device 1 is connected to the USB Type-A port device 2, and the USB Type-C port device is connected.
  • the high level and CC identification on the VBUS pin of 1 are simultaneous, and the USB Type-C port device 1 is connected to the USB Type-C port device 2, and the USB Type-C port device 1 has a high power on the VBUS pin.
  • the flat appearance is later than the CC recognition is completed.
  • FIG. 9 is a USB Type-A port device, which can identify whether the device connected by the peer end is a USB Type-A port device according to an embodiment of the present invention.
  • FIG. 9 is a device with a USB Type-C port according to an embodiment of the present invention.
  • the USB Type-C port device includes at least a USB port (Type-C port, not shown), a USB controller, and an application processor (AP).
  • the USB Type-C port includes a CC1 pin, a CC2 pin, and a VBUS pin
  • the USB controller includes a CC1 pin, a CC2 pin, and a VBUS pin, and is used for interaction with an application processor.
  • INT pin and I2C pin The CC1 pin and the CC2 pin on the USB controller are connected to the CC1 pin and the CC2 pin of the USB port.
  • the VBUS pin on the USB controller is connected to the VBUS pin on the USB port through a resistor R.
  • the application processor includes an GPIO pin and an I2C pin that interact with the USB controller.
  • the USB controller and the application processor are connected by an I2C pin, and the I2C pin of the USB controller is connected to an I2C pin of an application processor of the device.
  • the interrupt signal of the USB controller The pin INT is connected to the GPIO pin of the application processor.
  • a specific voltage waveform will appear on the CC1 pin or the CC2 pin, such as continuing high level, continuing low level, and alternating high and low levels.
  • the specific voltage is a continuous low level, it is used to indicate that the device is a UFP device.
  • the voltage is a continuous high level, it is used to indicate that the device is a DFP device.
  • the voltage is alternately changed between high and low levels, it is used to indicate that the device is a DRP device.
  • the device When the voltage of the CC pin of the USB Type-C port device rises from a low level to a stable intermediate level, the device acts as a slave device and is connected to a master device.
  • the voltage of the CC pin of the device When the voltage of the CC pin of the device is lowered from a high level to a stable intermediate level, it indicates that the device is the master device and is connected to a slave device.
  • the DRP device can be lowered from a high level to a stable intermediate level when connected, indicating that the device is the master device and is connected to a slave device; it can also be raised from a low level to a stable intermediate high level.
  • the device is made from the device and connected to a master device.
  • the USB controller of the USB Type-C port device detects the voltage change of the CC pin, and can detect the CC tube by comparing the voltage of the CC pin and the reference voltage value by setting the reference voltage value of the CC pin in the USB controller.
  • the voltage change of the foot is implemented by an internal comparison circuit of the USB controller.
  • the voltage change of the CC pin is detected as a function of the existing USB controller.
  • the USB controller of the USB Type-C port device detects the CC1 pin and the CC2 pin, and the voltage change of the VBUS pin, and obtains the time when the voltage of the CC1 pin or the CC2 pin changes to the stable intermediate level.
  • Point 1 to obtain the time point 2 when the voltage of the VBUS pin goes high.
  • Obtaining the time point 1 and the time point 2 is that the USB Type-C port device is connected to the peer device once, and the time point 1 and the time point 2 are acquired.
  • the USB Type-C port device When the pin becomes a stable intermediate level, the USB Type-C port device is disconnected from the peer device and then acquired when the second connection is made. The time at which the voltage of the VBUS pin appears high.
  • the USB controller compares the time point 1 and the time point 2, and determines, according to the comparison result, whether the device connected to the peer end of the USB Type-C port device is a USB Type-A port device, and sends the device to the application processing. AP.
  • the USB controller may also send the comparison result to the AP, and determine, according to the comparison result, whether the device connected to the peer end of the USB Type-C port device is a USB Type-A port device.
  • the USB controller may also send the time point 1 and the time point 2 to the AP, and the time point 1 and the time point 2 are compared by the AP.
  • the time point 1 is equal to the time point 2, and the device connected to the peer end of the USB Type-C port device is a USB Type-A port device; the time point 1 is earlier than the time point 2, then the The device connected to the USB Type-C port device is not a USB Type-A port device.
  • the CC identification In order to determine whether the high level of the VBUS pin of the USB port of the USB Type-C port device is later than the CC identification is completed, it may also be judged by determining the voltage value of the VBUS pin when the CC identification is completed. If the CC identification is completed, the voltage on the VBUS pin is high, that is, the high level of the VBUS pin occurs no later than the time when the CC identification is completed, and the peer device is a USB Type-A port device. If the CC identification is completed, the voltage on the VBUS pin is low, that is, the high level of the VBUS pin appears later than the time when the CC identification is completed, and the peer device is not a USB Type-A port device.
  • the USB controller of the USB Type-C port device detects a voltage change of the CC1 pin and the CC2 pin; when the voltage of the CC1 pin or the CC2 pin changes to the stable intermediate level, the time is obtained.
  • the voltage value of the VBUS pin The USB controller can compare the voltage value of the VBUS pin with a preset voltage threshold to determine whether the obtained voltage value of the VBUS pin is a high level, and the charging voltage based on the USB is generally 5V.
  • the preset voltage threshold may be set to be 4.5V, and the USB controller determines, based on the comparison result, whether the device connected to the peer end of the USB Type-C port device is a USB Type-A port device and sends the device to the AP.
  • the USB controller may also send the comparison result to the AP, and the AP determines, according to the comparison result, whether the device connected to the peer end of the USB Type-C port device is a USB Type-A port device.
  • the USB controller can also send the voltage value of the VBUS pin to the AP, and the AP compares the voltage value of the VBUS pin with a preset voltage threshold. The voltage value of the VBUS pin is greater than or equal to the preset voltage threshold.
  • the voltage value of the VBUS pin is a high level, and the device connected to the opposite end of the USB Type-C port device is a USB Type-A port device; the voltage value of the VBUS pin is smaller than the preset The voltage threshold, that is, the voltage value of the VBUS pin is a low level, and the device connected to the opposite end of the USB Type-C port device is not a USB Type-A port device.
  • the sending, by the USB controller, the information (such as the comparison result, the voltage value of the VBUS pin, etc.) to the AP specifically includes: the USB controller sending an interrupt signal to the GPIO pin of the AP through the INT pin; The information is sent to the I2C pin of the AP through the I2C pin of the USB controller. After receiving the interrupt signal, the AP receives the information of the I2C pin.
  • the USB Type-C port based on the USB Type-C port has three types of roles. For a DFP device, it can only be a master device. The connected peer device cannot be a USB Type-A port device. Therefore, the DFP device can be not judged. Whether the peer device is the process of the USB Type-A port device. For a UFP device, you can only perform a slave device. You need to perform a process to determine whether the peer device is a USB Type-A port device. For a DRP device, when the device is the master device, the peer device cannot be a USB Type-A port device. Therefore, the DRP device acting as the master device may not perform the determination of whether the peer device is a USB Type-A port device. Function: When the device acts as a slave device, it needs to perform a function of determining whether the peer device is a USB Type-A port device.
  • the role of the USB Type-C port of the USB Type-C port device the application processor can be known in advance, as known from the memory.
  • the USB controller reports the DRP device to the AP as the master device or the slave device.
  • the USB controller can know whether the DRP device is the master device or the slave device from the voltage change of the CC pin.
  • a USB controller can report whether the AP is a master device or a slave device.
  • USB Type-C port device when used as a slave device, time point 1 and time point 2 are compared, or the VBUS pin voltage and the preset voltage threshold are compared. Therefore, it is determined that the peer device is a USB Type-C port device or a USB Type-A port device.
  • the USB Type-C port device passes the obtained voltage change of the CC pin, after processing by the USB controller, it is determined that the USB Type-C port device is the master device. Will judge the result Sended to the application processor, the application processor sends instructions to enable the USB Type-C port device to supply power through the USB port.
  • the USB Type-C port device is determined to be the master device, the USB Type-C port device also needs to be prepared to perform VBUS power supply. As a result, the VBUS power supply is delayed by the time recognized by the CC.
  • the USB Type-A port device when the first device is a USB Type-C port device and the second device is a USB Type-A port device, since the USB Type-A port device can only be the master device and is always powered externally, the USB Type- The A port device has a high level on the VBUS pin. When the voltage of the CC pin changes from a high level or a low level to a stable intermediate level, the VBUS pin on the USB Type-C port device detects the power supply of the USB Type-A port device.
  • the USB controller of a USB Type-C port device detects that the voltage on the CC pin is changed to a stable intermediate level, and the USB controller obtains the voltage value of the VBUS pin at this time. It is judged whether the peer device is a USB Type-C port device by the obtained voltage value of the VBUS pin.
  • a microcontroller may be included in the illustrated USB controller.
  • the MCU detects the voltage of the CC pin and the voltage of the VBUS pin, records the time point at which the CC identification is completed, and the time point at which the high level appears on the VBUS pin, and compares the timings of the two time points according to The comparison result determines whether the device connected to the peer end is a USB Type-A port device and sends the result to the AP; or the MCU sends the comparison result to the AP, and the AP determines whether the device connected to the peer end is a USB Type based on the comparison result.
  • the A port device; or the MCU reports the recorded time of the CC identification completion and the time when the high level appears on the VBUS pin to the AP.
  • the AP compares the two time points and determines whether the device connected to the peer is a USB Type- A port device.
  • a voltage threshold is set in the microcontroller (eg, the voltage threshold is 4.5V).
  • the MCU detects the voltage of the CC pin, obtains the voltage value of the VBUS pin at the time point when the CC is recognized, and compares the voltage value of the VBUS pin at the time point when the CC is recognized with the set voltage threshold to determine the VBUS pin. Whether a high level occurs, according to the comparison result, it is determined whether the device connected to the peer end is a USB Type-A port device, sent to the AP, or the MCU sends the comparison result The AP sends to the AP, and the AP determines whether the device connected to the peer is a USB Type-A port device based on the comparison result.
  • the voltage threshold is not set in the microcontroller.
  • the voltage threshold is set in the application processor.
  • the MCU sends the acquired voltage value of the VBUS pin at the time of CC identification to the application processor, and the application processor receives the voltage value of the VBUS pin when the CC is sent by the microcontroller.
  • the application processor compares the voltage value of the acquired VBUS pin with the voltage threshold and determines whether the peer device is a USB Type-A port device.
  • the USB specification stipulates that in the "Type-C to Type-C cable", when the master device and the slave device complete the CC identification, determine that the master device is the master device and the slave device respectively, and determine that the master device supplies power to the slave device. After the voltage of the VBUS pin is prepared, it is powered on the VBUS pin, and the master device performs normal charging on the slave device. After the normal charging is started, the master device and the slave device negotiate to charge using the USB Type-C PD charging protocol, and the master device also broadcasts the source capability packet of the USB Type-C PD charging scheme to the slave device, where the source capability package includes The fast charging voltage and current that the main device can provide.
  • the slave device After receiving the broadcast of the master device, the slave device will transmit to the master device the fast charging voltage and current selected from the source capability packets broadcast by the master device.
  • the charging mode of the master device and the slave device is switched to the PD fast charging, such as 5A current charging.
  • the USB Type-A port device cannot Issue the source capability package. As the USB Type-C port device of the slave device, it waits for the command from the peer device.
  • USB Type-C port device acting as the slave device will try to negotiate the Type-C PD charging scheme with Type-A because USB Type-A port devices do not support the Type-C PD charging scheme.
  • the USB Type-C port device further negotiates a charging scheme supported by the common fast charging protocol to the USB Type-A port device.
  • the normal fast charging protocol includes QC2.O (Quick Charge 2.0), FCP (Fast Charge Protocol), and MTK. (MediaTek), PumpExpress, etc., enable the USB Type-A port device to switch the charging of the USB Type-C port device to the normal fast charging mode.
  • the normal fast charging protocol does not include the USBType-C PD charging protocol.
  • the application processor is configured according to a terminal end of the peer device.
  • the port type is processed accordingly.
  • the USB Type-C port device determines that it is a slave device, and when the application processor determines that the peer device is a master device of the Type-C port, waits for the USB Type sent by the peer Type-C port master device.
  • the application processor issues a control instruction, where the control command is used to instruct the USB Type-C port device to negotiate with the peer USB Type-A port device.
  • USB Type-C port device when the USB Type-C port device is connected to the USB Type-A port device, it does not need to wait for the source capability package of the USB Type-C PD charging scheme, nor does it need to negotiate the PD charging scheme, and can directly negotiate the support of the ordinary fast charging protocol. charging method.
  • the conventional fast charging protocol includes QC2.O (Quick Charge 2.0), FCP (Fast Charge Protocol), MTK (MediaTek), and PumpExpress.
  • the charging scheme that negotiates to follow the normal fast charging protocol may be a charging protocol that sends a message indicating that it supports itself, waits for feedback from the peer device, may send a message indicating different protocols in turn, or may be a fixed transmission indicating a fast charging protocol. Message.
  • a microcontroller (English: Micro Controller, MCU) may not be included in the USB controller. Since the USB controller is a USB Type-C controller chip that does not have an MCU, it is impossible to obtain the voltage of the VBUS pin when the CC identification is completed, and set the voltage threshold, and the set voltage threshold and the acquired CC identification are completed. When the voltage value of the VBUS pin is compared, an additional MCU is required to implement a specific function.
  • FIG. 10 is another device with a USB Type-C port according to an embodiment of the present invention.
  • the USB Type-C port device includes at least a USB port, and the USB controller includes a CC1 pin, a CC2 pin, a VBUS pin connected to the USB port, and an INT pin connected to the processor.
  • I2C pins I2C pins.
  • the application processor includes a GPIO_1 pin, a GPIO_2 pin, and an I2C pin.
  • the MCU includes a GPIO_1 pin, a GPIO_2 pin, and a GPIO_3 pin, as well as an I2C pin and an INT pin.
  • the CC1 pin of the USB Type-C port is connected to the CC1 of the USB controller, and the CC2 pin of the USB port is connected to the CC2 of the USB controller, and the VBUS pin of the USB port shown is powered.
  • Resistor R is connected to the VBUS of the USB controller.
  • the INT of the USB controller shown is connected to the GPIO_1 of the processor, which is connected to the I2C of the application processor.
  • the CC1 pin of the USB port is connected to the GPIO_1 pin of the MCU, and the CC2 pin of the USB port is connected to the GPIO_2 pin of the MCU, and the VBUS pin of the USB port is connected to the GPIO_3 pin of the MCU.
  • the I2C pin of the MCU is connected to the I2C pin of the application processor, and the INT pin of the MCU is connected to the GPIO_2 pin of the application processor.
  • the MCU in FIG. 10 has a similar function to the MCU in the USB controller in the embodiment shown in FIG. 9, such as monitoring the voltage of the CC pin, when the voltage of the CC pin becomes a stable intermediate level, Get the voltage value of the VBUS pin.
  • the MCU may be configured with the preset voltage threshold, compare the voltage value of the VBUS pin and the preset voltage threshold, and determine whether the peer device is a USB Type-A port device, and the VBUS may be The voltage value of the pin is sent to the AP, and the AP makes a comparison judgment.
  • the interaction between the MCU and the AP can be referred to the embodiment shown in FIG.
  • the MCU sends information (such as the comparison result, the voltage value of the VBUS pin, etc.) to the AP, specifically: the MCU sends an interrupt signal to the GPIO_2 pin of the AP through the INT pin; The I2C pin of the MCU sends information to the I2C pin of the AP. After receiving the interrupt signal, the AP receives the information of the I2C pin.
  • information such as the comparison result, the voltage value of the VBUS pin, etc.
  • the USB Type-C port based on the USB Type-C port has three types of roles. For a DFP device, it can only be a master device. The connected peer device cannot be a USB Type-A port device. Therefore, the DFP device can be not judged. Whether the peer device is the process of the USB Type-A port device. For a UFP device, you can only perform a slave device. You need to perform a process to determine whether the peer device is a USB Type-A port device. For a DRP device, when the device is the master device, the peer device cannot be a USB Type-A port device. Therefore, the DRP device acting as the master device may not perform the determination of whether the peer device is a USB Type-A port device. Function: When the device acts as a slave device, it needs to perform a function of determining whether the peer device is a USB Type-A port device.
  • the role of the USB Type-C port of the USB Type-C port device the application processor can be known in advance, as known from the memory.
  • a USB controller can be reported to the AP when connected. Whether the DRP device is the master device or the slave device, the USB controller can know whether the DRP device is the master device or the slave device from the voltage change of the CC pin.
  • a USB controller can report whether the AP is a master device or a slave device.
  • the sending, by the USB controller, the information (the USB Type-C port device as the master device or the slave device, etc.) to the AP specifically includes: the USB controller sends an interrupt signal to the GPIO_1 pin of the AP through the INT pin; Information is sent to the I2C pin of the AP through the I2C pin of the USB controller. After receiving the interrupt signal, the AP receives the information of the I2C pin.
  • FIG. 11 is a schematic diagram of a USB Type-C port device for identifying a peer device according to an embodiment of the present invention. As shown in Figure 11, the method is applied to a USB Type-C port device.
  • the USB Type-C port device is connected to another USB device through a USB cable, the USB Type-C port device is a first device, and the other USB device is a second device.
  • the method in the embodiment of the present invention specifically includes:
  • step 801 the voltage of the CC pin is monitored.
  • the USB Type-C port device detects the voltage of the CC pin regardless of whether it is connected to the peer device. When the USB Type-C port device is not connected to the peer device, the voltage of the CC pin of the USB Type-C port device is high level or low level, or the high level and the low level alternate. Once the USB Type-C port device is connected to the peer device, the voltage of the CC pin of the USB Type-C port device becomes a stable intermediate level. When the USB Type-C port device detects that the voltage of the CC pin changes from a stable intermediate level to a high level or a low level, it is determined that the USB Type-C port device is disconnected from the opposite device.
  • An embodiment of the present invention is for identifying a peer device of the USB Type-C port device, so that the voltage of the CC pin that the USB Type-C port device needs to refer to may not be from the USB Type-C port device.
  • the voltage of the CC pin during the connection between the USB Type-C port device and the peer device when the peer device is connected.
  • Step 802 Acquire a voltage value of the VBUS pin when the voltage of the CC pin changes to a stable intermediate level.
  • the voltage of the CC pin changes to a stable intermediate level which can be in two CC pins.
  • One of the CC pin voltages becomes a stable intermediate level.
  • the USB Type-C port device includes a USB controller and an application processor, and one end of the USB controller is connected to a USB Type-C port of the USB Type-C port device, and the other end of the USB controller is The application processor is connected.
  • the first device is connected to a peer device
  • the voltage on the CC pin of the Type-C port of the USB Type-C port device connected to the USB controller will change to a stable intermediate level.
  • the voltage of the CC pin of the USB Type-C port device changes to a stable intermediate level, the voltage of the VBUS pin of the USB Type-C port device is obtained.
  • the specific operation method for obtaining the voltage value of the VBUS pin may be: the first device will record the time when the voltage of the CC pin changes to a stable intermediate level, that is, the first The time when the device is connected to a second device is recorded as the first time.
  • the VBUS pin is connected to a USB controller that records the voltage value of the VBUS pin for the first time.
  • Step 803 determining whether the voltage value of the VBUS pin is a high level.
  • the voltage value of the acquired VBUS pin may be compared with a voltage threshold preset in the USB Type-C port device, and if the voltage value of the VBUS pin is greater than or equal to the voltage threshold, If the voltage value of the VBUS pin is a high level, it is determined that the peer device is a USB Type-A port device (step 804), and if the voltage value of the VBUS pin is less than the voltage threshold, that is, the VBUS pin If the voltage value is low, the peer device is not a USB Type-C port device (step 805).
  • the USB Type-C device is a slave device, and the application processor of the USB Type-C device determines that the peer device is not a USB Type-A port device, and determines that the peer device is a USB Type-C port device.
  • the application processor processes according to an existing process, that is, a process in which a USB Type-C port device is connected to a USB Type-C port device. For example, wait for the peer device to send a USB PD charging scheme.
  • the application processor determines that the peer device is a USB Type-A port device
  • the application processor is configured to instruct the USB Type-C port device to negotiate with the USB Type-A port device to follow a normal fast charging protocol.
  • the charging scheme includes QC2.0 (Quick Chareg 2.0), MTK (MediaTek), One or more of Pump Express, FCP (Fast Chareg Processor), and the like.
  • the normal fast charging protocol may be negotiated with the USB Type-A port device to send a message to the USB Type-A port device, where the message indicates the normal fast charging protocol supported by the USB Type-C port device. Specifically, after the message indicating that the fast charging protocol is sent once, when the USB Type-A port device feeds back the protocol, the sending is stopped, and the USB Type-A port device does not support the protocol, and then Send the next protocol.
  • FIG. 12 is a method for identifying a peer device by using a USB Type-C port device according to an embodiment of the present invention, which is performed by a first device, where the first device is a USB Type-C port device with DRP, DRP. device.
  • Step 901 The first device determines whether the CC identification is completed, that is, detects whether the voltage on the CC pin becomes a stable intermediate level.
  • the USB Type-C port device detects the voltage of the CC pin regardless of whether it is connected to the peer device.
  • the voltage of the CC pin of the USB Type-C port device is high level or low level, or the high level and the low level alternate.
  • the voltage of the CC pin of the USB Type-C port device becomes a stable intermediate level.
  • the USB Type-C port device detects that the voltage of the CC pin changes from a stable intermediate level to a high level or a low level, it is determined that the USB Type-C port device is disconnected from the opposite device.
  • the DRP device needs to identify the peer device connected to the DRP device, so the voltage of the CC pin of the DRP device can be concerned from when the DRP device is not connected to the peer device.
  • the voltage on the CC pin changes from a high level or a low level in the alternating high and low level to a stable intermediate level, CC identification is completed, step 902 is performed, and if not completed, step 901 is continued.
  • Step 902 Determine whether the first device itself is a slave device. Whether the first device determines whether it is a master device or not can be determined by a change in a CC voltage. When the voltage on the CC pin is high The flat becomes a stable voltage, and the first device itself is the master device. When the voltage on the CC pin changes from a low level to a stable voltage, the first device itself is a slave device. When the first device is the master device, the process proceeds to step 904 of the normal process, that is, the normal data transmission, the charging protocol negotiation, and the like after the USB Type-C port device is the master device. When the first device is a slave device, step 903 is performed.
  • step 903 the time sequence in which the CC identification is completed and the high level voltage on the VBUS pin appears is determined. If the two are at the same time, step 905 is performed to determine that the peer device is a Type-A port device; if the CC recognition is completed earlier than the high level voltage on the VBUS pin, step 906 is executed to determine that the peer device is Type-C. Port device. After the step 905, the first device may also negotiate a normal fast charging protocol with the peer device.
  • the time point at which the high level voltage appears on the VBUS pin refers to the time point when the low level of the VBUS pin changes to a high level from when the DRP device is not connected to the opposite device.
  • the time point at which the CC recognition is completed and the time point at which the high-level voltage on the VBUS pin occurs can be obtained, thereby comparing the time sequence in which the CC recognition is completed and the high-level voltage on the VBUS pin appears. . It can also be judged by obtaining the voltage value on the VBUS pin when the CC identification is completed. If the voltage value on the VBUS pin is high when the CC identification is completed, the CC identification is completed and the high level voltage on the VBUS pin appears simultaneously. If the voltage value on the VBUS pin is low when the CC identification is completed, the high level voltage on the VBUS pin is later than the CC identification.
  • FIGS. 9 and 10 For details, refer to the embodiments corresponding to FIGS. 9 and 10.
  • FIG. 13 is a method for identifying a peer device by a USB Type-C port device according to an implementation of the present invention, which is executed by a UFP device.
  • the judgment process is the same as the process shown in FIG. 12, and the execution subject is a UFP device, which can only be a slave device, and does not need to perform steps 902 and 904.
  • Steps 1001, 1002, 1003, and 1004 respectively correspond to Steps 901, 903, 905 and 906.
  • FIG. 14 is a schematic diagram of a device including a USB Type-C port according to an embodiment of the present invention, including:
  • the detecting unit 1101 is configured to detect the voltage of the CC pin and the voltage of the VBUS pin.
  • the USB Type-C port device detects the voltage of the CC pin regardless of whether it is connected to the peer device.
  • the voltage of the CC pin of the USB Type-C port device is high level or low level, or the high level and the low level alternate.
  • the voltage of the CC pin of the USB Type-C port device will have a high level or a low level to become a stable intermediate level.
  • USB Type-C port device When the USB Type-C port device detects that the voltage of the CC pin changes from a stable intermediate level to a high level or a low level, it is determined that the USB Type-C port device is disconnected from the opposite device.
  • the main concern in this embodiment is that the USB Type-C port device is not connected to the peer device, and the voltage of the CC pin to the time when the USB Type-C port device is connected to the peer device.
  • the processing unit 1102 is configured to determine a time sequence in which the CC identification is completed and a high level appears on the VBUS pin; the CC identification is completed as an intermediate level at which the voltage of the CC pin becomes stable; the peer device is used for Connect to the USB Type-C port of the USB Type-C port device through a USB cable;
  • the peer device is a USB Type-A port device when a high level occurs on the VBUS pin while the CC identification is completed;
  • the peer device is not a USB Type-A port device.
  • the device may further include a negotiating unit 1103, configured to: when determining that the peer device is a USB Type-A port device, negotiate a normal fast charging protocol with the peer device.
  • a negotiating unit 1103 configured to: when determining that the peer device is a USB Type-A port device, negotiate a normal fast charging protocol with the peer device.
  • the detecting unit 1101 is configured to detect a CC pin voltage, and when the CC pin voltage changes from a high level or a low level to a stable intermediate level, the voltage value of the VBUS pin is detected.
  • the processing unit 1102 is configured to compare the voltage value of the VBUS pin with a preset voltage threshold. When the voltage value of the VBUS pin is greater than or equal to a preset voltage threshold, determine that the peer device is a USB Type-A port. The device determines that when the voltage value of the VBUS pin is less than a preset voltage threshold The peer device is a USB Type-C port device.
  • the detecting unit 1101 is configured to detect the CC pin voltage, record the time point 1 when the CC pin voltage becomes a stable intermediate level, detect the voltage value of the VBUS pin, and record the high voltage of the VBUS pin. Flat time point 2.
  • the processing unit 1102 is configured to compare the time point 1 and the time point 2, and when the time point 1 is equal to the time 2, determine that the peer device is a USB Type-A port device, and when the time point 1 is less than the time point 2, determine The peer device is a USB Type-C port device.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Power Sources (AREA)

Abstract

本发明实施例涉及一种USB Type-C端口设备识别对端设备的方法,所述USB Type-C端口设备的Type-C端口包括配置通道(configuration channel)CC管脚和VBUS管脚,所述方法具体包括:所述USB Type-C端口设备检测所述CC管脚的电压和所述VBUS管脚的电压;判断所述CC管脚的电压变为稳定的中间电平和VBUS管脚上出现高电平的时间顺序;当所述CC管脚的电压变为稳定的中间电平的同时所述VBUS管脚上出现高电平,则确定所述对端设备是USB Type-A端口设备;当所述CC管脚的电压变为稳定的中间电平早于所述VBUS管脚上出现高电平,则确定所述对端设备不是USB Type-A端口设备。因此USB Type-C端口设备可以识别对端连接的设备是否是USB Type-A端口设备。

Description

一种USB Type-C端口设备识别对端设备的方法、装置和系统 技术领域
本发明涉及USB连接技术领域,尤其涉及一种USB Type-C端口设备识别对端设备的方法、装置和设备。
背景技术
目前智能手机充电器、PC机、笔记本电脑的主流USB端口,主要是USB Type-A的端口。未来,USB Type-C端口将成为PC机、笔记本电脑、USB充电器、智能手机、平板电脑等电子产品USB端口的趋势。USB“Type-C到Type-C线缆”将成为未来智能手机、PC机、笔记本电脑USB充电器、平板电脑等电子产品的主流充电线缆。
在USB Type-C端口完全取代现有的USB Type-A端口之前,将会存在Type-C、Type-A共存的局面。即同时存在如图1A所示“Type-A到Type-C线缆”和如图1B所示“Type-C到Type-C线缆”。
USB规范规定,USB Type-A端口设备永远做主设备。
USB规范规定,USB Type-C端口设备的USB端口为双角色端口(Dual Role Port,DRP)时,在连接建立过程中可以根据对端设备的USB端口的角色,决定做主设备或从设备;USB Type-C端口设备的USB端口为向下端口(Down Facing Port,DFP)时,在连接建立过程中只做主设备;或USB Type-C端口设备的USB端口为向上端口(Up Facing Port,UFP)时,在连接建立过程中只做从设备。
USB Type-C端口设备和USB Type-A端口设备连接时,USB Type-C端口设备只能做从设备,但无法获知对端设备是否是USB Type-A端口设备。
发明内容
本发明实施例提供了一种USB Type-C端口设备识别对端设备的方法、USB Type-C端口设备和一种识别对端设备的装置。
第一方面,提供了一种USB Type-C端口设备识别对端设备的方法,所述USB Type-C端口设备的Type-C端口包括配置通道(configuration channel)CC管脚和VBUS管脚,所述方法具体包括:所述USB Type-C端口设备检测所述CC管脚的电压和所述VBUS管脚的电压;判断所述CC管脚的电压变为稳定的中间电平和VBUS管脚上出现高电平的时间顺序;当所述CC管脚的电压变为稳定的中间电平的同时所述VBUS管脚上出现高电平,则确定所述对端设备是USB Type-A端口设备;当所述CC管脚的电压变为稳定的中间电平早于所述VBUS管脚上出现高电平,则确定所述对端设备不是USB Type-A端口设备。
结合第一方面,在第一方面的第一种实现方式中,所述USB Type-C端口设备检测所述CC管脚的电压和所述VBUS管脚的电压包括:所述CC管脚的电压变为稳定的中间电平的同时获取VBUS管脚的电压值;所述判断所述CC管脚的电压变为稳定的中间电平和VBUS管脚上出现高电平的时间顺序为:判断所述VBUS管脚的电压值是否是高电平;当所述VBUS管脚的电压值是高电平时,则所述CC管脚的电压变为稳定的中间电平的同时所述VBUS管脚上出现高电平;当所述VBUS管脚的电压值不是高电平时,则所述CC管脚的电压变为稳定的中间电平早于所述VBUS管脚上出现高电平。
结合第一方面,在第一方面的第二种实现方式中,所述USB Type-C端口设备检测所述CC管脚的电压和所述VBUS管脚的电压包括:检测所述CC管脚和VBUS管脚的电压,记录所述CC管脚的电压变为稳定的中间电平的时间点,记录所述VBUS管脚上出现高电平的时间点;所述判断所述CC管脚的电压变为稳定的中间电平和VBUS管脚上出现高电平的时间顺序为:判断所述CC管脚的电压变为稳定的中间电平的时间点和所述VBUS管脚上出现高电平的时间点的先后顺序,如果所述CC管脚的电压变为稳定的中间电平的时间点和所述 VBUS管脚上出现高电平的时间点相同,则所述CC管脚的电压变为稳定的中间电平的同时所述VBUS管脚上出现高电平;如果所述CC管脚的电压变为稳定的中间电平的时间点早于所述VBUS管脚上出现高电平的时间点,则所述CC管脚的电压变为稳定的中间电平早于所述VBUS管脚上出现高电平。
结合第一方面,在第一方面的第三种实现方式中当确定所述对端设备是USB Type-A端口设备,所述方法还包括,所述USB Type-C端口设备与所述USB Type-A端口设备协商支持普通快速充电协议的充电方案,所述普通快速充电协议不包括USB PD充电协议。
结合第一方面,在第一方面的第四种实现方式中,所述判断所述CC管脚的电压变为稳定的中间电平和VBUS管脚上出现高电平的时间顺序为当所述USB Type-C端口设备为从设备时,判断所述CC管脚的电压变为稳定的中间电平和所述VBUS管脚上出现高电平的顺序;所述当所述CC管脚的电压变为稳定的中间电平早于所述VBUS管脚上出现高电平,则所述对端设备不是USB Type-A端口设备为:当所述CC管脚的电压变为稳定的中间电平早于所述VBUS管脚上出现高电平,则所述对端设备是USB Type-C端口设备。
第二方面,提供了一种USB Type-C端口设备,所述USB Type-C端口设备包括USB Type-C端口,应用处理器和微控制器,所述USB Type-C端口包括配置通道(configuration channel)CC管脚和VBUS管脚,所述微控制器与所述CC管脚和VBUS管脚连接,所述微控制器与所述应用处理器连接;所述微控制器用于检测所述CC管脚的电压和所述VBUS管脚的电压;所述微控制器或所述应用处理器用于判断所述CC管脚的电压变为稳定的中间电平和VBUS管脚上出现高电平的时间顺序;当所述CC管脚的电压变为稳定的中间电平的同时所述VBUS管脚上出现高电平,则确定所述对端设备是USB Type-A端口设备;当所述CC管脚的电压变为稳定的中间电平早于所述VBUS管脚上出现高电平,则所述对端设备不是USB Type-A端口设备;所述对端设备用于通过 USB线缆与所述USB Type-C端口设备的USB Type-C端口连接。
结合第二方面,在第二方面的第一种实现方式中,所述应用处理器用于判断所述CC管脚的电压变为稳定的中间电平和VBUS管脚上出现高电平的时间顺序之前,所述微控制器还用于将检测所述CC管脚的电压和所述VBUS管脚的电压的结果上报给所述应用处理器。
结合第二方面,在第二方面的第二种实现方式中,所述微控制器确定所述对端设备是USB Type-A端口设备或所述对端设备不是USB Type-A端口设备之后,所述微控制器还用于上报所述应用处理器所述对端设备是或不是USB Type-A端口设备。
结合第二方面至第二方面的第二种实现方式的任一种,在第二方面的第三种实现方式中,所述微控制器用于所述微控制器用于检测所述CC管脚的电压和所述VBUS管脚的电压包括:所述微控制器检测所述CC管脚的电压,在所述CC管脚的电压变为稳定的中间电平的同时获取VBUS管脚的电压值;所述微控制器或所述应用处理器用于判断所述CC管脚的电压变为稳定的中间电平和VBUS管脚上出现高电平的时间顺序为:判断所述VBUS管脚的电压值是否是高电平;当所述VBUS管脚的电压值是高电平时,则所述CC管脚的电压变为稳定的中间电平的同时所述VBUS管脚上出现高电平;当所述VBUS管脚的电压值不是高电平时,则所述CC管脚的电压变为稳定的中间电平早于所述VBUS管脚上出现高电平。
结合第二方面至第二方面的第二种实现方式的任一种,在第二方面的第四种实现方式中,所述微控制器用于检测所述CC管脚的电压和所述VBUS管脚的电压包括:所述微控制器检测所述CC管脚的电压和所述VBUS管脚的电压,记录所述CC管脚的电压变为稳定的中间电平的时间点,和所述VBUS管脚上出现高电平的时间点;所述微控制器或所述应用处理器用于判断所述CC管脚的电压变为稳定的中间电平和VBUS管脚上出现高电平的时间顺序为:判断所述CC管脚的电压变为稳定的中间电平的时间点和所述VBUS管脚上出现 高电平的时间点的先后顺序,如果所述CC管脚的电压变为稳定的中间电平的时间点和所述VBUS管脚上出现高电平的时间点相同,则所述CC管脚的电压变为稳定的中间电平的同时所述VBUS管脚上出现高电平;如果所述CC管脚的电压变为稳定的中间电平的时间点早于所述VBUS管脚上出现高电平的时间点,则所述CC管脚的电压变为稳定的中间电平早于所述VBUS管脚上出现高电平。
结合第二方面至第二方面的第四种实现方式的任一种,在第二方面的第五种实现方式中,当确定所述对端设备是USB Type-A端口设备,所述应用处理器还包括,指示所述USB Type-C端口设备与所述USB Type-A端口设备协商支持普通快速充电协议的充电方案,所述普通快速充电协议不包括USB PD充电协议。
结合第二方面至第二方面的第五种实现方式的任一种,在第二方面的第六种实现方式中,所述微控制器或所述应用处理器判断所述CC管脚的电压变为稳定的中间电平和VBUS管脚上出现高电平的时间顺序为:当所述USB Type-C端口设备为从设备时,判断所述CC管脚的电压变为稳定的中间电平和所述VBUS管脚上出现高电平的顺序;
所述当所述CC管脚的电压变为稳定的中间电平早于所述VBUS管脚上出现高电平,则所述对端设备不是USB Type-A端口设备为:当所述CC管脚的电压变为稳定的中间电平早于所述VBUS管脚上出现高电平,则所述对端设备是USB Type-C端口设备。
结合第二方面的第六种实现方式的任一种,在第二方面的第七种实现方式中,所述USB Type-C端口设备还包括USB控制器,所述USB控制器用于确定所述USB Type-C设备做从设备。
结合第二方面至第二方面的第七种实现方式的任一种,在第二方面的第八种实现方式中,所述微控制器置于所述USB控制器中。
第三方面,提供了一种识别对端设备的装置,应用在USB Type-C端口设备上,所述USB Type-C端口设备的Type-C端口包括配置通道(configuration channel)CC管脚和VBUS管脚,装置包括:检测单元用于检测所述CC管脚的电压和所述VBUS管脚的电压;处理单元用于判断所述CC管脚的电压变为稳定的中间电平和所述VBUS管脚上出现高电平的时间顺序;所述对端设备用于通过USB线缆与所述USB Type-C端口设备的USB Type-C端口连接;当所述CC管脚的电压变为稳定的中间电平的同时所述VBUS管脚上出现高电平,则确定所述对端设备是USB Type-A端口设备;当所述CC管脚的电压变为稳定的中间电平早于所述VBUS管脚上出现高电平,则所述对端设备不是USB Type-A端口设备。
结合第三方面,在第三方面的第一种实现方式中,所述检测单元具体用于:检测所述CC管脚的电压,所述CC管脚的电压变为稳定的中间电平的同时获取VBUS管脚的电压值;所述处理单元具体用于:判断所述VBUS管脚的电压值是否是高电平;当所述VBUS管脚的电压值是高电平时,则所述CC管脚的电压变为稳定的中间电平的同时所述VBUS管脚上出现高电平;当所述VBUS管脚的电压值不是高电平时,则所述CC管脚的电压变为稳定的中间电平早于所述VBUS管脚上出现高电平。
结合第三方面,在第三方面的第二种实现方式中,所述检测单元具体用于:检测所述CC管脚和VBUS管脚的电压,记录所述CC管脚的电压变为稳定的中间电平的时间点和所述VBUS管脚上出现高电平的时间点;所述处理单元具体用于:判断所述CC管脚的电压变为稳定的中间电平的时间点和所述VBUS管脚上出现高电平的时间点的先后顺序,如果所述CC管脚的电压变为稳定的中间电平的时间点和所述VBUS管脚上出现高电平的时间点相同,则所述CC管脚的电压变为稳定的中间电平的同时所述VBUS管脚上出现高电平;如果所述CC管脚的电压变为稳定的中间电平的时间点早于所述VBUS管脚上出现高电平的时间点,则所述CC管脚的电压变为稳定的中间电平早于所述VBUS管 脚上出现高电平。
结合第三方面至第三方面的第二种实现方式中的任一种,在第三方面的第三种实现方式中,所述装置还包括协商单元,当确定所述对端设备是USB Type-A端口设备,所述协商单元用于与所述USB Type-A端口设备协商支持普通快速充电协议的充电方案,所述普通快速充电协议不包括USB PD充电协议。
基于上述技术方案,本发明实施例的USB Type-C端口设备可以在连接时识别对端设备是否是USB Type-A端口设备。进一步地可以在识别出对端设备是USB Type-A端口设备时直接协商普通快速充电协议,以便USB Type-C端口设备和USB Type-A端口设备连接时尽早进入快速充电模式。
第四方面,提供了一种USB Type-C端口设备识别对端设备的方法,所述USB Type-C端口设备的Type-C端口包括配置通道(configuration channel)CC管脚和VBUS管脚,所述方法具体包括:所述USB Type-C端口设备检测所述CC管脚的电压;当所述CC管脚的电压变为稳定的中间电平的同时获取VBUS管脚的电压值;判断所述VBUS管脚的电压值是否为高电平;当所述VBUS管脚的电压值为高电平,则确定所述对端设备是USB Type-A端口设备;当所述VBUS管脚的电压值为低电平,则确定所述对端设备不是USB Type-A端口设备。
结合第四方面,在第四方面的第一种实现方式中当确定所述对端设备是USB Type-A端口设备,所述方法还包括,所述USB Type-C端口设备与所述USB Type-A端口设备协商支持普通快速充电协议的充电方案,所述普通快速充电协议不包括USB PD充电协议。
结合第四方面,在第四方面的第二种实现方式中,所述判断所述VBUS管脚的电压值是否为高电平为当所述USB Type-C端口设备为从设备时,判断所述VBUS管脚的电压值是否为高电平;所述当所述VBUS管脚的电压值为低电平,则确定所述对端设备不是USB Type-A端口设备为:当当所述VBUS管脚的电压值为低电平,则确定所述对端设备是USB Type-C端口设备。
第五方面,提供了提供了一种USB Type-C端口设备,所述USB Type-C 端口设备包括USB Type-C端口,应用处理器和微控制器,所述USB Type-C端口包括配置通道(configuration channel)CC管脚和VBUS管脚,所述微控制器与所述CC管脚和VBUS管脚连接,所述微控制器与所述应用处理器连接;所述微控制器用于检测所述CC管脚的电压,当所述CC管脚的电压变为稳定的中间电平的同时获取VBUS管脚的电压值;所述微控制器或所述应用处理器用于判断所述VBUS管脚的电压值是否为高电平;当所述VBUS管脚的电压值为高电平,则确定所述对端设备是USB Type-A端口设备;当所述VBUS管脚的电压值为低电平,则确定所述对端设备不是USB Type-A端口设备。
结合第五方面,在第五方面的第一种实现方式中,所述应用处理器还包括当确定所述对端设备是USB Type-A端口设备,指示所述USB Type-C端口设备与所述USB Type-A端口设备协商支持普通快速充电协议的充电方案,所述普通快速充电协议不包括USB PD充电协议。
结合第五方面,在第五方面的第二种实现方式中,所述USB Type-C端口设备还包括USB控制器,所述USB控制器与所述应用处理器连接,所述USB控制器用于确定所述USB Type-C端口设备是主设备或从设备,并上报给所述应用处理器;所述应用处理器还用于当所述USB Type-C端口设备为从设备时,且所述VBUS管脚的电压值为低电平,则确定所述对端设备是USB Type-C端口设备。
结合第五方面,在第五方面的第三种实现方式中,所述微控制器处于所述USB控制器中。
基于上述技术方案,本发明实施例的USB Type-C端口设备通过判断所述CC管脚的电压变为稳定的中间电平时的VBUS管脚的电压值是否为高电平,可以在与对端设备连接时识别对端设备是否是USB Type-A端口设备。进一步地可以在识别出对端设备是USB Type-A端口设备时直接协商普通快速充电协议,以便USB Type-C端口设备和USB Type-A端口设备连接时尽早进入快速充电模式。
附图说明
图1A为本发明实施例提供的Type-A到Type-C线缆;
图1B为本发明实施例提供的Type-A到Type-C线缆;
图2A为本发明实施例提供的DFP设备的CC管脚内部电路示意图;
图2B为本发明实施例提供的UFP设备的CC管脚内部电路示意图;
图2C为本发明实施例提供的DRP设备的CC管脚内部电路示意图;
图3为本发明实施例提供的DRP设备与DRP设备各自的配置通道管脚、电源管脚的电压波形;
图4为本发明实施例提供的DRP设备与UFP设备各自的配置通道管脚、电源管脚的电压波形;
图5为本发明实施例提供的DRP设备与DFP设备各自的配置通道管脚、电源管脚的电压波形;
图6为本发明实施例提供的UFP设备与DFP设备各自的配置通道管脚、电源管脚的电压波形;
图7为本发明实施例提供的DRP设备与USB Type-A端口设备各自的配置通道管脚、电源管脚的电压波形;
图8为本发明实施例提供的UFP设备与USB Type-A端口设备各自的配置通道管脚、电源管脚的电压波形;
图9为本发明实施例提供的一种USB Type-C端口设备结构图;
图10为本发明实施例提供的另一种USB Type-C端口设备结构图;
图11为本发明实施例提供的一种USB Type-C端口设备识别对端设备的方法;
图12为本发明实施提供的一种DRP设备的识别对端设备的方法;
图13为本发明实施提供的一种UFP设备识别对端设备的方法;
图14为本发明实施例提供的一种USB Type-C端口设备。
具体实施方式
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行描述。
在本发明的实施例中,所述USB端口类型可以包括C型(USB Type-C)端口和A型(USB Type-A)端口,以及B型(USB Type-B)端口。以下对于带有A型端口的设备称为USB Type-A端口设备,以此类推。由于USB Type-B端口设备总是做从设备,当与USB Type-C端口设备连接时,所述USB Type-C端口设备做主设备。USB Type-A端口设备只做主设备,当与USB Type-C端口设备连接时,所述USB Type-C端口设备做从设备。
USB Type-C端口设备在没有通过USB端口连接另一个对端设备时,按照USB Type-C线缆和连接器规范版本1.1(Universal Serial Bus Type-C Cable and Connector Specification,revision 1.1),所述USB Type-C端口设备的USB Type-C端口的角色类型可以是三种角色中的一种,所述三种角色分别如表1所示。
表1
Figure PCTCN2016079076-appb-000001
Figure PCTCN2016079076-appb-000002
上述表1中的UFP用于表示向上端口(Up Facing Port,UFP),上述表中的DFP用于表示向下端口(Down Facing Port,DFP),上述表中的DRP用于表示双角色端口(Dual Role Port,DRP)。本文中具有USB Type-C端口为DRP的USB Type-C端口设备称为DRP设备,具有USB Type-C端口为UFP的USB Type-C端口设备称为UFP设备,具有USB Type-C端口为DFP的USB Type-C端口设备称为DFP设备。
在一个例子中,当第一设备的USB端口为USB Type-C端口时,所述第一设备通过一个USB线缆连接到一个第二设备。当所述第二设备的USB端口为USB Type-A端口时,只有在第一设备为UFP设备或DRP设备时才能建立USB连接。
USB规范规定,USB Type-C端口设备中的USB Type-C端口支持正反插,包括多个管脚,其中包括配置通道(英文全称:Configuration Chanel,简称:CC)管脚,CC管脚包括CC1管脚和CC2管脚,CC1管脚和CC2管脚中的一个在USB Type-C端口设备连接USB线缆时与USB线缆的Type-C插头中的CC管脚连接。不同角色的USB Type-C端口设备上的CC管脚的内部电路设计不同,如图2A所示为DFP设备,其CC管脚通过Rp电阻上接5V高电平,因 此DFP设备未连接对端设备时,其CC管脚上的电压为高电平;如图2B所示UFP设备,其CC管脚通过Rd电阻接地,因此UFP设备未连接对端设备时,其CC管脚上的电压为低电平;如图2C所示DRP设备,其CC管脚交替地通过Rp电阻上接5V高电平或通过Rd电阻接地,因此DRP设备未连接对端设备时,其CC管脚上的电压为高电平和低电平交替变换。具体如图3至图8所示。图2A至图2C中的CC管脚为CC1管脚或CC2管脚的,此为内部电路示意图,具体产品中的CC管脚还与USB Type-C端口设备的内部器件相连接。当USB设备连接时,一个设备的通过Rp上拉至5V电平的CC管脚(CC1管脚和CC2管脚中的一个)与对端设备的通过Rd接地的CC管脚(CC1管脚和CC2管脚中的一个)相连接,因此CC管脚中的CC1管脚或CC2管脚的电压会变为稳定的中间电平,稳定的中间电平值为Rd*5V/(Rp+Rd)。
所述USB规范中规定,在USB Type-C端口设备在没有连接对端设备时,VBUS管脚上不上电,而在连接对端设备,完成CC识别之后,作为主设备的USB Tpye-C端口设备的VBUS才上电。CC识别完成为CC管脚的电压变为一个稳定的中间电平,由高电平或低电平变为所述稳定的中间电平,所述稳定的中间电平视Rp和Rd电阻阻值而定。实际上,USB Type-C端口设备无论是否与对端设备连接,都会检测CC管脚的电压,在所述CC识别完之后,USB Type-C端口设备还可以通过检测CC管脚的电压由稳定的中间电平变为高电平或低电平,确定USB Type-C端口设备与对端设备断开连接。USB Type-A端口设备上的VBUS管脚一直处于上电状态。
下面,通过图3至图8对本发明实施例中的VBUS管脚的电压值的波形和以及CC管脚的电压的变化进行说明。
图3至图8中,USB Type-C端口设备做主设备还是从设备,可以通过USB Type-C端口设备与另一USB设备连接时USB Type-C端口设备的CC管脚的电压变化确定,CC管脚的电压从高电平降到一个稳定的中间电平,则USB Type-C端口设备做主设备;CC管脚的电压从低电平升到所述稳定的中间电平,则USB  Type-C端口设备做从设备。
附图3至图8中所标注的设备1和设备2连接,指的是设备1和设备2通过USB线缆连接。一旦设备1和设备2通过USB线缆连接,CC管脚的电压就会由高电平或低电平变为一个稳定的中间电平,即完成CC识别。所以CC识别完成的时间点可以理解为设备1和设备2通过USB线缆连接上的时间点。
附图中的电压波形是指两个设备各自CC管脚和VBUS管脚的电压波形。
需要说明的是,由于USB Type-A端口设备的USB Type A端口中不具有CC管脚。因此,附图中USB Type-A端口设备中的CC管脚的电压波形,是指USB Type-A端口设备连接USB Type-A到Type-C的线缆,但未连接到USB Type-C端口设备时,USB Type-A到Type-C的线缆中的Type-C插头中CC管脚的电压波形。USB Type-C线缆和连接器规范版本1.1中规定,USB Type-A到Type-C的线缆中与USB Type-C端口设备连接的Type-C插头中,将CC管脚通过Rp电阻与VBUS管脚连接。USB Type-A端口设备的VBUS管脚的是一直上电的,即可以检测到VBUS管脚的电压为高电平。所以USB Type-A端口设备的CC管脚的高电平也是一直存在的。
类似的,由于USB Type-B端口设备的USB Type-B端口中不具有CC管脚。因此,USB Type-B端口设备中的CC管脚的电压波形,是指USB Type-B端口设备连接Type-B到Type-C的线缆,但未连接到USB Type-C端口设备时,Type-B到Type-C的线缆中的Type-C插头中CC管脚的电压波形。USB Type-C线缆和连接器规范版本1.1中规定,Type-B到Type-C的线缆中与USB Type-C端口设备连接的Type-C插头中,将CC管脚通过Rd电阻接地。所以USB Type-B端口设备未连接对端设备时的CC管脚是低电平。
如下图中,高低电平为相对概念,VBUS管脚上出现供电电压为高电平,如5V,当VBUS管脚对外供电,或者接收对端设备的供电,则出现高电平,没有供电电压则为低电平,如0V。
如图3所示,USB Tyep-C端口设备1为DRP设备、USB Tyep-C端口设备 2为DRP设备。所述设备1与设备2没有通过USB线缆连接时,设备1和设备2的USB端口的CC管脚的电压波形都为高低电平交替变化。设备1和设备2通过USB线缆连接时,DRP设备1端口的CC管脚的电压波形在高低电平交替变化时由在高电平下变为一个稳定的中间电平;DRP设备2端口的CC管脚的电压波形在高低电平交替变化时由低电平升至一个稳定的中间电平。设备1和设备2变化至一个稳定的中间电平时,完成CC识别,设备1为主设备,设备2为从设备。完成CC识别后的一个时间段后,设备1开始设备2充电,设备1与设备2的VBUS管脚同时出现高电平。
如图4所示,USB Tyep-C端口设备1为DRP设备、USB Tyep-C端口设备2为UFP设备。所述设备1与设备2没有通过USB线缆连接时,设备1的CC管脚的电压波形为高低电平交替变化,设备2的CC管脚的电压波形为低电平。当设备1和设备2连接时,DRP设备1端口的CC管脚的电压波形在高低电平交替变化时由高电平状态下,变为一个稳定的中间电平;UFP设备2端口的CC管脚的电压波形由低电平升至一个稳定的中间电平。设备1和设备2变化至一个稳定的中间电平时,完成CC识别,设备1为主设备,设备2为从设备。完成CC识别后的一个时间段后,设备1开始设备2充电,设备1与设备2的VBUS管脚同时出现高电平。
如图5所示,USB Tyep-C端口设备1为DRP设备、USB Tyep-C端口设备2为DFP设备。DFP设备2没有与设备1通过USB线缆连接时,设备1的CC管脚的电压波形为高低电平交替变化,设备2的CC管脚的电压波形为高电平。当设备1和设备2通过USB线缆连接时,由于设备2为DFP设备,设备1只能为从设备。DRP设备1端口的CC管脚的电压波形由高低电平交替变化时由低电平变为一个稳定的中间电平;DFP设备2端口的CC管脚的电压波形由高电平降至一个稳定的中间电平。设备1和设备2变化至一个稳定的中间电平时,完成CC识别,设备1为从设备,设备2为主设备。完成CC识别后的一个时间段后,设备2开始向设备1充电,设备1与设备2的VBUS管脚同时出 现高电平。
如图6所示,USB Tyep-C端口设备1为UFP设备、USB Tyep-C端口设备2为DFP设备。设备2没有与设备1通过USB线缆连接时,设备1的CC管脚的电压波形为低电平,设备2的CC管脚的电压波形为高电平。当设备1和设备2通过USB线缆连接时,UFP设备1端口的CC管脚的电压波形由低电平变为一个稳定的中间电平;DFP设备2端口的CC管脚的电压波形由高电平降至一个稳定的中间电平。设备1和设备2变化至一个稳定的中间电平时,完成CC识别,设备1为从设备,设备2为主设备。完成CC识别后的一个时间段后,设备2开始向设备1充电,设备1与设备2的VBUS管脚同时出现高电平。
由于USB Type-A端口设备为主设备,从而与USB Type-A端口设备连接的USB Type-C端口设备必须为DRP设备或UFP设备,不能是DFP设备。如图7所示,USB Tyep-C端口设备1为DRP设备,设备2的端口为Type-A端口。当设备1和设备2没有连接时,USB Type-A端口设备2一端与USB线缆连接,在USB线缆的Type-C插头端检测出USB Type-A端口设备2的CC管脚的电压波形为高电平,USB Type-C端口设备1的CC管脚的电压波形为高低电平交替变化。当设备1与设备2通过USB线缆连接,此时两个端口的CC管脚的电压到一个稳定的中间电平,完成CC识别。USB Type-A端口设备2的VBUS管脚上的高电平一直存在,一旦设备1和设备2连接,USB Type-C端口设备1的VBUS管脚也检测到高电平。
如图8所示,USB Tyep-C端口设备1为UFP设备,设备2的端口为Type-A端口。当设备1和设备2没有通过USB线缆连接时,USB Type-A端口设备2一端与USB线缆连接时,在USB线缆的Type-C插头检测出USB Type-A端口设备2的CC管脚的电压波形为高电平,USB Type-C端口设备1的CC管脚的电压波形为低电平。当设备1与设备2通过USB线缆连接,此时两个端口的CC管脚的电压到一个稳定的中间电平,完成CC识别。USB Type-A端口设备2的VBUS管脚上高电平一直存在,一旦设备1和设备2连接,USB Type-C端 口设备1的VBUS管脚也检测到高电平。
从图3至图8所示的CC管脚的电压波形和VBUS管脚的电压波形可以看出,USB Type-C端口设备1与USB Type-A端口设备2连接时,USB Type-C端口设备1的VBUS管脚上出现高电平和CC识别完成是同时的,而USB Type-C端口设备1与USB Type-C端口设备2连接时,USB Type-C端口设备1的VBUS管脚上高电平的出现晚于CC识别完成。由于USB Type-B端口的设备与USB Type-C端口设备连接时,USB Type-B端口的设备只能做从设备,USB Type-C端口设备做主设备,所以由USB Type-C端口设备对USB Type-B端口设备供电,USB Type-C端口设备的VBUS管脚上电时间晚于CC识别完成的时间点。USB Type-B设备与DRP设备连接时CC管脚的电压波形和VBUS管脚的电压波形参考图4,USB Type-B设备如图4中的设备2。USB Type-B设备与DFP设备连接时CC管脚的电压波形和VBUS管脚的电压波形参考图6,USB Type-B设备如图5中的设备1。基于上述内容,图9为本发明实施例提供的一种具有USB Type-C端口设备可以识别对端连接的设备是否是USB Type-A端口设备。
图9为本发明实施例提供的一种具有USB Type-C端口设备。在一个例子中,如图9所示,所述USB Type-C端口设备至少包括USB端口(Type-C端口,图中未示出),USB控制器和应用处理器(application processor,AP)。所述USB Type-C端口包括CC1管脚、CC2管脚和VBUS管脚,所述USB控制器包括CC1管脚、CC2管脚和VBUS管脚,以及用于与应用处理器之间进行交互的INT管脚和I2C管脚。所述USB控制器上的CC1管脚和CC2管脚连接到所述USB端口的CC1管脚和CC2管脚。所述USB控制器上的VBUS管脚通过电阻R连接到USB端口上的VBUS管脚。
所述应用处理器包括与USB控制器进行交互GPIO管脚和I2C管脚。所述USB控制器和应用处理器之间,通过I2C管脚连接,所述USB控制器中的I2C管脚连接至所述设备的应用处理器的I2C管脚。所述USB控制器的中断信号 管脚INT与应用处理器的GPIO管脚连接。
当所述USB端口未与另一个设备连接时,所述CC1管脚或CC2管脚上将出现特定的电压波形,如持续高电平,持续低电平,高低电平交替变换。所述特定电压为持续低电平时,用于表示所述设备为UFP设备。所述电压为持续高电平时,用于表示所述设备为DFP设备。所述电压为高低电平交替变换时,用于表示所述设备为DRP设备。当所述USB Type-C端口通过线缆与另一设备连接时,所述USB Type-C端口设备的CC管脚上的电压变为一个稳定的中间电平,CC管脚为CC1管脚或CC2管脚中的一个。当所述USB Type-C端口设备的CC管脚的电压由低电平升至稳定的中间电平时,则所述设备做从设备并且连接到一个主设备。当所述设备的CC管脚的电压由高电平降低至稳定的中间电平时,则表示所述设备做主设备并且连接到一个从设备。DRP设备在连接时可以由高电平降至稳定的中间电平,则表示所述设备做主设备并且连接到一个从设备;也可以由低电平升至稳定的中间高电平,则所述设备做从设备并且连接到一个主设备。
所述USB Type-C端口设备的USB控制器检测CC管脚的电压变化,可通过在USB控制器设置CC管脚的参考电压值,通过比较CC管脚的电压和参考电压值来检测CC管脚的电压变化,如通过USB控制器的内部比较电路来实现。检测CC管脚的电压变化为现有USB控制器具有的功能。
所述USB Type-C端口设备的USB控制器检测CC1管脚和CC2管脚,以及VBUS管脚的电压变化,获取CC1管脚或者CC2管脚的电压变化至所述稳定的中间电平的时间点1,获取VBUS管脚的电压变为高电平的时间点2。获取所述时间点1和时间点2为所述USB Type-C端口设备与所述对端设备一次连接中,获取时间点1和时间点2。不是指所述USB Type-C端口设备与所述对端设备两次连接中的时间点,即不是指:在所述USB Type-C端口设备与所述对端设备第一次连接时获取CC管脚变为稳定的中间电平的时间点,所述USB Type-C端口设备与所述对端设备断开连接再进行第二次连接时获取 VBUS管脚的电压出现高电平的时间点。所述USB控制器比较所述时间点1和所述时间点2,根据比较结果确定所述USB Type-C端口设备对端连接的设备是否是USB Type-A端口设备,发送给所述应用处理器AP。所述USB控制器也可以将所述比较结果发送给AP,根据所述比较结果确定所述USB Type-C端口设备对端连接的设备是否是USB Type-A端口设备。所述USB控制器也可以将所述时间点1和时间点2发送给AP,由AP将所述时间点1和所述时间点2进行比较。所述时间点1等于所述时间点2,则所述USB Type-C端口设备对端连接的设备是USB Type-A端口设备;所述时间点1早于所述时间点2,则所述USB Type-C端口设备对端连接的设备不是USB Type-A端口设备。
为了判断所述USB Type-C端口设备的USB端口的VBUS管脚的高电平的出现是否晚于CC识别完成,还可以通过判断CC识别完成时的VBUS管脚的电压值来判断。若CC识别完成时,VBUS管脚上的电压为高电平,即所述VBUS管脚的高电平的出现没有晚于CC识别完成的时间点,则对端设备是USB Type-A端口设备;若CC识别完成时,VBUS管脚上的电压为低电平,即VBUS管脚的高电平的出现晚于CC识别完成的时间点,则对端设备不是USB Type-A端口设备。具体实现如下:所述USB Type-C端口设备的USB控制器检测CC1管脚和CC2管脚的电压变化;CC1管脚或者CC2管脚的电压变化至所述稳定的中间电平的时间点获取VBUS管脚的电压值。所述USB控制器可以将所述VBUS管脚的电压值与预设的电压阈值进行比较来判断获取的所述VBUS管脚的电压值是否是高电平,基于USB充电电压一般为5V,所述预设的电压阈值可考虑设置为4.5V,所述USB控制器基于所述比较结果确定所述USB Type-C端口设备对端连接的设备是否是USB Type-A端口设备,发送至AP。所述USB控制器也可以所述比较结果发送给AP,由AP根据比较结果确定所述USB Type-C端口设备对端连接的设备是否是USB Type-A端口设备。所述USB控制器也可以将所述VBUS管脚的电压值发送给AP,由AP将所述VBUS管脚的电压值与预设的电压阈值进行比较。所述VBUS管脚的电压值大于等于所述预设的电压阈值, 即所述VBUS管脚的电压值是高电平,则所述USB Type-C端口设备对端连接的设备是USB Type-A端口设备;所述VBUS管脚的电压值小于所述预设的电压阈值,即所述VBUS管脚的电压值是低电平,则所述USB Type-C端口设备对端连接的设备不是USB Type-A端口设备。USB控制器发送信息(如所述比较结果,所述VBUS管脚的电压值等)至所述AP具体包括:所述USB控制器通过INT管脚,向AP的GPIO管脚发送一个中断信号;再通过所述USB控制器的I2C管脚向AP的I2C管脚发送信息。所述AP在接收中断信号后,接收I2C管脚的信息。
基于USB Type-C端口设备的USB Type-C端口的角色类型有三种,对于DFP设备,只能做主设备,连接的对端设备不能是USB Type-A端口设备,所以对于DFP设备可以不执行判断对端设备是否是USB Type-A端口设备的流程。对于UFP设备,只能做从设备,则需要执行判断对端设备是否是USB Type-A端口设备的流程。对于DRP设备,在所述设备作为主设备时,对端设备不可能是USB Type-A端口设备,因此对于作为主设备的DRP设备可以不用执行判断对端设备是否是USB Type-A端口设备的功能;在所述设备作为从设备时,需要执行判断对端设备是否是USB Type-A端口设备的功能。
USB Type-C端口设备的USB Type-C端口的角色,应用处理器可预先获知,如从存储器中获知。对于DRP设备,可在连接时,有USB控制器上报给AP所述DRP设备做主设备还是从设备,USB控制器可以从CC管脚的电压变化获知所述DRP设备做主设备还是从设备。对于DFP设备和UFP设备,可以有USB控制器上报AP其做主设备还是从设备。
所以可以在所述USB Type-C端口设备做从设备时,比较时间点1和时间点2,或者比较VBUS管脚电压和预设的电压阈值。从而判断对端设备是USB Type-C端口设备或USB Type-A端口设备。
若TypeC端口的设备通过获取的CC管脚的电压的变化情况,通过USB控制器进行处理后,确定所述USB Type-C端口设备为主设备时。将判断结果发 送至应用处理器,通过应用处理器发送指令,使USB Type-C端口设备通过USB端口向外供电。确定USB Type-C端口设备为主设备时,所述USB Type-C端口设备还需要进行相应的准备在进行VBUS供电。从而造成VBUS供电延迟于CC识别的时间。
在一个例子中,当第一设备为USB Type-C端口设备,第二设备为USB Type-A端口设备,由于USB Type-A端口设备只能为主设备,且一直向外供电,USB Type-A端口设备的VBUS管脚上一直有高电平。当CC管脚的电压由一个高电平或低电平变为一个稳定的中间电平的同时,USB Type-C端口设备上的VBUS管脚检测到USB Type-A端口设备的供电。
在一个例子中,一种USB Type-C端口设备的USB控制器检测到获取CC管脚上电压变化至稳定的中间电平同时,所述USB控制器获取此时的VBUS管脚的电压值,通过获取的VBUS管脚的电压值判断对端设备是否是USB Type-C端口设备。
在本发明的实施例中,所示USB控制器中可以包括微控制器(Micro Controller,MCU)。在一个例子中,所述MCU检测CC管脚的电压和VBUS管脚的电压,记录CC识别完成的时间点和VBUS管脚上出现高电平的时间点,比较两个时间点的先后,根据比较结果确定对端连接的设备是否是USB Type-A端口设备,发送给AP;或者MCU将所述比较结果发送给AP,由AP基于所述比较结果判断对端连接的设备是否是USB Type-A端口设备;或者MCU将记录的CC识别完成的时间点和VBUS管脚上出现高电平的时间点上报给AP,由AP比较两个时间点并判断对端连接的设备是否是USB Type-A端口设备。
在一个例子中,所述微控制器中设置了一个电压阈值(例如,所述电压阈值为4.5V)。所述MCU检测CC管脚的电压,获取完成CC识别的时间点的VBUS管脚的电压值,将完成CC识别的时间点的VBUS管脚的电压值与设置的电压阈值比较来判断VBUS管脚是否出现高电平,根据比较结果确定对端连接的设备是否是USB Type-A端口设备,发送给AP,或者MCU将所述比较结果发 送给AP,由AP基于所述比较结果判断对端连接的设备是否是USB Type-A端口设备。
在一个例子中,所述微控制器中没有设置所述电压阈值。所述电压阈值设置在所述应用处理器中。所述MCU将获取的CC识别时的VBUS管脚的电压值发送至应用处理器,所述应用处理器接收所述微控制器发送的CC识别时的VBUS管脚的电压值。所述应用处理器将获取VBUS管脚的电压值与所述电压阈值对比,并确定对端设备是否是USB Type-A端口设备。
现有技术中USB规范规定,在“Type-C到Type-C线缆”中,当主设备和从设备完成CC识别,确定各自分别为主设备和从设备,确定主设备对从设备供电,经过VBUS管脚的电压准备后,在VBUS管脚上上电,主设备对从设备进行普通充电。在开始普通充电后,主设备和从设备协商采用USB Type-C PD充电协议充电,主设备还将向从设备广播USB Type-C PD充电方案的源端能力包,所述源端能力包包括主设备所能提供的快速充电电压和电流。从设备在接收主设备的广播后将向主设备发送其从主设备广播的源端能力包中选择的快速充电的电压和电流。主设备与从设备的充电方式转换为PD快速充电,如5A电流充电。但现有技术中,在“Type-A到Type-C线缆”连接的两个设备中,由于USB Type-A端口设备不支持USB Type-C PD充电方案,所以USB Type-A端口设备不能发出源端能力包。作为从设备的USB Type-C端口设备则等待对端设备发出的指令,等待一段时间后,作为从设备的USB Type-C端口设备会尝试与Type-A协商Type-C PD充电方案,因为USB Type-A端口设备不支持Type-C PD充电方案,。所述USB Type-C端口设备再向所述USB Type-A端口设备协商普通快速充电协议支持的充电方案,普通快速充电协议包括QC2.O(Quick Charge 2.0)、FCP(Fast Charge Protocol)、MTK(MediaTek)、PumpExpress等,使USB Type-A端口设备对USB Type-C端口设备的充电切换为普通快速充电模式。普通快速充电协议不包括USBType-C PD充电协议。
可选地,在本发明的一个实施例中,所述应用处理器根据对端设备的端 口类型进行相应处理。当所述USB Type-C端口设备确定自己是从设备,且当所述应用处理器确定对端设备是Type-C端口的主设备时,等待对端Type-C端口主设备发送的USB Type-C PD充电方案的源端能力包。当所述对端设备是USB Type-A端口设备时,所述应用处理器发出控制指令,所述控制指令用于指示所述USB Type-C端口设备与对端的USB Type-A端口设备协商普通快速充电协议所支持的充电方式。这样USB Type-C端口设备在连接USB Type-A端口设备时,不需要等待USB Type-C PD充电方案的源端能力包,也不需要协商PD充电方案,可直接协商普通快速充电协议支持的充电方式。
在一个例子中,所述普通快速充电协议包括QC2.O(Quick Charge 2.0)、FCP(Fast Charge Protocol)、MTK(MediaTek)、PumpExpress。所述协商遵循普通快速充电协议的充电方案可以是发送消息指示自身支持的充电协议,等待对端设备的反馈,可以轮流发送指示不同协议的消息,也可以是固定发送指示某一个快速充电协议的消息。
在本发明的实施例中,所述USB控制器中可以不包括微控制器(英文:Micro Controller,MCU)。由于USB控制器是不具有MCU的USB Type-C控制器芯片,无法实现在CC识别完成时获取VBUS管脚的电压,以及设定电压阈值,并使设定的电压阈值与获取的CC识别完成时的VBUS管脚的电压值进行比较,因此需要额外增加一颗MCU,由此来实现特定的功能。
图10为本发明实施例提供的另一种具有USB Type-C端口设备。如图10所示,所述USB Type-C端口设备至少包括USB端口,USB控制器中包括与USB端口连接的CC1管脚、CC2管脚、VBUS管脚,以及与处理器连接的INT管脚和I2C管脚。所述应用处理器包括GPIO_1管脚,GPIO_2管脚和I2C管脚。MCU包括GPIO_1管脚、GPIO_2管脚和GPIO_3管脚,以及I2C管脚和INT管脚。
所述USB Type-C端口的CC1管脚与USB控制器的CC1连接,所示USB端口的CC2管脚与USB控制器的CC2连接,所示USB端口的VBUS管脚通过电 阻R与USB控制器的VBUS连接。所示USB控制器的INT与处理器的GPIO_1连接,所述USB控制器的I2C与应用处理器的I2C连接。所述USB端口的CC1管脚与MCU的GPIO_1管脚连接,所述USB端口的CC2管脚与MCU的GPIO_2管脚连接,所述USB端口的VBUS管脚与MCU的GPIO_3管脚连接。所述MCU的I2C管脚与应用处理器的I2C管脚连接,所述MCU的INT管脚与应用处理器的GPIO_2管脚连接。
图10中的所述MCU具有如图9所示实施例中处于USB控制器中的MCU相类似的功能,如监测CC管脚的电压,在CC管脚的电压变为稳定的中间电平时,获取VBUS管脚的电压值。所述MCU可以设置有所述预设的电压阈值,比较所述VBUS管脚的电压值和所述预设的电压阈值,确定对端设备是否是USB Type-A端口设备,可以将所述VBUS管脚的电压值发送给AP,由AP进行比较判断。MCU和AP之间的交互可参照图9所示的实施例。所述MCU发送信息(如所述比较结果,所述VBUS管脚的电压值等)至所述AP具体包括:所述MCU通过INT管脚,向AP的GPIO_2管脚发送一个中断信号;再通过所述MCU的I2C管脚向AP的I2C管脚发送信息。所述AP在接收中断信号后,接收I2C管脚的信息。
基于USB Type-C端口设备的USB Type-C端口的角色类型有三种,对于DFP设备,只能做主设备,连接的对端设备不能是USB Type-A端口设备,所以对于DFP设备可以不执行判断对端设备是否是USB Type-A端口设备的流程。对于UFP设备,只能做从设备,则需要执行判断对端设备是否是USB Type-A端口设备的流程。对于DRP设备,在所述设备作为主设备时,对端设备不可能是USB Type-A端口设备,因此对于作为主设备的DRP设备可以不用执行判断对端设备是否是USB Type-A端口设备的功能;在所述设备作为从设备时,需要执行判断对端设备是否是USB Type-A端口设备的功能。
USB Type-C端口设备的USB Type-C端口的角色,应用处理器可预先获知,如从存储器中获知。对于DRP设备,可在连接时,有USB控制器上报给AP所 述DRP设备做主设备还是从设备,USB控制器可以从CC管脚的电压变化获知所述DRP设备做主设备还是从设备。对于DFP设备和UFP设备,可以有USB控制器上报AP其做主设备还是从设备。USB控制器发送信息(所述USB Type-C端口设备做主设备或从设备等)至所述AP具体包括:所述USB控制器通过INT管脚,向AP的GPIO_1管脚发送一个中断信号;再通过所述USB控制器的I2C管脚向AP的I2C管脚发送信息。所述AP在接收中断信号后,接收I2C管脚的信息。
图11为本发明实施例提供的一种USB Type-C端口设备识别对端设备的方法。如图11所示,所述方法应用于USB Type-C端口设备上。所述USB Type-C端口设备与另一USB设备通过USB线缆连接,所述USB Type-C端口设备为第一设备,另一USB设备为第二设备。在本发明的实施例中所述方法具体包括:
步骤801,监测CC管脚的电压。
USB Type-C端口设备无论是否与对端设备连接,都会检测CC管脚的电压。当USB Type-C端口设备未与对端设备连接时,所述USB Type-C端口设备的CC管脚的电压为高电平或低电平,或高低电平交替变化。一旦USB Type-C端口设备与对端设备连接,所述USB Type-C端口设备的CC管脚的电压会变为一个稳定的中间电平。当所述USB Type-C端口设备检测到CC管脚的电压由稳定的中间电平变为高电平或低电平,则判断USB Type-C端口设备与对端设备断开连接。本发明的实施例是为了识别所述USB Type-C端口设备的对端设备,所以所述USB Type-C端口设备需要参考的CC管脚的电压可从所述USB Type-C端口设备未与对端设备连接时起至所述所述USB Type-C端口设备与所述对端设备连接期间的CC管脚的电压。
步骤802,当CC管脚的电压变化至一个稳定的中间电平时,获取VBUS管脚的电压值。CC管脚的电压变化至一个稳定的中间电平可以是两个CC管脚中 的一个CC管脚电压变为稳定的中间电平。
所述USB Type-C端口设备包括USB控制器和应用处理器,所述USB控制器的一端与所述USB Type-C端口设备的USB Type-C端口连接,所述USB控制器的另一端与所述应用处理器连接。当所述第一设备连接到一个对端设备时,所述USB Type-C端口设备的Type-C端口与所述USB控制器连接的CC管脚上的电压将变化为一个稳定的中间电平。当所述USB Type-C端口设备的CC管脚的电压变化为一个稳定的中间电平时,获取所述USB Type-C端口设备的VBUS管脚的电压。
在一个例子中,获取VBUS管脚的电压值的具体操作方法可以是:所述第一设备将记录所述CC管脚的电压变化为一个稳定的中间电平的时间点,即所述第一设备连接到一个第二设备的时间,记为第一时间。所述VBUS管脚连接至USB控制器,所述USB控制器记录第一时间的VBUS管脚的电压值。
步骤803,判断所述VBUS管脚的电压值是否是高电平。
具体地,可以将获取的VBUS管脚的电压值与预置在所述USB Type-C端口设备中电压阈值比较,若所述VBUS管脚的电压值大于或等于所述电压阈值,即所述VBUS管脚的电压值是高电平,则确定对端设备为USB Type-A端口设备(步骤804),若所述VBUS管脚的电压值小于所述电压阈值,即所述VBUS管脚的电压值是低电平,则所述对端设备不是USB Type-C端口设备(步骤805)。
所述USB Type-C设备为从设备,所述USB Type-C设备的应用处理器确定所述对端设备不是USB Type-A端口设备,则确定所述对端设备为USB Type-C端口设备时,所述应用处理器按照现有流程处理,即USB Type-C端口设备与USB Type-C端口设备连接的流程处理。如等待对端设备发送USB PD充电方案。当所述应用处理器确定所述对端设备是USB Type-A端口设备,所述应用处理器用于指示所述USB Type-C端口设备与所述USB Type-A端口设备协商遵循普通快速充电协议的充电方案。在一个例子中,所述普通快速充电协议包括QC2.0(Quick Chareg2.0)、MTK(MediaTek)、 Pump Express、FCP(Fast Chareg Processor)等中的一个或多个。
在一个例子中,与所述USB Type-A端口设备协商普通快速充电协议可以为向所述USB Type-A端口设备发送消息,消息中指示所述USB Type-C端口设备支持的普通快速充电协议,具体地可以是指示一种快速充电协议的消息发送一次后,当所述USB Type-A端口设备反馈支持该协议,则停止发送,如所述USB Type-A端口设备不支持该协议,再发送下一种协议。
为了将本发明的实施方法进行更详细的说明,下面通过两个例子对本发明的流程进行说明。
在一个例子中,图12为本发明实施提供的一种USB Type-C端口设备识别对端设备方法,由第一设备执行,所述第一设备为具有DRP的USB Type-C端口设备,DRP设备。
步骤901,所述第一设备判断CC识别是否完成,即检测CC管脚上的电压是否变为稳定的中间电平。
实际上,USB Type-C端口设备无论是否与对端设备连接,都会检测CC管脚的电压。当USB Type-C端口设备未与对端设备连接时,所述USB Type-C端口设备的CC管脚的电压为高电平或低电平,或高低电平交替变化。一旦USB Type-C端口设备与对端设备连接,所述USB Type-C端口设备的CC管脚的电压会变为一个稳定的中间电平。当所述USB Type-C端口设备检测到CC管脚的电压由稳定的中间电平变为高电平或低电平,则确定USB Type-C端口设备与对端设备断开连接。本实施例中DRP设备需要识别连接上所述DRP设备的对端设备,所以可从所述DRP设备未连接对端设备时起关注DRP设备的CC管脚的电压。当CC管脚上的电压由高低电平交替变化中的高电平或低电平变为一个稳定的中间电平,则完成CC识别,进行步骤902,如未完成则继续进行步骤901。
步骤902,判断第一设备本身是否是从设备。所述第一设备判断自身是否是主设备可以通过CC电压的变化来确定。当CC管脚上的电压由高电 平变为一个稳定的电压,则所述第一设备本身为主设备。当CC管脚上的电压由低电平变为一个稳定的电压,则所述第一设备本身为从设备。当所述第一设备为主设备时,则进入正常处理流程步骤904,即USB Type-C端口设备为主设备后正常的数据传输,充电协议协商等流程。当第一设备为从设备时,进行步骤903。
步骤903,判断CC识别完成和VBUS管脚上高电平电压出现的时间顺序。如果两者同时,则执行步骤905,确定对端设备为Type-A端口设备;如果CC识别完成早于VBUS管脚上高电平电压出现,则执行步骤906,确定对端设备为Type-C端口设备。步骤905之后,所述第一设备还可以和对端设备协商普通快速充电协议。VBUS管脚上高电平电压出现的时间点,是指自所述DRP设备未连接对端设备时起,VBUS管脚上有低电平变为高电平的时间点。
在本发明的实施例中,可以通过获取CC识别完成的时间点和VBUS管脚上高电平电压出现的时间点,由此比较CC识别完成和VBUS管脚上高电平电压出现的时间顺序。也可以通过获取CC识别完成时VBUS管脚上的电压值来判断,如果CC识别完成时VBUS管脚上的电压值为高电平,则CC识别完成和VBUS管脚上高电平电压同时出现;如果CC识别完成时VBUS管脚上的电压值为低电平,则VBUS管脚上高电平电压晚于CC识别完成。具体可参照图9和图10对应的实施例。
在一个例子中,图13为本发明实施提供的一种USB Type-C端口设备识别对端设备方法,由UFP设备执行。如图13所示,其判断流程与图12所示的流程相同,执行主体为UFP设备,只能做从设备,不需要执行步骤902和904.步骤1001,1002,1003,和1004分别对应于步骤901,903,905和906。
图14为本发明实施例提供的一种包括USB Type-C端口设备,包括:
检测单元1101用于检测CC管脚的电压和VBUS管脚的电压。实际上中USB Type-C端口设备无论是否与对端设备连接,都会检测CC管脚的电压。当USB Type-C端口设备未与对端设备连接时,所述USB Type-C端口设备的CC管脚的电压为高电平或低电平,或高低电平交替变化。一旦USB Type-C端口设备与对端设备连接,所述USB Type-C端口设备的CC管脚的电压会有高电平或低电平变为一个稳定的中间电平。当所述USB Type-C端口设备检测到CC管脚的电压由稳定的中间电平变为高电平或低电平,则判断USB Type-C端口设备与对端设备断开连接。本实施例中主要关注的是USB Type-C端口设备未与对端设备连接,至所述USB Type-C端口设备与所述对端设备连接这段时间的CC管脚的电压。
处理单元1102用于判断CC识别完成和VBUS管脚上出现高电平的时间顺序;所述CC识别完成为所述CC管脚的电压变为稳定的中间电平;所述对端设备用于通过USB线缆与所述USB Type-C端口设备的USB Type-C端口连接;
当所述CC识别完成的同时所述VBUS管脚上出现高电平,则确定所述对端设备是USB Type-A端口设备;
当所述CC识别完成早于所述VBUS管脚上出现高电平,则所述对端设备不是USB Type-A端口设备。
进一步地,所述装置还可以包括协商单元1103,用于当确定所述对端设备是USB Type-A端口设备,与所述对端设备协商普通快速充电协议。
在一个例子中,检测单元1101,用于检测CC管脚电压,当CC管脚电压由高电平或低电平变为稳定的中间电平时,检测VBUS管脚的电压值。
处理单元1102,用于将所述VBUS管脚的电压值与预设的电压阈值比较,当所述VBUS管脚的电压值大于等于预设电压阈值,则确定对端设备为USB Type-A端口设备,当所述VBUS管脚的电压值小于预设电压阈值,则确定所述 对端设备为USB Type-C端口设备。
在另一个例子中,检测单元1101,用于检测CC管脚电压,记录CC管脚电压变为稳定的中间电平的时间点1,检测VBUS管脚的电压值,记录VBUS管脚出现高电平的时间点2。
处理单元1102,用于将时间点1和时间点2比较,当时间点1等于时间2时,则确定对端设备为USB Type-A端口设备,当时间点1小于时间点2,则确定所述对端设备为USB Type-C端口设备。
专业人员应该还可以进一步意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分步骤是可以通过程序来指令处理器完成,所述的程序可以存储于计算机可读存储介质中,所述存储介质是非短暂性(英文:non-transitory)介质,例如随机存取存储器,只读存储器,快闪存储器,硬盘,固态硬盘,磁带(英文:magnetic tape),软盘(英文:floppy disk),光盘(英文:optical disc)及其任意组合。
以上所述,仅为本发明较佳的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到的变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应该以权利要求的保护范围为准。

Claims (25)

  1. 一种USB Type-C端口设备识别对端设备的方法,其特征在于,所述USB Type-C端口设备的Type-C端口包括配置通道(configuration channel)CC管脚和VBUS管脚,所述方法具体包括:
    所述USB Type-C端口设备检测所述CC管脚的电压和所述VBUS管脚的电压;
    判断所述CC管脚的电压变为稳定的中间电平和VBUS管脚上出现高电平的时间顺序;
    当所述CC管脚的电压变为稳定的中间电平的同时所述VBUS管脚上出现高电平,则确定所述对端设备是USB Type-A端口设备;
    当所述CC管脚的电压变为稳定的中间电平早于所述VBUS管脚上出现高电平,则确定所述对端设备不是USB Type-A端口设备。
  2. 如权利要求1所述方法,其特征在于,所述USB Type-C端口设备检测所述CC管脚的电压和所述VBUS管脚的电压包括:所述CC管脚的电压变为稳定的中间电平的同时获取VBUS管脚的电压值;
    所述判断所述CC管脚的电压变为稳定的中间电平和VBUS管脚上出现高电平的时间顺序为:判断所述VBUS管脚的电压值是否是高电平;当所述VBUS管脚的电压值是高电平时,则所述CC管脚的电压变为稳定的中间电平的同时所述VBUS管脚上出现高电平;当所述VBUS管脚的电压值不是高电平时,则所述CC管脚的电压变为稳定的中间电平早于所述VBUS管脚上出现高电平。
  3. 如权利要求1所述方法,其特征在于,所述USB Type-C端口设备检测所述CC管脚的电压和所述VBUS管脚的电压包括:检测所述CC管脚和VBUS管脚的电压,记录所述CC管脚的电压变为稳定的中间电平的时间点和所述VBUS管脚上出现高电平的时间点;
    所述判断所述CC管脚的电压变为稳定的中间电平和VBUS管脚上出现高电平的时间顺序为:判断所述CC管脚的电压变为稳定的中间电平的时间点和 所述VBUS管脚上出现高电平的时间点的先后顺序,如果所述CC管脚的电压变为稳定的中间电平的时间点和所述VBUS管脚上出现高电平的时间点相同,则所述CC管脚的电压变为稳定的中间电平的同时所述VBUS管脚上出现高电平;如果所述CC管脚的电压变为稳定的中间电平的时间点早于所述VBUS管脚上出现高电平的时间点,则所述CC管脚的电压变为稳定的中间电平早于所述VBUS管脚上出现高电平。
  4. 如权利要求1所述方法,其特征在于,当确定所述对端设备是USB Type-A端口设备,所述方法还包括,所述USB Type-C端口设备与所述USB Type-A端口设备协商支持普通快速充电协议的充电方案,所述普通快速充电协议不包括USB PD充电协议。
  5. 如权利要求1所述方法,其特征在于,所述判断所述CC管脚的电压变为稳定的中间电平和VBUS管脚上出现高电平的时间顺序为当所述USB Type-C端口设备为从设备时,判断所述CC管脚的电压变为稳定的中间电平和所述VBUS管脚上出现高电平的顺序;
    所述当所述CC管脚的电压变为稳定的中间电平早于所述VBUS管脚上出现高电平,则所述对端设备不是USB Type-A端口设备为:当所述CC管脚的电压变为稳定的中间电平早于所述VBUS管脚上出现高电平,则所述对端设备是USB Type-C端口设备。
  6. 一种USB Type-C端口设备,其特征在于:所述USB Type-C端口设备包括USB Type-C端口,应用处理器和微控制器,所述USB Type-C端口包括配置通道(configuration channel)CC管脚和VBUS管脚,所述微控制器与所述CC管脚和VBUS管脚连接,所述微控制器与所述应用处理器连接;
    所述微控制器用于检测所述CC管脚的电压和所述VBUS管脚的电压;
    所述微控制器或所述应用处理器用于判断所述CC管脚的电压变为稳定的 中间电平和VBUS管脚上出现高电平的时间顺序;当所述CC管脚的电压变为稳定的中间电平的同时所述VBUS管脚上出现高电平,则确定所述对端设备是USB Type-A端口设备;当所述CC管脚的电压变为稳定的中间电平早于所述VBUS管脚上出现高电平,则所述对端设备不是USB Type-A端口设备;所述对端设备用于通过USB线缆与所述USB Type-C端口设备的USB Type-C端口连接。
  7. 如权利要求6所述USB Type-C端口设备,其特征在于,所述应用处理器用于判断所述CC管脚的电压变为稳定的中间电平和VBUS管脚上出现高电平的时间顺序之前,所述微控制器还用于将检测所述CC管脚的电压和所述VBUS管脚的电压的结果上报给所述应用处理器。
  8. 如权利要求6所述USB Type-C端口设备,其特征在于,所述微控制器确定所述对端设备是USB Type-A端口设备或所述对端设备不是USB Type-A端口设备之后,所述微控制器还用于上报所述应用处理器所述对端设备是或不是USB Type-A端口设备。
  9. 如权利要求6-8任一项所述USB Type-C端口设备,其特征在于,所述微控制器用于所述微控制器用于检测所述CC管脚的电压和所述VBUS管脚的电压包括:所述微控制器检测所述CC管脚的电压,在所述CC管脚的电压变为稳定的中间电平的同时获取VBUS管脚的电压值;
    所述微控制器或所述应用处理器用于判断所述CC管脚的电压变为稳定的中间电平和VBUS管脚上出现高电平的时间顺序为:判断所述VBUS管脚的电压值是否是高电平;当所述VBUS管脚的电压值是高电平时,则所述CC管脚的电压变为稳定的中间电平的同时所述VBUS管脚上出现高电平;当所述VBUS管脚的电压值不是高电平时,则所述CC管脚的电压变为稳定的中间电平早于所述VBUS管脚上出现高电平。
  10. 如权利要求6-8任一项所述USB Type-C端口设备,其特征在于,所述微控制器用于检测所述CC管脚的电压和所述VBUS管脚的电压包括: 所述微控制器检测所述CC管脚的电压和所述VBUS管脚的电压,记录所述CC管脚的电压变为稳定的中间电平的时间点,和所述VBUS管脚上出现高电平的时间点;
    所述微控制器或所述应用处理器用于判断所述CC管脚的电压变为稳定的中间电平和VBUS管脚上出现高电平的时间顺序为:判断所述CC管脚的电压变为稳定的中间电平的时间点和所述VBUS管脚上出现高电平的时间点的先后顺序,如果所述CC管脚的电压变为稳定的中间电平的时间点和所述VBUS管脚上出现高电平的时间点相同,则所述CC管脚的电压变为稳定的中间电平的同时所述VBUS管脚上出现高电平;如果所述CC管脚的电压变为稳定的中间电平的时间点早于所述VBUS管脚上出现高电平的时间点,则所述CC管脚的电压变为稳定的中间电平早于所述VBUS管脚上出现高电平。
  11. 如权利要求6-10所述USB Type-C端口设备,其特征在于,当确定所述对端设备是USB Type-A端口设备,所述应用处理器还包括,指示所述USB Type-C端口设备与所述USB Type-A端口设备协商支持普通快速充电协议的充电方案,所述普通快速充电协议不包括USB PD充电协议。
  12. 如权利要求6-11所述USB Type-C端口设备,其特征在于,所述微控制器或所述应用处理器判断所述CC管脚的电压变为稳定的中间电平和VBUS管脚上出现高电平的时间顺序为:当所述USB Type-C端口设备为从设备时,判断所述CC管脚的电压变为稳定的中间电平和所述VBUS管脚上出现高电平的顺序;
    所述当所述CC管脚的电压变为稳定的中间电平早于所述VBUS管脚上出现高电平,则所述对端设备不是USB Type-A端口设备为:当所述CC管脚的电压变为稳定的中间电平早于所述VBUS管脚上出现高电平,则所述对端设备是USB Type-C端口设备。
  13. 如权利要求12所述USB Type-C端口设备,其特征在于,所述USB Type-C端口设备还包括USB控制器,所述USB控制器与所述应用处理器连 接,所述USB控制器用于确定所述USB Type-C设备做从设备。
  14. 如权利要求13所述USB Type-C端口设备,其特征在于,所述微控制器置于所述USB控制器中。
  15. 一种识别对端设备的装置,应用在USB Type-C端口设备上,其特征在于,所述USB Type-C端口设备的Type-C端口包括配置通道(configuration channel)CC管脚和VBUS管脚,装置包括:
    检测单元用于检测所述CC管脚的电压和所述VBUS管脚的电压;
    处理单元用于判断所述CC管脚的电压变为稳定的中间电平和所述VBUS管脚上出现高电平的时间顺序;所述对端设备用于通过USB线缆与所述USB Type-C端口设备的USB Type-C端口连接;
    当所述CC管脚的电压变为稳定的中间电平的同时所述VBUS管脚上出现高电平,则确定所述对端设备是USB Type-A端口设备;
    当所述CC管脚的电压变为稳定的中间电平早于所述VBUS管脚上出现高电平,则所述对端设备不是USB Type-A端口设备。
  16. 如权利要求15所述装置,其特征在于,所述检测单元具体用于:检测所述CC管脚的电压,所述CC管脚的电压变为稳定的中间电平的同时获取VBUS管脚的电压值;
    所述处理单元具体用于:判断所述VBUS管脚的电压值是否是高电平;当所述VBUS管脚的电压值是高电平时,则所述CC管脚的电压变为稳定的中间电平的同时所述VBUS管脚上出现高电平;当所述VBUS管脚的电压值不是高电平时,则所述CC管脚的电压变为稳定的中间电平早于所述VBUS管脚上出现高电平。
  17. 如权利要求15所述装置,其特征在于,所述检测单元具体用于:检测所述CC管脚和VBUS管脚的电压,记录所述CC管脚的电压变为稳定的中间电平的时间点和所述VBUS管脚上出现高电平的时间点;
    所述处理单元具体用于:判断所述CC管脚的电压变为稳定的中间电平的时间点和所述VBUS管脚上出现高电平的时间点的先后顺序,如果所述CC管脚的电压变为稳定的中间电平的时间点和所述VBUS管脚上出现高电平的时间点相同,则所述CC管脚的电压变为稳定的中间电平的同时所述VBUS管脚上出现高电平;如果所述CC管脚的电压变为稳定的中间电平的时间点早于所述VBUS管脚上出现高电平的时间点,则所述CC管脚的电压变为稳定的中间电平早于所述VBUS管脚上出现高电平。
  18. 如权利要求15-17任一项所述装置,其特征在于,所述装置还包括协商单元,当确定所述对端设备是USB Type-A端口设备,所述协商单元用于与所述USB Type-A端口设备协商支持普通快速充电协议的充电方案,所述普通快速充电协议不包括USB PD充电协议。
  19. 一种USB Type-C端口设备识别对端设备的方法,其特征在于,所述USB Type-C端口设备的Type-C端口包括配置通道(configuration channel)CC管脚和VBUS管脚,所述方法具体包括:
    所述USB Type-C端口设备检测所述CC管脚的电压;
    当所述CC管脚的电压变为稳定的中间电平的同时获取VBUS管脚的电压值;判断所述VBUS管脚的电压值是否为高电平;当所述VBUS管脚的电压值为高电平,则确定所述对端设备是USB Type-A端口设备;当所述VBUS管脚的电压值为低电平,则确定所述对端设备不是USB Type-A端口设备。
  20. 如权利要求19所述方法,其特征在于,当确定所述对端设备是USB Type-A端口设备,所述方法还包括,所述USB Type-C端口设备与所述USB Type-A端口设备协商支持普通快速充电协议的充电方案,所述普通快速充电协议不包括USB PD充电协议。
  21. 如权利要求19所述方法,其特征在于,所述判断所述VBUS管脚的电压值是否为高电平为当所述USB Type-C端口设备为从设备时,判断所述 VBUS管脚的电压值是否为高电平;所述当所述VBUS管脚的电压值为低电平,则确定所述对端设备不是USB Type-A端口设备为:当当所述VBUS管脚的电压值为低电平,则确定所述对端设备是USB Type-C端口设备。
  22. 一种USB Type-C端口设备,其特征在于,所述USB Type-C端口设备包括USB Type-C端口,应用处理器和微控制器,所述USB Type-C端口包括配置通道(configuration channel)CC管脚和VBUS管脚,所述微控制器与所述CC管脚和VBUS管脚连接,所述微控制器与所述应用处理器连接;
    所述微控制器用于检测所述CC管脚的电压,当所述CC管脚的电压变为稳定的中间电平的同时获取VBUS管脚的电压值;
    所述微控制器或所述应用处理器用于判断所述VBUS管脚的电压值是否为高电平;当所述VBUS管脚的电压值为高电平,确定所述对端设备是USB Type-A端口设备;当所述VBUS管脚的电压值为低电平,确定所述对端设备不是USB Type-A端口设备。
  23. 如权利要求22所述USB Type-C端口设备,其特征在于,所述应用处理器还包括当确定所述对端设备是USB Type-A端口设备,指示所述USB Type-C端口设备与所述USB Type-A端口设备协商支持普通快速充电协议的充电方案,所述普通快速充电协议不包括USB PD充电协议。
  24. 如权利要求22所述USB Type-C端口设备,其特征在于,所述USB Type-C端口设备还包括USB控制器,所述USB控制器与所述应用处理器连接,所述USB控制器用于确定所述USB Type-C端口设备是主设备或从设备,
    所述微控制器或所述应用处理器用于当所述VBUS管脚的电压值为低电平,确定所述对端设备不是USB Type-A端口设备包括:当所述USB Type-C端口设备是从设备时,并且当所述VBUS管脚的电压值为低电平,确定所述对端设备是USB Type-C端口设备。
  25. 如权利要求22所述USB Type-C端口设备,其特征在于,所述微控制器处于所述USB控制器中。
PCT/CN2016/079076 2016-04-12 2016-04-12 一种USB Type-C端口设备识别对端设备的方法、装置和系统 WO2017177377A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2016/079076 WO2017177377A1 (zh) 2016-04-12 2016-04-12 一种USB Type-C端口设备识别对端设备的方法、装置和系统
CN201680084473.1A CN109478176B (zh) 2016-04-12 2016-04-12 一种USB Type-C端口设备识别对端设备的方法、装置和系统

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2016/079076 WO2017177377A1 (zh) 2016-04-12 2016-04-12 一种USB Type-C端口设备识别对端设备的方法、装置和系统

Publications (1)

Publication Number Publication Date
WO2017177377A1 true WO2017177377A1 (zh) 2017-10-19

Family

ID=60042200

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/079076 WO2017177377A1 (zh) 2016-04-12 2016-04-12 一种USB Type-C端口设备识别对端设备的方法、装置和系统

Country Status (2)

Country Link
CN (1) CN109478176B (zh)
WO (1) WO2017177377A1 (zh)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108123830A (zh) * 2017-12-15 2018-06-05 新华三技术有限公司 一种端口状态控制方法及装置
CN109976492A (zh) * 2017-12-28 2019-07-05 佳能株式会社 电子设备及其控制方法以及存储介质
CN111480152A (zh) * 2018-07-31 2020-07-31 华为技术有限公司 一种接口配置方法、终端设备及接口
CN111817385A (zh) * 2020-07-14 2020-10-23 维沃移动通信有限公司 充电器、数据线和充电设备

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110377545B (zh) * 2019-06-12 2023-07-21 苏州佳世达电通有限公司 双重用途埠的判断方法及其系统
CN111697663B (zh) * 2020-06-29 2022-02-08 维沃移动通信有限公司 充电电路与充电线缆
CN111817378B (zh) * 2020-07-14 2022-04-01 维沃移动通信有限公司 充电器、数据线和充电设备
CN112380080B (zh) * 2020-12-02 2021-06-08 深圳慧能泰半导体科技有限公司 一种usb设备检测系统及方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1808408A (zh) * 2005-01-19 2006-07-26 三星电子株式会社 确定usb设备的类别的方法和装置
CN103106167A (zh) * 2013-01-22 2013-05-15 矽力杰半导体技术(杭州)有限公司 一种usb设备及其控制方法
CN105183679A (zh) * 2015-09-01 2015-12-23 联想(北京)有限公司 一种电子设备及信息处理方法
WO2016030573A1 (en) * 2014-08-26 2016-03-03 Nokia Technologies Oy Usb type c to mhl m1 dead battery charging
CN205141217U (zh) * 2015-08-07 2016-04-06 东莞铭基电子科技集团有限公司 基于USBType-C的适配线

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7606955B1 (en) * 2003-09-15 2009-10-20 National Semiconductor Corporation Single wire bus for connecting devices and methods of operating the same
JP6083878B2 (ja) * 2014-04-09 2017-02-22 ノキア テクノロジーズ オーユー 電力供給の方向を決定する方法及び装置
CN104573468A (zh) * 2015-01-30 2015-04-29 北京世纪龙脉科技有限公司 一种单核多usb接口的安全认证设备
CN105071473B (zh) * 2015-08-11 2018-07-24 小米科技有限责任公司 Usb充电方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1808408A (zh) * 2005-01-19 2006-07-26 三星电子株式会社 确定usb设备的类别的方法和装置
CN103106167A (zh) * 2013-01-22 2013-05-15 矽力杰半导体技术(杭州)有限公司 一种usb设备及其控制方法
WO2016030573A1 (en) * 2014-08-26 2016-03-03 Nokia Technologies Oy Usb type c to mhl m1 dead battery charging
CN205141217U (zh) * 2015-08-07 2016-04-06 东莞铭基电子科技集团有限公司 基于USBType-C的适配线
CN105183679A (zh) * 2015-09-01 2015-12-23 联想(北京)有限公司 一种电子设备及信息处理方法

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108123830A (zh) * 2017-12-15 2018-06-05 新华三技术有限公司 一种端口状态控制方法及装置
CN109976492A (zh) * 2017-12-28 2019-07-05 佳能株式会社 电子设备及其控制方法以及存储介质
CN109976492B (zh) * 2017-12-28 2023-12-22 佳能株式会社 电子设备及其控制方法以及存储介质
CN111480152A (zh) * 2018-07-31 2020-07-31 华为技术有限公司 一种接口配置方法、终端设备及接口
CN111817385A (zh) * 2020-07-14 2020-10-23 维沃移动通信有限公司 充电器、数据线和充电设备
CN111817385B (zh) * 2020-07-14 2022-04-15 维沃移动通信有限公司 充电器、数据线和充电设备

Also Published As

Publication number Publication date
CN109478176B (zh) 2020-12-08
CN109478176A (zh) 2019-03-15

Similar Documents

Publication Publication Date Title
WO2017177377A1 (zh) 一种USB Type-C端口设备识别对端设备的方法、装置和系统
KR101490895B1 (ko) 제어 버스를 사용하는 전자 디바이스들의 발견
JP6083878B2 (ja) 電力供給の方向を決定する方法及び装置
US7193442B2 (en) USB 1.1 for USB OTG implementation
US9866055B2 (en) Automatic scheme to detect multi-standard charger types
US10574074B2 (en) Electronic device, method of controlling charging by electronic device, and method of supplying power by power supply device
TWI645645B (zh) 快速充電方法、移動終端和轉接器
US8843664B2 (en) Re-enumeration of USB 3.0 compatible devices
US8832345B2 (en) System for communicating between two electrical devices and method therefore
TWI744483B (zh) 通用串列匯流排(usb)設備、usb集線器及操作usb集線器之方法
WO2013168289A1 (ja) 電子機器およびその制御方法
WO2017117730A1 (zh) 快速充电方法、移动终端和适配器
EP3018556B1 (en) System for controlling peripherals connected to a docking station
US8533380B2 (en) Apparatus for peer-to-peer communication over a universal serial bus link
JP2016015005A (ja) ポータブル・デバイス、ケーブル・アセンブリおよびusbシステム
US9864607B2 (en) Methods and physical computer-readable storage media for initiating re-enumeration of USB 3.0 compatible devices
US9590441B2 (en) Multi-standard compliant USB battery charging scheme with detection of host disconnection in ACA-DOCK mode
CN105302750A (zh) 一种接口功能配置方法和电子设备
JP2019193331A (ja) コントローラ、制御方法、制御プログラム
US20190286202A1 (en) System, electronic device, and charge controlling method
WO2017071285A1 (zh) 移动终端的控制方法和装置
US10521385B2 (en) Inter-device digital audio
US20200394149A1 (en) Drp determining system and drp determining method using the same
US10795421B2 (en) Power transfer synchronization for information handling system and external device
WO2018195992A1 (zh) 控制方法、usb系统和电子装置

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16898196

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 16898196

Country of ref document: EP

Kind code of ref document: A1