WO2020024116A1 - Interface configuration method, terminal device and interface - Google Patents

Interface configuration method, terminal device and interface Download PDF

Info

Publication number
WO2020024116A1
WO2020024116A1 PCT/CN2018/097815 CN2018097815W WO2020024116A1 WO 2020024116 A1 WO2020024116 A1 WO 2020024116A1 CN 2018097815 W CN2018097815 W CN 2018097815W WO 2020024116 A1 WO2020024116 A1 WO 2020024116A1
Authority
WO
WIPO (PCT)
Prior art keywords
chip
type
connector
working state
external device
Prior art date
Application number
PCT/CN2018/097815
Other languages
French (fr)
Chinese (zh)
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 CN201880080710.6A priority Critical patent/CN111480152B/en
Priority to PCT/CN2018/097815 priority patent/WO2020024116A1/en
Publication of WO2020024116A1 publication Critical patent/WO2020024116A1/en

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/40Bus structure
    • 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 application relates to the technical field of terminal equipment, and in particular, to an interface configuration method, terminal equipment, and interface.
  • terminal devices Due to the diversified scenes in which users use terminal devices, many terminal devices may be unable to charge the interface and cannot connect to other devices after being wet or immersed in liquid.
  • the reason for the above situation is that the type-c interface installed on the terminal device is in the high and low level (toggle) state by default, that is, a rectangular voltage square wave is output on the channel configuration (CC) pin with a period of 50ms-100ms; when the type-c interface is wet or immersed in liquid, there is a voltage difference between the CC pin and the ground (GND) pin in the type-c interface and a path is formed; this leads to the formation of the CC pin The material undergoes an electrolytic reaction, which causes corrosion of the CC pin.
  • the embodiments of the present application provide an interface configuration method, a terminal device, and an interface to improve the problem that the CC pin of the type-c interface in the terminal device is corroded.
  • an embodiment of the present application provides a terminal device.
  • the terminal device is installed with a type-c interface.
  • the type-c interface includes a power output PD chip and a type-c connector.
  • the channel configuration CC pin is connected to the type-c connector.
  • the terminal device further includes a processing module and a monitoring module. In order to optimize the type-c interface, the processing module and the monitoring module have the following functions:
  • the processing module When determining that the type-c connector is not connected to an external device, the processing module sets the PD chip to a first working state (that is, a sink mode), shields the interrupt of the PD chip, and sends a startup to the monitoring module. A monitoring message to notify the monitoring module to start monitoring whether the type-c connector is connected to an external device;
  • the monitoring module After receiving the startup monitoring message, the monitoring module starts to monitor whether the type-c connector is connected to an external device, and when monitoring that the type-c connector is connected to an external device, sends a first A message
  • the processing module After receiving the first message, the processing module adjusts the PD chip from the first working state to a second working state (ie, a toggle mode), and starts receiving an interrupt of the PD chip.
  • a second working state ie, a toggle mode
  • the CC pin of the PD chip continuously outputs a low level in the first working state, and the CC pin of the PD chip outputs a rectangular square wave of high and low levels in the second working state.
  • the processing module in the terminal device determines that the type-c connector is not connected to an external device
  • the PD chip is set to the first working state in which the CC pin continuously outputs a low level, and when the processing module passes
  • the monitoring module monitors that the type-c is connected to an external device
  • the PD chip is set to the second working state of the rectangular square wave of high and low level output by the cc pin, so that the PD chip recognizes the external device, thereby ensuring the type-c interface Works fine.
  • the above solution can ensure that the type-c interface of the terminal device can be connected and recognize the normal operation of the external device.
  • the CC pin When the type-c connector is not connected to the external device, the CC pin continuously outputs a low level, thereby greatly reducing the CC.
  • the voltage difference between the pin and the GND pin can further alleviate the situation that the CC pin is corroded after the type-c interface is wet or immersed in liquid, so as to optimize the type-c interface.
  • the processing module may determine that the type-c connector is not connected to an external device in the following two cases:
  • the first case when the terminal device is powered on, it is determined that the type-c connector is not connected to an external device.
  • the processor module may default to the type-c connection when the terminal device is started and started. The device is not connected to an external device.
  • the second case when the second message sent by the PD chip is received, it is determined that the type-c connector is not connected to an external device; wherein the second message is that the PD chip works in the second Sent after it is determined that the type-c connector is not connected to an external device for a set duration.
  • the PD chip Because the PD chip is in the toggle mode, it can detect whether the type-c connector is connected to an external device through a rectangular square wave output from the CC pin. Therefore, when the PD chip detects that the type-c connection is not connected to an external device, it can promptly notify the processing module, so that the processing module can set the PD chip to sink mode in a timely manner. In addition, in order to avoid misjudgment due to a PD chip, the PD chip will determine that the type-c connector is not connected to an external device within a set duration (for example, 5 seconds, 10 seconds), and then send the second Message.
  • a set duration for example, 5 seconds, 10 seconds
  • the monitoring module includes a voltage dividing circuit and a monitoring chip; wherein the voltage dividing circuit provides a fixed voltage and is separately connected to the CC pin and the IC pin of the PD chip through a voltage dividing device.
  • the type-c connector is connected; in this case, the monitoring chip has the following functions: monitoring the voltage change of the voltage dividing device; determining when the voltage change of the voltage dividing device exceeds a set voltage threshold, determining The type-c connector is connected to an external device; and the first message is sent to the processing module.
  • the monitoring chip may collect the voltage of the voltage dividing device through an ADC, and compare the voltage values collected by a set number of times to determine the change of the voltage dividing device.
  • the voltage dividing circuit Since the voltage dividing circuit is fixed when the type-c connector is not connected to an external device, the voltage value of the voltage dividing device collected by the monitoring chip through the ADC is also fixed. When the type-c connector is connected to an external device, the external device introduces a new voltage, current, or equivalent resistance, etc., which causes the voltage of the voltage dividing device to change. Therefore, by this design, the monitoring chip can quickly and accurately judge whether the type-c connector is connected to an external device by judging a voltage change of any voltage dividing device.
  • the processing module may set the PD chip to the first working state by sending a third message to the PD chip, and the third message is used to notify the PD chip that the PD chip will The working state is adjusted to the first working state; the processing module may adjust the PD chip from the first working state to the second working state by sending a fourth message to the PD chip. The fourth message is used to notify the PD chip to adjust the working state to the second working state.
  • the processing module can set the working state of the PD chip.
  • the processing module after receiving the first message, sends a stop monitoring message to the monitoring module, where the stop monitoring message is used to notify the monitoring module to stop monitoring the type-c Whether the connector is connected to an external device; in this case, the monitoring module stops monitoring whether the type-c connector is connected to an external device after receiving the stop monitoring message.
  • the processing module and the PD chip communicate with each other through an internal integrated circuit I2C bus.
  • the SOC and the PD chip may transmit the second message, the third message, the fourth message, and the like through an I2C bus.
  • the processing module and the monitoring module communicate through a synchronous serial interface SSI.
  • SSI synchronous serial interface
  • an embodiment of the present application further provides a terminal device.
  • the terminal device is installed with a type-c interface.
  • the type-c interface includes a power output PD chip and a type-c connector.
  • the CC pin of the channel configuration is connected to the type-c connector.
  • the terminal device further includes a memory and a processor, and the program is stored in the memory.
  • the processor can read the program in the memory and perform the following operations:
  • the PD chip When it is determined that the type-c connector is not connected to an external device, set the PD chip to a first working state, shield the terminal of the PD chip, and start monitoring whether the type-c connector is connected to an external device; And when determining that the type-c connector is connected to an external device, adjust the PD chip from the first working state to a second working state, and start receiving an interrupt of the PD chip; wherein the PD chip
  • the CC pin continuously outputs a low level in the first working state, and the PD chip outputs a rectangular square wave of high and low levels in the second working state.
  • the PD chip when the processor in the terminal device determines that the type-c connector is not connected to an external device, the PD chip can be set to sink mode, and the PD chip is set when it is determined that the type-c connector is connected to an external device. It is toggle mode.
  • the CC pin in the PD chip continuously outputs a low level, thereby greatly reducing the CC pin and GND.
  • the voltage difference between the pins can further alleviate the situation that the CC pin is corroded after the type-c interface is wet or immersed in liquid, so as to optimize the type-c interface.
  • the processor may determine that the type-c connector is not connected to an external device in the following two cases:
  • the first case when the terminal device is powered on, it is determined that the type-c connector is not connected to an external device;
  • the second case when the first message sent by the PD chip is received, it is determined that the type-c connector is not connected to an external device; wherein the first message is that the PD chip works in the second Sent after it is determined that the type-c connector is not connected to an external device for a set duration.
  • the terminal device further includes a voltage dividing circuit, the voltage dividing circuit provides a fixed voltage, and is separately connected to the CC pin and the type-c of the PD chip through a voltage dividing device.
  • the connector is connected; in this case, the processor monitors a voltage change of the voltage dividing device; when the voltage change of the voltage dividing device is monitored to exceed a set voltage threshold, it is determined that the type-c connector is connected externally device.
  • the processor may implement the above-mentioned monitoring function through other devices (for example, PMU, etc.) separate from it. Specifically, the processor may send an instruction message to the device to notify the device to start or stop monitoring whether the type-c connector is connected to an external device, and determine the type-c by receiving a notification message from the device.
  • the connector connects external devices.
  • the processor and the device can communicate through SSI.
  • the processor may set the PD chip to the first working state by sending a second message to the PD chip; the processor may send a first message to the PD chip by Three messages, adjusting the PD chip from the first working state to the second working state.
  • the processor can set the working state of the PD chip.
  • the processor stops monitoring whether the type-c connector is connected to an external device.
  • the processor and the PD chip communicate with each other through an internal integrated circuit I2C bus.
  • an embodiment of the present application further provides an interface, where the interface includes a power output PD chip and a type-c connector, and a channel pin configured in the PD chip is connected to the type-c connector .
  • the PD chip has the following functions:
  • the working state of the chip is adjusted to a second working state; wherein the first message is used to notify the PD chip to adjust the working state to the first working state; the PD chip is CC under the first working state
  • the pin continuously outputs a low level; the connecting component is connected to the PD chip; the second message is used to notify the PD chip to adjust the working state to the second working state; the PD chip is in the In the second working state, the CC pin outputs a rectangular square wave of high and low levels.
  • the PD chip in the interface can adjust its working state according to the instruction message when receiving the instruction message sent by the processor in the terminal device.
  • the processor determines that the type-c connector in the interface is not connected to an external device, it can set the PD chip to sink mode, and when it determines that the type-c connector is connected to an external device, The PD chip is set to toggle mode.
  • the CC pin in the PD chip continuously outputs a low level, thereby greatly reducing the CC pin and GND.
  • the voltage difference between the pins can further alleviate the situation that the CC pin is corroded after the type-c interface is wet or immersed in liquid, so as to optimize the type-c interface.
  • the PD chip is further used for:
  • the PD chip when the PD chip detects that the type-c connection is not connected to an external device, it can notify the processor in time, so that the processor can set the PD chip to sink mode in time. In addition, in order to avoid misjudgment due to the PD chip, the PD chip sends the third message after determining that the type-c connector is not connected to an external device within a set duration (for example, 5 seconds, 10 seconds). .
  • a set duration for example, 5 seconds, 10 seconds.
  • the PD chip and the processor communicate with each other through an internal integrated circuit I2C bus.
  • an embodiment of the present application further provides an interface configuration method, which is applied to a processor in a terminal device, where the terminal device includes a power output PD chip and a type-c connector, and the PD chip
  • the channel configuration in the CC pin is connected to the type-c connector;
  • the processor has the functions of the processing module and the monitoring module in the first aspect, or the functions of the processor in the second aspect.
  • the method specifically includes the following steps:
  • the processor determines that the type-c connector is not connected to an external device, the processor sets the PD chip to a first working state, shields the interrupt of the PD chip, and starts monitoring whether the type-c connector is Connected to an external device; wherein the PD chip continuously outputs a low level under the first working state of the PD chip;
  • the processor When determining that the type-c connector is connected to an external device, the processor adjusts the PD chip from the first working state to a second working state, and starts receiving an interrupt of the PD chip; the PD The CC pin outputs a rectangular square wave of high and low levels in the second working state of the chip.
  • an embodiment of the present application further provides a computer program, and when the computer program is run on a computer, the computer is caused to execute the method provided in the fourth aspect.
  • an embodiment of the present application further provides a computer storage medium.
  • the computer storage medium stores a computer program.
  • the computer program is executed by a computer, the computer is caused to execute the method provided by the fourth aspect. .
  • an embodiment of the present application further provides a chip, which is used to read a computer program stored in a memory and execute the method provided in the fourth aspect.
  • an embodiment of the present application further provides a chip system including a processor, which is configured to support a computer device to implement the method provided in the fourth aspect.
  • the chip system further includes a memory, and the memory is configured to store programs and data necessary for the computer device.
  • the chip system can be composed of chips, and can also include chips and other discrete devices.
  • FIG. 1 is a structural diagram of a terminal device according to an embodiment of the present application.
  • FIG. 2 is a structural example diagram of a terminal device according to an embodiment of the present application.
  • FIG. 3 is an example equivalent circuit diagram of a terminal device when a type-c connector provided by an embodiment of the present application is not connected to an external device;
  • 4a-4d are equivalent circuit diagrams of a terminal device when a type-c connector according to an embodiment of the present application is connected to an external device;
  • FIG. 5 is a structural diagram of another terminal device according to an embodiment of the present application.
  • FIG. 6 is a flowchart of an interface configuration method according to an embodiment of the present application.
  • FIG. 7 is a flowchart of an example interface configuration according to an embodiment of the present application.
  • This application provides an interface configuration method, a terminal device, and an interface to improve the problem that the CC pin of the type-c interface in the terminal device is corroded.
  • the method and equipment are based on the same inventive concept. Since the principle of the method and the equipment to solve the problem is similar, the implementation of the equipment and the method can be referred to each other, and the duplicates are not described again.
  • the processing module in the terminal device determines that the type-c connector is not connected to an external device
  • the PD chip is set to the first working state where the CC pin continuously outputs a low level
  • the processing module monitors the type-c connection to an external device through a monitoring module
  • setting the PD chip to a second working state of a rectangular square wave of high and low level output by the cc pin, so that the PD chip recognizes the external device, So as to ensure the normal work of the type-c interface.
  • the above solution can ensure that the type-c interface of the terminal device can be connected and recognize the normal operation of the external device.
  • the CC pin When the type-c connector is not connected to the external device, the CC pin continuously outputs a low level, thereby greatly reducing the CC.
  • the voltage difference between the pin and the GND pin can further alleviate the situation that the CC pin is corroded after the type-c interface is wet or immersed in liquid, so as to optimize the type-c interface.
  • Terminal equipment also known as electronic equipment and user equipment (UE)
  • UE electronic equipment and user equipment
  • the terminal device may be a handheld device, a vehicle-mounted device, or the like.
  • MIDs mobile Internet devices
  • VR virtual reality
  • AR augmented reality
  • wireless terminal in industrial control wireless terminal in self driving, wireless terminal in remote surgery, wireless terminal in smart grid, transportation security wireless terminals in (transportation safety), wireless terminals in smart cities, or wireless terminals in smart homes, etc.
  • External device a device capable of connecting a terminal device through a type-c interface.
  • the external device may be an adapter, a headset, a mobile hard disk, a printer, a universal serial bus (Universal Serial Bus, USB) flash disk (U disk for short), and other devices.
  • USB Universal Serial Bus
  • Type-c interface which can realize the connection between terminal equipment and external equipment, and provide the interface of data transmission and charging function.
  • the type-c interface includes a type-c connector and a power output (PD) chip, and each pin in the PD chip is connected to the type-c connector.
  • PD power output
  • a type-c connector is a connector placed on the bottom of a terminal device. It can transmit current and signals after connecting other active devices.
  • the PD chip including 24 pins.
  • the 24 pins include TX + pin, TX- pin, RX + pin, RX- pin, VBUS pin, CC pin, D + pin, D- pin, and GND pin.
  • the PD chip can perform functions such as detecting whether the type-c connector is connected to an external device through the above-mentioned pins, and then perform data transmission or charging and discharging functions.
  • the PD chip will always be in the high and low level (toggle) mode, that is, the CC pin of the PD chip will output a rectangular square wave of high and low levels.
  • the external device When the type-c connector is connected to an external device, the external device will introduce new voltage, current, or equivalent resistance, etc. This will cause the waveform of the output on the CC pin to change.
  • the PD chip can monitor this waveform change. Detect whether the type-c connector is connected to an external device. If the PD chip detects that the type-c connector is connected to an external device, it will initiate an interrupt to the processing module in the terminal device to notify the processing module to perform a series of subsequent operations such as identifying the type of the external device to ensure the normal operation of the terminal device.
  • Power management unit as the power management unit of each chip in the terminal device, can provide the power required by each chip to ensure the normal operation of each chip of the terminal device.
  • the PMU also integrates an analog-to-digital converter (ADC), which can sample voltages and signals of certain pins in the type-c interface.
  • ADC analog-to-digital converter
  • a processing module for controlling and managing the PD chip.
  • the PD chip detects that the type-c connector is connected to an external device, it will initiate an interrupt to the processing module. After receiving the interrupt, the processing module will obtain information from the PD chip. In order to identify the type of the external device, the subsequent work of the PD chip is set, and the PD chip is controlled and managed.
  • the processing module may be a processor (ie, a central processing unit (CPU)) in a terminal device, or another device having a processing function independent of the processor.
  • processor ie, a central processing unit (CPU)
  • CPU central processing unit
  • the processing module may be a field-programmable gate array (FPGA), a complex programmable logic device (CPLD), an application-specific integrated circuit (ASIC), Or system-on-chip (System on chip, SOC) and some programmable chips.
  • FPGA field-programmable gate array
  • CPLD complex programmable logic device
  • ASIC application-specific integrated circuit
  • SOC System on chip
  • FIG. 1 shows a structural diagram of a terminal device provided by an embodiment of the present application.
  • a type-c interface is installed in the terminal device, that is, the type-c connector 104 and the PD chip 103 shown in the figure. All the pins in the PD chip 103 are connected to corresponding pins in the type-c connector 104.
  • CC pins cited in the embodiment of the present application
  • Pin and CC2 pin are shown in the figure.
  • the terminal device further includes a processing module 101 and a monitoring module 102.
  • a processing module 101 and a monitoring module 102.
  • a processing module 101 configured to determine that the type-c connector 104 is connected to an external device, set the PD chip 103 to a first working state (also referred to as a low-level (sink) mode), and shield the PD chip 103
  • the PD chip 103 interrupts and sends a monitoring start message to the monitoring module 102.
  • the PD chip 103 continuously outputs a low level in the CC pin in the first working state, and the startup monitoring message is used to notify the monitoring module 102 to start monitoring whether the type-c connector 104 is connected to an external device. device.
  • the monitoring module 102 is configured to, after receiving the startup monitoring message, start monitoring whether the type-c connector 104 is connected to an external device, and when monitoring that the type-c connector 104 is connected to an external device, The processing module 101 sends a first message.
  • the first message is used to notify the processing module 101 that the type-c connector 104 is connected to an external device, so that the processing module 101 resets the working state of the PD chip 103 so as not to affect the terminal. The device is working properly.
  • the processing module 101 is further configured to adjust the PD chip 103 from the first working state to the second working state (also referred to as a toggle mode) after receiving the first message, and Start receiving the interrupt of the PD chip 103.
  • the PD chip 103 outputs a rectangular square wave of high and low levels in the CC pin in the second working state.
  • the processing module 101 in the terminal device determines that the type-c connector 104 is not connected to an external device, it can set the PD chip 103 to sink mode and determine the type-c connector 104
  • the PD chip 103 is set to the toggle mode when an external device is connected.
  • the CC pin in the PD chip 103 continuously outputs a low level, thereby greatly reducing the CC pin.
  • the voltage difference from the GND pin can further alleviate the situation that the CC pin is corroded after the type-c interface is wet or immersed in liquid, so as to optimize the type-c interface.
  • the processing module 101 may determine that the type-c connector 104 is not connected to an external device in the following two cases:
  • the first case when the terminal device is powered on, it is determined that the type-c connector 104 is not connected to an external device.
  • the default type- The c connector 104 is not connected to an external device.
  • the second case when receiving the second message sent by the PD chip 103, it is determined that the type-c connector 104 is not connected to an external device; wherein the second message is that the PD chip 103 is in the Sent after determining that the type-c connector 104 is not connected to an external device for a set duration in the second working state.
  • the PD chip 103 when the PD chip 103 is in the toggle mode, it can detect whether the type-c connector 103 is connected to an external device through a rectangular square wave output from the CC pin. Therefore, when the PD chip 103 detects that the type-c connection 103 is not connected to an external device, it can notify the processing module 101 in time, so that the processing module 101 can set the PD chip 103 to sink mode in a timely manner. .
  • the PD chip 103 sends the second message after determining that the type-c connector 104 is not connected to an external device within a continuously set duration.
  • the set duration can be set to 5 seconds, 10 seconds, or the like.
  • the processing module 101 may set the PD chip 103 to the first working state by the following steps:
  • the processing module 101 can adjust the PD chip 103 from the first working state to the second working state by the following steps:
  • the processing module 101 may further send a stop monitoring message to the monitoring module 102 after receiving the first message, and the stop monitoring message is used to notify the monitoring module 102 to stop monitoring the office. Whether the type-c connector 104 is connected to an external device; the monitoring module 102 stops monitoring whether the type-c connector 104 is connected to an external device after receiving the stop monitoring message.
  • the monitoring module 102 continues to monitor the PD chip 103 in the toggle mode, resulting in waste of power.
  • processing module 101 and the PD chip 103 may communicate through an inter-integrated circuit (I2C) bus to transmit the second message, the third message, and the fourth message.
  • I2C inter-integrated circuit
  • the processing module 101 and the monitoring module 102 may communicate through a synchronous serial interface (SSI), and transmit the above-mentioned start monitoring message, stop monitoring message, first message, and the like.
  • the first message is an interrupt.
  • the processing module 101 may be implemented in multiple ways, for example, FPGA, ASIC, SOC, etc., which is not limited in this application.
  • the monitoring module 102 may also be implemented in multiple ways, for example, a dedicated integrated circuit, an FPGA, or the like.
  • the monitoring module 102 includes a voltage dividing circuit and a monitoring chip.
  • the voltage dividing circuit provides a fixed voltage, and is connected to the CC pin of the PD chip 103 and the type-c connector 104 through a voltage dividing device (for example, a resistor).
  • a voltage dividing device for example, a resistor
  • the monitoring chip is specifically configured to: monitor a voltage change of the voltage dividing device; when the voltage change of the voltage dividing device is monitored to exceed a set voltage threshold, determine that the type-c connector 104 is connected to an external device; And sending the first message to the processing module 101.
  • the monitoring chip continuously collects the voltage values of the voltage-dividing device 1 and the voltage-dividing device 2 through ADC1 and ADC2, and compares the voltage values with the voltage values collected last time to determine the voltage change of each voltage-dividing device. In addition, the monitoring chip saves the voltage value of the newly collected voltage-dividing device, so that it can continue to determine the voltage change in the future.
  • the monitoring chip may be a PMU.
  • the voltage dividing circuit is fixed, and the voltage values of the two voltage dividing devices collected by the monitoring chip through ADC1 and ADC2 are also fixed.
  • the external device introduces a new voltage, current, or equivalent resistance, etc., which causes the voltage of the voltage dividing device to change. Therefore, the monitoring chip can determine whether the type-c connector 104 is connected to an external device by determining a voltage change of any voltage dividing device.
  • the value of the set voltage threshold may be specifically set according to factors such as a specific scenario, a value of a voltage dividing device in a voltage dividing circuit, and a value of a fixed voltage.
  • each CC pin and the voltage divider circuit are connected to the path between the CC pin and the type-c connector.
  • the equivalent resistance between the nodes is 120 ⁇
  • the voltage value of the two voltage-dividing devices that the monitoring chip can monitor through ADC1 and ADC2 is 0.165V
  • the set voltage threshold is 0.04V.
  • Example 1 When a type-c connector is connected to a common adapter, the equivalent circuit of the terminal device is shown in Figure 4a.
  • Example 2 When a type-c connector is connected to a PD adapter, the equivalent circuit of the terminal device is shown in Figure 4b.
  • Equivalent resistance 1 4.7k ⁇
  • Equivalent resistance 2 4.7k ⁇ Current from current source 0.08A Voltage of the voltage-dividing device 1 sampled by ADC1 0.376V Voltage change of voltage-dividing device 1 0.211V
  • Equivalent resistance 1 5.1k ⁇
  • Equivalent resistance 2 5.1k ⁇ Current from current source 0.18A Voltage of the voltage-dividing device 1 sampled by ADC1 0.918V Voltage change of voltage-dividing device 1 0.753V
  • Equivalent resistance 1 5.6k ⁇
  • Equivalent resistance 2 5.6k ⁇ Current from current source 0.33A Voltage of the voltage-dividing device 1 sampled by ADC1 1.848V Voltage change of voltage-dividing device 1 1.683V
  • Example 3 When a type-c connector is connected to a plug-and-play (OTG) line or a digital headset, the equivalent circuit of the terminal device is shown in FIG. 4c.
  • OOG plug-and-play
  • Equivalent resistance 1 2.419k ⁇ Equivalent resistance 2 2.419k ⁇ Equivalent resistance 3 2.419k ⁇ Voltage of the voltage-dividing device 1 sampled by ADC1 0.082V Voltage change of voltage-dividing device 1 0.083V
  • Example 4 When a type-c connector is connected to an analog headset, the equivalent circuit of the terminal device is shown in Figure 4d.
  • the voltage of the voltage-dividing device 2 sampled by ADC2 is the same as the voltage of voltage-dividing device 1 sampled by ADC1.
  • the voltage change and voltage of type-c connector 2 before and after the analog earphone is connected to the type-c connector is the same, and is not listed here.
  • the voltage change of the voltage dividing device 1 in the above examples it can be known that, regardless of the type of the external device, the voltage change of at least one voltage dividing device before and after the type-c connector is connected to the external device exceeds the set voltage threshold of 0.04V. Therefore, experiments prove that the monitoring module can accurately determine whether the type-c connector is connected to an external device by monitoring the relationship between the voltage change of the voltage dividing device and the set voltage threshold.
  • each function in each embodiment of the present application Units can be integrated in one processing unit, or they can exist separately physically, or two or more units can be integrated in one unit.
  • the above integrated unit may be implemented in the form of hardware or in the form of software functional unit.
  • the integrated unit When the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a computer-readable storage medium.
  • the technical solution of the present application is essentially a part that contributes to the existing technology or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium.
  • a computer device which may be a personal computer, a server, or a network device
  • the aforementioned storage media include: U disks, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks or compact discs, and other media that can store program codes .
  • this application also provides a terminal device.
  • a type-c interface is installed in the terminal device, that is, a power output PD chip 503 and a type-c connector 504 shown in the figure. All the pins in the PD chip 503 are connected to corresponding pins in the type-c connector 504. For simplicity, only two CC pins (ie, the CC1 pin and the CC2 pin in the figure) involved in the embodiment of the present application are exemplarily shown in FIG. 5.
  • the terminal device further includes a processor 501 and a memory 502.
  • the processor 501, the memory 502, and the PD chip 503 are connected to each other.
  • the processor 501 and the memory 502 may be connected to each other through a bus 505;
  • the bus 505 may be a peripheral component interconnect (PCI) bus or an extended industry standard structure (extended industry standard structure) architecture, EISA) bus, etc.
  • PCI peripheral component interconnect
  • EISA extended industry standard structure
  • the bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is used in FIG. 5, but it does not mean that there is only one bus or one type of bus.
  • the terminal device may further include a transceiver for performing wireless communication with a network device in a mobile communication system.
  • the processor 501 integrates the processing function of the processing module 101 in the terminal device as shown in FIG. 1 and the monitoring function in the monitoring module 102, and can perform the following operations:
  • the PD chip 503 When it is determined that the type-c connector 504 is not connected to an external device, the PD chip 503 is set to a first working state, the interrupt of the PD chip 503 is shielded, and whether the type-c connector 504 is monitored is started. Connected to an external device; wherein the PD pin 503 continuously outputs a low level under the first working state;
  • the PD chip 503 When it is determined that the type-c connector 504 is connected to an external device, the PD chip 503 is adjusted from the first working state to the second working state, and an interrupt of receiving the PD chip 503 is started; the PD chip 503 In the second working state, the CC pin outputs a rectangular square wave of high and low levels.
  • the processor 501 determines that the type-c connector 504 is not connected to an external device, it is specifically configured to:
  • the PD chip 503 When receiving the first message sent by the PD chip 503, it is determined that the type-c connector 504 is not connected to an external device; wherein the first message is that the PD chip 503 is in the second working state Sent after determining that the type-c connector 504 is not connected to an external device for a set duration.
  • the processor 501 can monitor whether the type-c connector 504 is connected to an external device in various ways.
  • the processor 501 may implement the monitoring function by its own hardware or software; or the processor 501 may implement the monitoring function by means of a circuit.
  • the terminal device further includes a voltage dividing circuit that provides a fixed voltage, and is separately connected to the CC pin and the type- of the PD chip 503 through a voltage dividing device.
  • c connector 504 is connected;
  • the processor 501 monitors whether the type-c connector 504 is connected to an external device, it is specifically configured to:
  • the processor 501 may collect the voltage in the voltage dividing device through a voltage sampling device (such as an ADC in a PMU) of the terminal device, and then collect the The voltage value determines the voltage change of the voltage dividing device.
  • a voltage sampling device such as an ADC in a PMU
  • the processor 501 when the processor 501 sets the PD chip 503 to the first working state, the processor 501 is specifically configured to:
  • the processor 501 adjusts the PD chip 503 from the first working state to the second working state
  • the processor 501 is specifically configured to:
  • the processor 501 is further configured to:
  • the processor 501 may implement the above-mentioned monitoring function through other devices (for example, PMU, etc.) separate from the processor. Specifically, the processor 501 may send an instruction message to the device to notify the device to start or stop monitoring whether the type-c connector 504 is connected to an external device, and determine the type by receiving a notification message from the device. -c connector 504 connects an external device.
  • the processor 501 and the device may communicate through SSI.
  • the processor 501 and the PD chip 503 communicate with each other through an I2C bus to transmit the first message, the second message, and the third message.
  • the memory 502 is configured to store programs and the like.
  • the program may include program code, and the program code includes a computer operation instruction.
  • the memory 502 may include random access memory (RAM), and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
  • the processor 501 reads and executes the program stored in the memory 502 to implement the functions described above, and thus optimizes the type-c interface.
  • An embodiment of the present application provides a terminal device.
  • the PD chip can be set to a sink mode, and the type-c connector is determined. Set the PD chip to toggle mode when connecting external devices.
  • the CC pin in the PD chip continuously outputs a low level, thereby greatly reducing the CC pin and GND.
  • the voltage difference between the pins can further alleviate the situation that the CC pin is corroded after the type-c interface is wet or immersed in liquid, so as to optimize the type-c interface.
  • this application further provides an interface, which can be installed in the terminal device shown in FIGS. 1-3 and FIG. 5.
  • the interface includes a power output PD chip and a type-c connector, and a channel configuration CC pin in the PD chip is connected to the type-c connector.
  • the PD chip can not only implement traditional functions through the pins it contains, but also perform the following operations:
  • the processor in the terminal device When receiving the first message sent by the processor in the terminal device, adjusting the working state of the PD chip to the first working state; wherein the first message is used to notify the PD chip to adjust the working state to The first working state; the PD chip continuously outputs a low level under the first working state; the connecting component is connected to the PD chip;
  • the CC pin Upon receiving a second message sent by the processor, adjusting the working state of the PD chip to a second working state; wherein the second message is used to notify the PD chip to adjust the working state to the A second working state; in the second working state, the CC pin outputs a rectangular square wave of high and low levels.
  • the PD chip is further configured to:
  • the PD chip and the processor communicate with each other through an internal integrated circuit I2C bus.
  • An embodiment of the present application provides an interface, and when a PD chip in the interface receives an instruction message sent by a processor in a terminal device, it can adjust its working state according to the instruction message. Based on the interface, when the processor determines that the type-c connector in the interface is not connected to an external device, it can set the PD chip to sink mode, and when it determines that the type-c connector is connected to an external device, The PD chip is set to toggle mode. In this way, without affecting the normal operation of the terminal device, when the type-c connector is not connected to an external device, the CC pin in the PD chip continuously outputs a low level, thereby greatly reducing the CC pin and GND. The voltage difference between the pins can further alleviate the situation that the CC pin is corroded after the type-c interface is wet or immersed in liquid, so as to optimize the type-c interface.
  • this application also provides an interface configuration method.
  • the method is applied to a processor in a terminal device as shown in FIG. 5, where the terminal device includes a power output PD chip and a type-c connector.
  • a channel configuration CC pin in the PD chip is connected to the type-c connector.
  • the method includes the following processes:
  • S601 When the processor determines that the type-c connector is not connected to an external device, the processor sets the PD chip to a first working state (that is, sink mode), shields the interrupt of the PD chip, and starts a monitoring station. Describes whether the type-c connector is connected to an external device.
  • a first working state that is, sink mode
  • the CC pin continuously outputs a low level in the PD chip in the first working state.
  • the processor may, but is not limited to, determine that the type-c connector is not connected to an external device in the following two ways:
  • the processor determines that the type-c connector is not connected to an external device.
  • Second method When the processor receives the first message sent by the PD chip, it determines that the type-c connector is not connected to an external device; wherein the first message is that the PD chip is in the first Sent after determining that the type-c connector has not been connected to an external device for a set period of time in the second working state (ie, the toggle mode).
  • the PD chip may send the first message to the processor through an I2C bus.
  • the processor may set the PD chip to the first working state through the following steps:
  • the processor sends a second message to the PD chip, and the second message is used to notify the PD chip to adjust a working state to the first working state.
  • the processor may send the second message to the PD chip through an I2C bus.
  • S602 When the processor determines that the type-c connector is connected to an external device, the processor adjusts the PD chip from the first working state to a second working state, and starts receiving an interrupt of the PD chip.
  • the PD chip outputs a rectangular square wave of high and low levels at the CC pin in the second working state.
  • the processor may adjust the PD chip from the first working state to the first working state by the following steps. Describe the second working state:
  • the processor sends a third message to the PD chip, and the third message is used to notify the PD chip to adjust a working state to the second working state.
  • the processor may send the third message to the PD chip through an I2C bus.
  • the processor may implement the monitoring function in multiple ways.
  • the terminal device further includes a voltage dividing circuit as shown in FIG. 2, and the processor has the functions of a monitoring chip and a processing module in FIG. 2, the processor may monitor the voltage of the voltage dividing device. When the voltage change of the voltage dividing device exceeds a set voltage threshold, the processor determines that the type-c connector is connected to an external device.
  • the The method also includes:
  • the processor stops monitoring whether the type-c connector is connected to an external device.
  • the processor may internally integrate other devices (for example, PMU, etc.) or modules with a monitoring function to implement the above monitoring function, or use other devices or modules with a monitoring function that are separate from the processor.
  • the monitoring function Specifically, the processor may notify the device to start or stop monitoring whether the type-c connector is connected to an external device by sending an instruction message to the device, and determine the type-c by receiving a notification message from the device.
  • the connector connects external devices.
  • the processor and the device can communicate through SSI.
  • An embodiment of the present application provides an interface configuration method.
  • the PD chip when the processor in the terminal device determines that the type-c connector is not connected to an external device, the PD chip is set to a CC pin that continuously outputs a low level.
  • a first working state when the processor determines that the type-c is connected to an external device, the PD chip is set to a second working state of a rectangular square wave in which a cc pin outputs high and low levels, so that the PD
  • the chip recognizes the external device to ensure the normal operation of the type-c interface.
  • the above solution can ensure that the type-c interface of the terminal device can be connected and recognize the normal operation of the external device.
  • the CC pin When the type-c connector is not connected to the external device, the CC pin continuously outputs a low level, thereby greatly reducing the CC.
  • the voltage difference between the pin and the GND pin can further alleviate the situation that the CC pin is corroded after the type-c interface is wet or immersed in liquid, so as to optimize the type-c interface.
  • the above interface configuration method may cause misjudgment whether the type-c connector is connected to an external device.
  • an example of an interface configuration is provided in the embodiment of this application.
  • the terminal device can reduce the misjudgment of the connection status of the type-c connector through a set fault tolerance mechanism.
  • the processing module is an SOC
  • the monitoring module includes a PMU and a voltage dividing circuit as an example.
  • the voltage dividing circuit is a voltage dividing circuit as shown in FIG. 2. Referring to FIG. 7, the process of configuring an interface on this interface includes the following steps:
  • the charging management chip is used to manage the charging of the terminal device.
  • the charging management chip sends an interrupt to the SOC to Notify the SOC to start the charging work to ensure the normal charging of the terminal device.
  • the interrupt of the charge management chip may be a Vbus_dec_in interrupt.
  • the charge management chip may be a PMU.
  • the SOC sets the PD chip in the type-c interface of the terminal device to sink mode, shields the interruption of the PD chip, and sends a start monitoring message to the PMU to notify the PMU to separately monitor the voltage dividing circuit through two ADCs.
  • the voltage changes of the two voltage-dividing devices in the device monitor whether the type-c connector is connected to an external device.
  • the PMU determines that the voltage change of the at least one voltage dividing device exceeds a set voltage threshold, it indicates that the type-c connector is connected to an external device.
  • the PMU can use the following methods to monitor the voltage change of a voltage-dividing device through any ADC:
  • the ADC samples the voltage of the voltage dividing device according to the set sampling period, and stores the collected voltage value in the PMU;
  • the PMU compares the newly sampled voltage value of the ADC with the voltage value of the last sample to determine the voltage change of the voltage-dividing device.
  • the PMU may store all voltage values of the voltage dividing device sampled by the ADC, or the PMU may save a set number of voltage values of the voltage dividing device sampled by the ADC, or the PMU may The voltage value of the voltage-dividing device is collected within a set duration (for example, 5s, 6s) that is closest to the current moment, which is not limited in this application.
  • S703 The SOC continues to determine whether an interruption to the charge management chip is received, and if so, executes S707, otherwise executes S704.
  • the SOC receives the interruption of the charge management chip, which indicates that the type-c connector may be connected to a power supply device, the SOC needs to identify the type of the device through the PD chip to ensure the normal operation of the terminal device. If the SOC does not receive the interrupt from the charge management chip, the SOC does not need to change the mode of the PD chip. Instead, the PMU continues to monitor the voltage change of the voltage-dividing device until the SOC receives the PMU and sends it when it determines that the type-c connector is connected to an external device. First news.
  • S704 The SOC determines whether the first message of the PMU is received, and if yes, executes S707, otherwise executes S705.
  • the SOC receives the first message, indicating that the type-c connector may be connected to a power supply device, the SOC needs to identify the type of the device through the PD chip to ensure the normal operation of the terminal device. If the SOC does not receive the first message, the SOC does not need to change the mode of the PD chip, but continues to monitor the voltage change of the voltage dividing device through the PMU.
  • the SOC determines that the screen of the terminal device changes from a black screen to a bright screen (that is, the screen of the terminal device is woken up).
  • the terminal device receives notifications of text messages and various applications, the terminal device receives incoming calls, and the user of the terminal device wakes up the screen by touching the screen or function keys.
  • the type-c connector of the terminal device when the type-c connector of the terminal device is connected to an external device, there may be various reasons such as misidentification of the PMU or the phone change of the voltage-dividing device not exceeding the set voltage threshold.
  • the message and / or the interruption of the charging management chip In this case, the terminal device generally has no operation response, and the user of the terminal device wakes up the screen to determine the working condition of the terminal device.
  • S706 The SOC judges whether the screen change is triggered by the user, if yes, executes S707, otherwise executes S703.
  • the SOC sends a stop monitoring message to the PMU to notify the PMU to stop monitoring the voltage change of the two voltage-dividing devices in the voltage-dividing circuit through two ADCs; adjusting the PD chip from sink mode to toggle mode and starting reception PD chip interrupt.
  • the PD chip interrupt is sent when the PD chip detects that the type-c connector is connected to an external device.
  • S708 The SOC determines whether an interrupt of the PD chip is received, and if so, executes S709; otherwise, it indicates that the type-c connector is likely not connected to an external device, and the SOC is required to execute S702 to continue setting the PD chip to sink mode.
  • the SOC can determine whether the execution of S702 needs to be postponed based on the display status of the screen: When the SOC determines that the screen of the current terminal device is bright, the SOC executes S702 after the first set time period (for example, 5s, or 10s, etc.); If it is determined that the screen of the current terminal device is a black screen, the SOC executes S702 immediately or after a second set duration. The second set duration is shorter than the first set duration.
  • the SOC obtains the information of the external device from the PD chip to identify the type of the external device, thereby performing the normal work of the terminal device.
  • S710 When the SOC receives the second message sent by the PD chip, it returns to execute S702.
  • the second message is sent after the PD chip determines that the type-c connector is not connected to an external device for a third set duration (for example, 10s) in the toggle mode. Therefore, in order to optimize the interface, the SOC needs to continue to The PD chip is set to sink mode.
  • the SOC in the terminal device can set the PD chip to sink mode when the type-c connector is not connected to an external device, and set the PD chip to toggle mode when it is determined that the type-c connector is connected to an external device.
  • the CC pin in the PD chip continuously outputs a low level, thereby greatly reducing the CC pin and GND.
  • the voltage difference between the pins can further alleviate the situation that the CC pin is corroded after the type-c interface is wet or immersed in liquid.
  • the SOC in S706 is also used to determine whether the screen is triggered by the user when the screen is woken up, and whether the SOC in S708
  • an embodiment of the present application further provides a computer program, which, when the computer program runs on a computer, causes the computer to execute the interface configuration method provided by the embodiment shown in FIG. 6 or FIG. 7.
  • an embodiment of the present application further provides a computer storage medium.
  • the computer storage medium stores a computer program, and when the computer program is executed by the computer, the computer executes the embodiment shown in FIG. 6 or FIG. 7. Provided interface configuration methods.
  • an embodiment of the present application further provides a chip for reading a computer program stored in a memory to implement the interface configuration method provided by the embodiment shown in FIG. 6 or FIG. 7.
  • an embodiment of the present application provides a chip system including a processor, which is configured to support a computer device to implement functions related to the processor in FIG. 6 or the SOC in FIG. 7.
  • the chip system further includes a memory, and the memory is configured to store programs and data necessary for the computer device.
  • the chip system can be composed of chips, and can also include chips and other discrete devices.
  • the embodiments of the present application provide an interface configuration method, terminal device, and interface.
  • the processing module in the terminal device sets the PD chip when it determines that the type-c connector is not connected to an external device. It is the first working state where the CC pin continuously outputs a low level, and when the processing module monitors the type-c through the monitoring module to connect to an external device, the PD chip is set to output a rectangular square wave of high and low level on the cc pin. A second working state, so that the PD chip recognizes the external device, thereby ensuring normal work of the type-c interface.
  • the above solution can ensure that the type-c interface of the terminal device can be connected and recognize the normal operation of the external device.
  • the CC pin When the type-c connector is not connected to the external device, the CC pin continuously outputs a low level, thereby greatly reducing the CC.
  • the voltage difference between the pin and the GND pin can further alleviate the situation that the CC pin is corroded after the type-c interface is wet or immersed in liquid, so as to optimize the type-c interface.
  • this application may be provided as a method, a system, or a computer program product. Therefore, this application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, this application may take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
  • computer-usable storage media including, but not limited to, disk storage, CD-ROM, optical storage, etc.
  • These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to work in a particular manner such that the instructions stored in the computer-readable memory produce a manufactured article including an instruction device, the instructions
  • the device implements the functions specified in one or more flowcharts and / or one or more blocks of the block diagram.
  • These computer program instructions can also be loaded on a computer or other programmable data processing device, so that a series of steps can be performed on the computer or other programmable device to produce a computer-implemented process, which can be executed on the computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more flowcharts and / or one or more blocks of the block diagrams.

Abstract

An interface configuration method, a terminal device and an interface for ameliorating the problem of a CC pin of a type-c interface in a terminal device being corroded. In the method, a processing module in a terminal device configures, when determining that a type-c connector is not connected to an external device, a PD chip to be in a first operating state in which a CC pin continuously outputs a low level, and configures, when the processing module monitors that the type-c connector is connected to an external device by means of a monitoring module, the PD chip to be in a second operating state in which the CC pin outputs a high-low level square wave, such that the PD chip identifies the external device, thereby ensuring the normal operation of a type-c interface. According to the solution, when a type-c connector is not connected to an external device, a CC pin can be enabled to continuously output a low level, thereby greatly reducing the voltage difference between the CC pin and a GND pin and further relieving the corrosion of the CC pin after a type-c interface is affected by damp or is immersed in a liquid.

Description

一种接口配置方法、终端设备及接口Interface configuration method, terminal equipment and interface 技术领域Technical field
本申请涉及终端设备技术领域,尤其涉及一种接口配置方法、终端设备及接口。The present application relates to the technical field of terminal equipment, and in particular, to an interface configuration method, terminal equipment, and interface.
背景技术Background technique
随着接口技术的更新换代,目前type-c接口的以正反可用、数据传输速度快,以及较强的扩展功能等优势越来越受到终端设备厂商的青睐。With the upgrading of the interface technology, the advantages of the type-c interface are now more and more favored by terminal equipment manufacturers due to its positive and negative availability, fast data transmission speed, and strong extended functions.
由于用户使用终端设备的场景多元化,很多终端设备在受潮、浸液后会出现接口无法充电、无法连接其他设备的情况。Due to the diversified scenes in which users use terminal devices, many terminal devices may be unable to charge the interface and cannot connect to other devices after being wet or immersed in liquid.
导致出现上述情况的原因是:安装在终端设备上的type-c接口默认处于高低电平(即toggle)状态,即通道配置(channel configuration,CC)引脚上会输出矩形电压方波,周期为50ms-100ms;当type-c接口受潮或浸液后,type-c接口中的CC引脚和接地(ground,GND)引脚之间存在电压差并形成通路;这就导致形成CC引脚的材料发生电解反应,导致CC引脚被腐蚀。The reason for the above situation is that the type-c interface installed on the terminal device is in the high and low level (toggle) state by default, that is, a rectangular voltage square wave is output on the channel configuration (CC) pin with a period of 50ms-100ms; when the type-c interface is wet or immersed in liquid, there is a voltage difference between the CC pin and the ground (GND) pin in the type-c interface and a path is formed; this leads to the formation of the CC pin The material undergoes an electrolytic reaction, which causes corrosion of the CC pin.
发明内容Summary of the invention
本申请实施例提供了一种接口配置方法、终端设备及接口,用以改善终端设备中type-c接口的CC引脚被腐蚀的问题。The embodiments of the present application provide an interface configuration method, a terminal device, and an interface to improve the problem that the CC pin of the type-c interface in the terminal device is corroded.
第一方面,本申请实施例提供了一种终端设备,所述终端设备中安装有type-c接口,该type-c接口包含功率输出PD芯片和type-c连接器,所述PD芯片中的通道配置CC引脚连接所述type-c连接器。所述终端设备还包括处理模块和监测模块,为了实现对type-c接口的优化,所述处理模块和所述监测模块具有如下功能:In a first aspect, an embodiment of the present application provides a terminal device. The terminal device is installed with a type-c interface. The type-c interface includes a power output PD chip and a type-c connector. The channel configuration CC pin is connected to the type-c connector. The terminal device further includes a processing module and a monitoring module. In order to optimize the type-c interface, the processing module and the monitoring module have the following functions:
所述处理模块在确定所述type-c连接器未连接外部设备时,将所述PD芯片设置为第一工作状态(即sink模式),屏蔽所述PD芯片的中断,并向监测模块发送启动监测消息,以通知所述监测模块启动监测所述type-c连接器是否连接外部设备;When determining that the type-c connector is not connected to an external device, the processing module sets the PD chip to a first working state (that is, a sink mode), shields the interrupt of the PD chip, and sends a startup to the monitoring module. A monitoring message to notify the monitoring module to start monitoring whether the type-c connector is connected to an external device;
所述监测模块在接收到所述启动监测消息后,启动监测所述type-c连接器是否连接外部设备,在监测到所述type-c连接器连接外部设备时,向所述处理模块发送第一消息;After receiving the startup monitoring message, the monitoring module starts to monitor whether the type-c connector is connected to an external device, and when monitoring that the type-c connector is connected to an external device, sends a first A message
所述处理模块在接收到所述第一消息后,将所述PD芯片从所述第一工作状态调整为第二工作状态(即toggle模式),并启动接收所述PD芯片的中断。After receiving the first message, the processing module adjusts the PD chip from the first working state to a second working state (ie, a toggle mode), and starts receiving an interrupt of the PD chip.
其中,所述PD芯片在所述第一工作状态下CC引脚持续输出低电平,所述PD芯片在所述第二工作状态下CC引脚输出高低电平的矩形方波。Wherein, the CC pin of the PD chip continuously outputs a low level in the first working state, and the CC pin of the PD chip outputs a rectangular square wave of high and low levels in the second working state.
通过本方案,终端设备中的处理模块在确定type-c连接器未连接外部设备时,将PD芯片设置为CC引脚持续输出低电平的第一工作状态,并且在当所述处理模块通过监测模块监测type-c连接外部设备时,将PD芯片设置为cc引脚输出高低电平的矩形方波的第二工作状态,以使所述PD芯片识别该外部设备,从而保证type-c接口的正常工作。上述方案可以保证终端设备的type-c接口能够连接并识别外部设备正常工作的基础上,在type-c连接器未连接外部设备时,使CC引脚持续输出低电平,从而大大降低了CC引脚与GND引脚的电压差,进而可以缓解type-c接口受潮或浸液后CC引脚被腐蚀的情况,实现对type-c 接口的优化。With this solution, when the processing module in the terminal device determines that the type-c connector is not connected to an external device, the PD chip is set to the first working state in which the CC pin continuously outputs a low level, and when the processing module passes When the monitoring module monitors that the type-c is connected to an external device, the PD chip is set to the second working state of the rectangular square wave of high and low level output by the cc pin, so that the PD chip recognizes the external device, thereby ensuring the type-c interface Works fine. The above solution can ensure that the type-c interface of the terminal device can be connected and recognize the normal operation of the external device. When the type-c connector is not connected to the external device, the CC pin continuously outputs a low level, thereby greatly reducing the CC. The voltage difference between the pin and the GND pin can further alleviate the situation that the CC pin is corroded after the type-c interface is wet or immersed in liquid, so as to optimize the type-c interface.
在一个可能的设计中,所述处理模块可以在以下两种情况下,确定所述type-c连接器未连接外部设备:In a possible design, the processing module may determine that the type-c connector is not connected to an external device in the following two cases:
第一种情况:在所述终端设备开机启动时,确定所述type-c连接器未连接外部设备。The first case: when the terminal device is powered on, it is determined that the type-c connector is not connected to an external device.
由于用户在使用终端设备的过程中,很少会在type-c连接器连接有外部设备的时开机启动,因此,所述处理器模块可以在所述终端设备开机启动时,默认type-c连接器未连接外部设备。Because the user rarely uses the terminal device to start and start when the type-c connector is connected to an external device during the process of using the terminal device, the processor module may default to the type-c connection when the terminal device is started and started. The device is not connected to an external device.
第二种情况:在接收到所述PD芯片发送的第二消息时,确定所述type-c连接器未连接外部设备;其中,所述第二消息为所述PD芯片在所述第二工作状态下确定所述type-c连接器持续设定时长内未连接外部设备后发送的。The second case: when the second message sent by the PD chip is received, it is determined that the type-c connector is not connected to an external device; wherein the second message is that the PD chip works in the second Sent after it is determined that the type-c connector is not connected to an external device for a set duration.
由于PD芯片在处于toggle模式时,可以通过CC引脚输出的矩形方波探测所述type-c连接器是否连接外部设备。因此,当所述PD芯片在探测到type-c连接未连接外部设备时,可以及时通知所述处理模块,从而使所述处理模块可以及时将所述PD芯片设置为sink模式。另外,为了避免由于PD芯片出现误判,所述PD芯片会在持续设定时长(例如5秒、10秒)内确定所述type-c连接器未连接外部设备后,再发送所述第二消息。Because the PD chip is in the toggle mode, it can detect whether the type-c connector is connected to an external device through a rectangular square wave output from the CC pin. Therefore, when the PD chip detects that the type-c connection is not connected to an external device, it can promptly notify the processing module, so that the processing module can set the PD chip to sink mode in a timely manner. In addition, in order to avoid misjudgment due to a PD chip, the PD chip will determine that the type-c connector is not connected to an external device within a set duration (for example, 5 seconds, 10 seconds), and then send the second Message.
在一个可能的设计中,所述监测模块中包含分压电路和监测芯片;其中,所述分压电路提供固定电压,并通过分压器件分别与所述PD芯片的所述CC引脚和所述type-c连接器连接;在该情况下,所述监测芯片具有以下功能:监测所述分压器件的电压变化;当监测到所述分压器件的电压变化超过设定电压阈值时,确定所述type-c连接器连接外部设备;向所述处理模块发送所述第一消息。In a possible design, the monitoring module includes a voltage dividing circuit and a monitoring chip; wherein the voltage dividing circuit provides a fixed voltage and is separately connected to the CC pin and the IC pin of the PD chip through a voltage dividing device. The type-c connector is connected; in this case, the monitoring chip has the following functions: monitoring the voltage change of the voltage dividing device; determining when the voltage change of the voltage dividing device exceeds a set voltage threshold, determining The type-c connector is connected to an external device; and the first message is sent to the processing module.
其中,所述监测芯片可以通过ADC采集分压器件的电压,并通过设定次数采集的电压值进行对比,确定分压器件的变化变化。The monitoring chip may collect the voltage of the voltage dividing device through an ADC, and compare the voltage values collected by a set number of times to determine the change of the voltage dividing device.
由于当所述type-c连接器未连接外部设备时,分压电路是固定的,所述监测芯片通过ADC采集到的分压器件的电压值也是固定的。当所述type-c连接器连接外部设备后,外部设备会引入新的电压、电流或等效电阻等,这就导致分压器件的电压发生变化。因此,通过该设计,所述监测芯片可以通过判断任一个分压器件的电压变化,快速且准确地判断所述type-c连接器是否连接外部设备。Since the voltage dividing circuit is fixed when the type-c connector is not connected to an external device, the voltage value of the voltage dividing device collected by the monitoring chip through the ADC is also fixed. When the type-c connector is connected to an external device, the external device introduces a new voltage, current, or equivalent resistance, etc., which causes the voltage of the voltage dividing device to change. Therefore, by this design, the monitoring chip can quickly and accurately judge whether the type-c connector is connected to an external device by judging a voltage change of any voltage dividing device.
在一个可能的设计中,所述处理模块可以通过向所述PD芯片发送第三消息,将所述PD芯片设置为所述第一工作状态,所述第三消息用于通知所述PD芯片将工作状态调整为所述第一工作状态;所述处理模块可以通过向所述PD芯片发送第四消息,将所述PD芯片从所述第一工作状态调整为所述第二工作状态,所述第四消息用于通知所述PD芯片将工作状态调整为所述第二工作状态。In a possible design, the processing module may set the PD chip to the first working state by sending a third message to the PD chip, and the third message is used to notify the PD chip that the PD chip will The working state is adjusted to the first working state; the processing module may adjust the PD chip from the first working state to the second working state by sending a fourth message to the PD chip. The fourth message is used to notify the PD chip to adjust the working state to the second working state.
通过该设计,所述处理模块可以设置所述PD芯片的工作状态。With this design, the processing module can set the working state of the PD chip.
在一个可能的设计中,所述处理模块在接收到所述第一消息后,向所述监测模块发送停止监测消息,所述停止监测消息用于通知所述监测模块停止监测所述type-c连接器是否连接外部设备;在该情况下,所述监测模块在接收到所述停止监测消息后,停止监测所述type-c连接器是否连接外部设备。通过该设计,可以避免所述PD芯片在toggle模式下所述监测模块还继续监测导致电能的浪费。In a possible design, after receiving the first message, the processing module sends a stop monitoring message to the monitoring module, where the stop monitoring message is used to notify the monitoring module to stop monitoring the type-c Whether the connector is connected to an external device; in this case, the monitoring module stops monitoring whether the type-c connector is connected to an external device after receiving the stop monitoring message. By this design, it can be avoided that the monitoring module continues to monitor the PD chip in the toggle mode, causing waste of power.
在一个可能的设计中,所述处理模块与所述PD芯片之间通过内部集成电路I2C总线进行通信。例如,当所述处理模块为SOC时,所述SOC可以与所述PD芯片之间通过I2C 总线,传输上述第二消息、第三消息、第四消息等。In a possible design, the processing module and the PD chip communicate with each other through an internal integrated circuit I2C bus. For example, when the processing module is a SOC, the SOC and the PD chip may transmit the second message, the third message, the fourth message, and the like through an I2C bus.
在一个可能的设计中,所述处理模块与所述监测模块之间通过同步串行接口SSI进行通信。例如,当所述处理模块为SOC、所述监测模块有包含PMU时,所述SOC和所述PMU之间可以通过SSI传输上述启动监测消息、停止监测消息、第一消息等。In a possible design, the processing module and the monitoring module communicate through a synchronous serial interface SSI. For example, when the processing module is a SOC and the monitoring module includes a PMU, the above-mentioned start monitoring message, stop monitoring message, first message, etc. may be transmitted between the SOC and the PMU through SSI.
第二方面,本申请实施例还提供了一种终端设备,所述终端设备中安装有type-c接口,该type-c接口包含功率输出PD芯片和type-c连接器,所述PD芯片中的通道配置CC引脚连接所述type-c连接器。所述终端设备还包括存储器和处理器,所述存储器中存储程序,所述为了实现对type-c接口的优化,所述处理器可以读取存储器中的程序,执行以下操作:In a second aspect, an embodiment of the present application further provides a terminal device. The terminal device is installed with a type-c interface. The type-c interface includes a power output PD chip and a type-c connector. The CC pin of the channel configuration is connected to the type-c connector. The terminal device further includes a memory and a processor, and the program is stored in the memory. In order to optimize the type-c interface, the processor can read the program in the memory and perform the following operations:
在确定所述type-c连接器未连接外部设备时,将所述PD芯片设置为第一工作状态,屏蔽所述PD芯片的终端,并启动监测所述type-c连接器是否连接外部设备;并在确定所述type-c连接器连接外部设备时,将所述PD芯片从所述第一工作状态调整为第二工作状态,并启动接收所述PD芯片的中断;其中,所述PD芯片在所述第一工作状态下CC引脚持续输出低电平,所述PD芯片在所述第二工作状态下CC引脚输出高低电平的矩形方波。When it is determined that the type-c connector is not connected to an external device, set the PD chip to a first working state, shield the terminal of the PD chip, and start monitoring whether the type-c connector is connected to an external device; And when determining that the type-c connector is connected to an external device, adjust the PD chip from the first working state to a second working state, and start receiving an interrupt of the PD chip; wherein the PD chip The CC pin continuously outputs a low level in the first working state, and the PD chip outputs a rectangular square wave of high and low levels in the second working state.
通过本方案,终端设备中的处理器在确定type-c连接器未连接外部设备时,可以将PD芯片设置为sink模式,并在确定所述type-c连接器连接外部设备时将PD芯片设置为toggle模式。这样,在不影响所述终端设备正常工作的情况下,在type-c连接器未连接外部设备时,使PD芯片中的CC引脚持续输出低电平,从而大大降低了CC引脚与GND引脚的电压差,进而可以缓解type-c接口受潮或浸液后CC引脚被腐蚀的情况,实现对type-c接口的优化。With this solution, when the processor in the terminal device determines that the type-c connector is not connected to an external device, the PD chip can be set to sink mode, and the PD chip is set when it is determined that the type-c connector is connected to an external device. It is toggle mode. In this way, without affecting the normal operation of the terminal device, when the type-c connector is not connected to an external device, the CC pin in the PD chip continuously outputs a low level, thereby greatly reducing the CC pin and GND. The voltage difference between the pins can further alleviate the situation that the CC pin is corroded after the type-c interface is wet or immersed in liquid, so as to optimize the type-c interface.
在一个可能的设计中,所述处理器可以在以下两种情况下,在确定所述type-c连接器未连接外部设备:In a possible design, the processor may determine that the type-c connector is not connected to an external device in the following two cases:
第一种情况:在所述终端设备开机启动时,确定所述type-c连接器未连接外部设备;The first case: when the terminal device is powered on, it is determined that the type-c connector is not connected to an external device;
第二种情况:在接收到所述PD芯片发送的第一消息时,确定所述type-c连接器未连接外部设备;其中,所述第一消息为所述PD芯片在所述第二工作状态下确定所述type-c连接器持续设定时长内未连接外部设备后发送的。The second case: when the first message sent by the PD chip is received, it is determined that the type-c connector is not connected to an external device; wherein the first message is that the PD chip works in the second Sent after it is determined that the type-c connector is not connected to an external device for a set duration.
在一个可能的设计中,所述终端设备中还包含分压电路,所述分压电路提供固定电压,并通过分压器件分别与所述PD芯片的所述CC引脚和所述type-c连接器连接;在该情况下,所述处理器监测所述分压器件的电压变化;当监测到所述分压器件的电压变化超过设置电压阈值时,确定所述type-c连接器连接外部设备。In a possible design, the terminal device further includes a voltage dividing circuit, the voltage dividing circuit provides a fixed voltage, and is separately connected to the CC pin and the type-c of the PD chip through a voltage dividing device. The connector is connected; in this case, the processor monitors a voltage change of the voltage dividing device; when the voltage change of the voltage dividing device is monitored to exceed a set voltage threshold, it is determined that the type-c connector is connected externally device.
在一个可能的设计中,所述处理器可以通过与其分立的其他器件(例如PMU等)实现上述监测功能。具体的,所述处理器可以通过向该器件发送指示消息,通知该器件启动或停止监测所述type-c连接器是否连接外部设备,并通过接收该器件的通知消息,确定所述type-c连接器连接外部设备。可选的,所述处理器与该器件之间可以通过SSI进行通信。In a possible design, the processor may implement the above-mentioned monitoring function through other devices (for example, PMU, etc.) separate from it. Specifically, the processor may send an instruction message to the device to notify the device to start or stop monitoring whether the type-c connector is connected to an external device, and determine the type-c by receiving a notification message from the device. The connector connects external devices. Optionally, the processor and the device can communicate through SSI.
在一个可能的设计中,所述处理器可以通过向所述PD芯片发送第二消息,将所述PD芯片设置为所述第一工作状态;所述处理器可以通过向所述PD芯片发送第三消息,将所述PD芯片从所述第一工作状态调整为所述第二工作状态。In a possible design, the processor may set the PD chip to the first working state by sending a second message to the PD chip; the processor may send a first message to the PD chip by Three messages, adjusting the PD chip from the first working state to the second working state.
通过该设计,所述处理器可以设置所述PD芯片的工作状态。With this design, the processor can set the working state of the PD chip.
在一个可能的设计中,所述处理器在确定所述type-c连接器连接外部设备后,停止监测所述type-c连接器是否连接外部设备。In a possible design, after determining that the type-c connector is connected to an external device, the processor stops monitoring whether the type-c connector is connected to an external device.
通过该设计,可以避免所述PD芯片在toggle模式下所述处理器还继续监测导致电能 的浪费。By this design, it can be avoided that the processor continues to monitor the PD chip in the toggle mode, resulting in a waste of power.
在一个可能的设计中,所述处理器与所述PD芯片之间通过内部集成电路I2C总线进行通信。In a possible design, the processor and the PD chip communicate with each other through an internal integrated circuit I2C bus.
第三方面,本申请实施例还提供了一种接口,所述接口中包含功率输出PD芯片和type-c连接器,所述PD芯片中的通道配置CC引脚连接所述type-c连接器。所述PD芯片具有以下功能:According to a third aspect, an embodiment of the present application further provides an interface, where the interface includes a power output PD chip and a type-c connector, and a channel pin configured in the PD chip is connected to the type-c connector . The PD chip has the following functions:
在接收到终端设备中的处理器发送的第一消息时,将所述PD芯片的工作状态调整为第一工作状态;并在接收到所述处理器发送的第二消息时,将所述PD芯片的工作状态调整为第二工作状态;其中,所述第一消息用于通知所述PD芯片将工作状态调整为所述第一工作状态;所述PD芯片在所述第一工作状态下CC引脚持续输出低电平;所述连接部件与所述PD芯片连接;所述第二消息用于通知所述PD芯片将工作状态调整为所述第二工作状态;所述PD芯片在所述第二工作状态下CC引脚输出高低电平的矩形方波。When receiving the first message sent by the processor in the terminal device, adjusting the working state of the PD chip to the first working state; and when receiving the second message sent by the processor, changing the PD The working state of the chip is adjusted to a second working state; wherein the first message is used to notify the PD chip to adjust the working state to the first working state; the PD chip is CC under the first working state The pin continuously outputs a low level; the connecting component is connected to the PD chip; the second message is used to notify the PD chip to adjust the working state to the second working state; the PD chip is in the In the second working state, the CC pin outputs a rectangular square wave of high and low levels.
通过本方案,接口中的PD芯片可以在收到终端设备中的处理器发送的指示消息时,根据该指示消息调整自身的工作状态。基于该接口,当所述处理器在确定该接口中的type-c连接器未连接外部设备时,可以将PD芯片设置为sink模式,并在确定所述type-c连接器连接外部设备时将PD芯片设置为toggle模式。这样,在不影响所述终端设备正常工作的情况下,在type-c连接器未连接外部设备时,使PD芯片中的CC引脚持续输出低电平,从而大大降低了CC引脚与GND引脚的电压差,进而可以缓解type-c接口受潮或浸液后CC引脚被腐蚀的情况,实现对type-c接口的优化。With this solution, the PD chip in the interface can adjust its working state according to the instruction message when receiving the instruction message sent by the processor in the terminal device. Based on the interface, when the processor determines that the type-c connector in the interface is not connected to an external device, it can set the PD chip to sink mode, and when it determines that the type-c connector is connected to an external device, The PD chip is set to toggle mode. In this way, without affecting the normal operation of the terminal device, when the type-c connector is not connected to an external device, the CC pin in the PD chip continuously outputs a low level, thereby greatly reducing the CC pin and GND. The voltage difference between the pins can further alleviate the situation that the CC pin is corroded after the type-c interface is wet or immersed in liquid, so as to optimize the type-c interface.
在一个可能的设计中,所述PD芯片还用于:In a possible design, the PD chip is further used for:
在所述第二工作状态下,确定所述type-c连接器持续设定时长内未连接外部设备,并向所述处理器发送第三消息,所述第三消息用于通知所述type-c连接未连接外部设备。In the second working state, determine that the type-c connector is not connected to an external device for a set duration, and send a third message to the processor, where the third message is used to notify the type- cThe external device is not connected.
通过该设计,当所述PD芯片在探测到type-c连接未连接外部设备时,可以及时通知所述处理器,从而使所述处理器可以及时将所述PD芯片设置为sink模式。另外,为了避免由于PD芯片出现误判,所述PD芯片会在持续设定时长(例如5秒、10秒)内确定所述type-c连接器未连接外部设备后,再发送该第三消息。With this design, when the PD chip detects that the type-c connection is not connected to an external device, it can notify the processor in time, so that the processor can set the PD chip to sink mode in time. In addition, in order to avoid misjudgment due to the PD chip, the PD chip sends the third message after determining that the type-c connector is not connected to an external device within a set duration (for example, 5 seconds, 10 seconds). .
在一个可能的设计中,所述PD芯片与所述处理器之间通过内部集成电路I2C总线进行通信。In a possible design, the PD chip and the processor communicate with each other through an internal integrated circuit I2C bus.
第四方面,本申请实施例还提供了一种接口配置方法,该方法应用于终端设备中的处理器,其中,所述终端设备包含功率输出PD芯片和type-c连接器,所述PD芯片中的通道配置CC引脚连接所述type-c连接器;所述处理器具有第一方面中处理模块和监测模块的功能,或具有第二方面中处理器的功能。所述方法具体包括以下步骤:In a fourth aspect, an embodiment of the present application further provides an interface configuration method, which is applied to a processor in a terminal device, where the terminal device includes a power output PD chip and a type-c connector, and the PD chip The channel configuration in the CC pin is connected to the type-c connector; the processor has the functions of the processing module and the monitoring module in the first aspect, or the functions of the processor in the second aspect. The method specifically includes the following steps:
所述处理器在确定所述type-c连接器未连接外部设备时,将所述PD芯片设置为第一工作状态,屏蔽所述PD芯片的中断,并启动监测所述type-c连接器是否连接外部设备;其中,所述PD芯片在所述第一工作状态下CC引脚持续输出低电平;When the processor determines that the type-c connector is not connected to an external device, the processor sets the PD chip to a first working state, shields the interrupt of the PD chip, and starts monitoring whether the type-c connector is Connected to an external device; wherein the PD chip continuously outputs a low level under the first working state of the PD chip;
所述处理器在确定所述type-c连接器连接外部设备时,将所述PD芯片从所述第一工作状态调整为第二工作状态,并启动接收所述PD芯片的中断;所述PD芯片在所述第二工作状态下CC引脚输出高低电平的矩形方波。When determining that the type-c connector is connected to an external device, the processor adjusts the PD chip from the first working state to a second working state, and starts receiving an interrupt of the PD chip; the PD The CC pin outputs a rectangular square wave of high and low levels in the second working state of the chip.
第五方面,本申请实施例还提供了一种计算机程序,当所述计算机程序在计算机上运行时,使得所述计算机执行上述第四方面提供的方法。In a fifth aspect, an embodiment of the present application further provides a computer program, and when the computer program is run on a computer, the computer is caused to execute the method provided in the fourth aspect.
第六方面,本申请实施例还提供了一种计算机存储介质,所述计算机存储介质中存储有计算机程序,当所述计算机程序被计算机执行时,使得所述计算机执行上述第四方面提供的方法。According to a sixth aspect, an embodiment of the present application further provides a computer storage medium. The computer storage medium stores a computer program. When the computer program is executed by a computer, the computer is caused to execute the method provided by the fourth aspect. .
第七方面,本申请实施例还提供了一种芯片,所述芯片用于读取存储器中存储的计算机程序,执行上述第四方面提供的方法。In a seventh aspect, an embodiment of the present application further provides a chip, which is used to read a computer program stored in a memory and execute the method provided in the fourth aspect.
第八方面,本申请实施例还提供了一种芯片系统,该芯片系统包括处理器,用于支持计算机装置实现上述第四方面提供的方法。在一种可能的设计中,所述芯片系统还包括存储器,所述存储器用于保存该计算机装置必要的程序和数据。该芯片系统可以由芯片构成,也可以包含芯片和其他分立器件。In an eighth aspect, an embodiment of the present application further provides a chip system including a processor, which is configured to support a computer device to implement the method provided in the fourth aspect. In a possible design, the chip system further includes a memory, and the memory is configured to store programs and data necessary for the computer device. The chip system can be composed of chips, and can also include chips and other discrete devices.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1为本申请实施例提供的一种终端设备的结构图;FIG. 1 is a structural diagram of a terminal device according to an embodiment of the present application; FIG.
图2为本申请实施例提供的一种终端设备的结构示例图;FIG. 2 is a structural example diagram of a terminal device according to an embodiment of the present application; FIG.
图3为本申请实施例提供的type-c连接器未连接外部设备时终端设备的等效电路示例图;FIG. 3 is an example equivalent circuit diagram of a terminal device when a type-c connector provided by an embodiment of the present application is not connected to an external device; FIG.
图4a-图4d为本申请实施例提供的type-c连接器连接外部设备时终端设备的等效电路图;4a-4d are equivalent circuit diagrams of a terminal device when a type-c connector according to an embodiment of the present application is connected to an external device;
图5为本申请实施例提供的另一种终端设备的结构图;5 is a structural diagram of another terminal device according to an embodiment of the present application;
图6为本申请实施例提供的一种接口配置方法流程图;6 is a flowchart of an interface configuration method according to an embodiment of the present application;
图7为本申请实施例提供的一种接口配置实例流程图。FIG. 7 is a flowchart of an example interface configuration according to an embodiment of the present application.
具体实施方式detailed description
本申请提供了一种接口配置方法、终端设备及接口,用以改善终端设备中type-c接口的CC引脚被腐蚀的问题。其中,方法和设备是基于同一发明构思的,由于方法及设备解决问题的原理相似,因此设备与方法的实施可以相互参见,重复之处不再赘述。This application provides an interface configuration method, a terminal device, and an interface to improve the problem that the CC pin of the type-c interface in the terminal device is corroded. Among them, the method and equipment are based on the same inventive concept. Since the principle of the method and the equipment to solve the problem is similar, the implementation of the equipment and the method can be referred to each other, and the duplicates are not described again.
在本申请实施例提供的方案中,终端设备中的处理模块在确定type-c连接器未连接外部设备时,将PD芯片设置为CC引脚持续输出低电平的第一工作状态,并且在当所述处理模块通过监测模块监测type-c连接外部设备时,将PD芯片设置为cc引脚输出高低电平的矩形方波的第二工作状态,以使所述PD芯片识别该外部设备,从而保证type-c接口的正常工作。上述方案可以保证终端设备的type-c接口能够连接并识别外部设备正常工作的基础上,在type-c连接器未连接外部设备时,使CC引脚持续输出低电平,从而大大降低了CC引脚与GND引脚的电压差,进而可以缓解type-c接口受潮或浸液后CC引脚被腐蚀的情况,实现对type-c接口的优化。In the solution provided by the embodiment of the present application, when the processing module in the terminal device determines that the type-c connector is not connected to an external device, the PD chip is set to the first working state where the CC pin continuously outputs a low level, and When the processing module monitors the type-c connection to an external device through a monitoring module, setting the PD chip to a second working state of a rectangular square wave of high and low level output by the cc pin, so that the PD chip recognizes the external device, So as to ensure the normal work of the type-c interface. The above solution can ensure that the type-c interface of the terminal device can be connected and recognize the normal operation of the external device. When the type-c connector is not connected to the external device, the CC pin continuously outputs a low level, thereby greatly reducing the CC. The voltage difference between the pin and the GND pin can further alleviate the situation that the CC pin is corroded after the type-c interface is wet or immersed in liquid, so as to optimize the type-c interface.
以下,对本申请中的部分用语进行解释说明,以便与本领域技术人员理解。In the following, some terms in this application are explained so as to understand with those skilled in the art.
1)、终端设备,又可以称之为电子设备、用户设备(user equipment,UE),内部安装有type-c接口,能够连接其他外部设备,为用户提供特定功能的设备。可选的,终端设备可以为手持式设备、车载设备等。例如,手机(mobile phone)、平板电脑、笔记本电脑、掌上电脑、移动互联网设备(mobile internet device,MID)、可穿戴设备,虚拟现实(virtual reality,VR)设备、增强现实(augmented reality,AR)设备、工业控制(industrial control) 中的无线终端、无人驾驶(self driving)中的无线终端、远程手术(remote medical surgery)中的无线终端、智能电网(smart grid)中的无线终端、运输安全(transportation safety)中的无线终端、智慧城市(smart city)中的无线终端,或智慧家庭(smart home)中的无线终端等。1) Terminal equipment, also known as electronic equipment and user equipment (UE), has a type-c interface installed inside, which can connect other external equipment and provide users with specific functions. Optionally, the terminal device may be a handheld device, a vehicle-mounted device, or the like. For example, mobile phones, tablets, laptops, PDAs, mobile Internet devices (MIDs), wearable devices, virtual reality (VR) devices, augmented reality (AR) Equipment, wireless terminal in industrial control, wireless terminal in self driving, wireless terminal in remote surgery, wireless terminal in smart grid, transportation security wireless terminals in (transportation safety), wireless terminals in smart cities, or wireless terminals in smart homes, etc.
2)、外部设备,能够通过type-c接口连接终端设备的设备。可选的,所述外部设备可以为适配器、耳机、移动硬盘、打印机、通用串行总线(universal serial bus,USB)闪存盘(简称U盘)等设备。2) External device, a device capable of connecting a terminal device through a type-c interface. Optionally, the external device may be an adapter, a headset, a mobile hard disk, a printer, a universal serial bus (Universal Serial Bus, USB) flash disk (U disk for short), and other devices.
3)、type-c接口,能够实现终端设备和外部设备之间的连接,提供数据传输、充电功能的接口。type-c接口中包含有type-c连接器和功率输出(power delivery,PD)芯片,PD芯片中的各个引脚均连接type-c连接器。3) Type-c interface, which can realize the connection between terminal equipment and external equipment, and provide the interface of data transmission and charging function. The type-c interface includes a type-c connector and a power output (PD) chip, and each pin in the PD chip is connected to the type-c connector.
type-c连接器,为置于终端设备底部的接插件,连接其他有源器件后能够传输电流和信号。A type-c connector is a connector placed on the bottom of a terminal device. It can transmit current and signals after connecting other active devices.
PD芯片,包含24个引脚。其中,该24个引脚中包含TX+引脚、TX-引脚、RX+引脚、RX-引脚、VBUS引脚、CC引脚、D+引脚、D-引脚以及GND引脚等。所述PD芯片可以通过上述引脚,完成探测所述type-c连接器是否连接外部设备等功能,进而进行数据传输或充电放电功能。PD chip, including 24 pins. The 24 pins include TX + pin, TX- pin, RX + pin, RX- pin, VBUS pin, CC pin, D + pin, D- pin, and GND pin. The PD chip can perform functions such as detecting whether the type-c connector is connected to an external device through the above-mentioned pins, and then perform data transmission or charging and discharging functions.
传统地,PD芯片会一直处于高低电平(toggle)模式,即PD芯片的CC引脚会输出高低电平的矩形方波。当type-c连接器连接外部设备后,外部设备会引入新的电压、电流,或等效电阻等,这就导致CC引脚上的输出的波形发生变化,PD芯片可以通过监测该波形变化,探测type-c连接器是否连接外部设备。若PD芯片探测到type-c连接器连接外部设备时,会向终端设备中的处理模块发起中断,以通知处理模块进行识别外部设备的类型等一系列后续操作,保证终端设备的正常工作。Traditionally, the PD chip will always be in the high and low level (toggle) mode, that is, the CC pin of the PD chip will output a rectangular square wave of high and low levels. When the type-c connector is connected to an external device, the external device will introduce new voltage, current, or equivalent resistance, etc. This will cause the waveform of the output on the CC pin to change. The PD chip can monitor this waveform change. Detect whether the type-c connector is connected to an external device. If the PD chip detects that the type-c connector is connected to an external device, it will initiate an interrupt to the processing module in the terminal device to notify the processing module to perform a series of subsequent operations such as identifying the type of the external device to ensure the normal operation of the terminal device.
4)、电源管理单元(power management unit,PMU),作为终端设备内各个芯片的电源管理单元,能够为各个芯片提供其需要的电源,保证终端设备各个芯片的正常工作。其中,所述PMU中还集成有模数转换器(analog to digital converter,ADC),能够对type-c接口中的某些引脚的电压和信号进行采样。4) Power management unit (PMU), as the power management unit of each chip in the terminal device, can provide the power required by each chip to ensure the normal operation of each chip of the terminal device. Among them, the PMU also integrates an analog-to-digital converter (ADC), which can sample voltages and signals of certain pins in the type-c interface.
5)、处理模块,用于控制和管理PD芯片。传统的,当所述PD芯片探测到type-c连接器连接外部设备时,会向所述处理模块发起中断,该处理模块在接收到该中断后,会从所述PD芯片内的获取信息,以识别外部设备的类型,从而对所述PD芯片后续的工作进行设置,实现对PD芯片的控制管理。5) a processing module for controlling and managing the PD chip. Traditionally, when the PD chip detects that the type-c connector is connected to an external device, it will initiate an interrupt to the processing module. After receiving the interrupt, the processing module will obtain information from the PD chip. In order to identify the type of the external device, the subsequent work of the PD chip is set, and the PD chip is controlled and managed.
可选的,所述处理模块可以为终端设备中的处理器(即中央处理器(central processing unit,CPU)),或者独立于处理器的其他具有处理功能的器件。Optionally, the processing module may be a processor (ie, a central processing unit (CPU)) in a terminal device, or another device having a processing function independent of the processor.
例如,所述处理模块可以为:现场可编程门阵列(field-programmable gate array,FPGA)、复杂可编程逻辑器件(complex programmable logic device,CPLD)、专用集成电路(application specific intergrated circuits,ASIC),或片上系统(System on a chip,SOC)等一些可编程的芯片。For example, the processing module may be a field-programmable gate array (FPGA), a complex programmable logic device (CPLD), an application-specific integrated circuit (ASIC), Or system-on-chip (System on chip, SOC) and some programmable chips.
另外,需要理解的是,在本申请的描述中,“第一”、“第二”等词汇,仅用于区分描述的目的,而不能理解为指示或暗示相对重要性,也不能理解为指示或暗示顺序。In addition, it should be understood that in the description of this application, the words "first" and "second" are used only for the purpose of distinguishing descriptions, and cannot be understood as indicating or implying relative importance, nor as indicating Or imply order.
下面结合附图对本申请实施例进行说明。The following describes embodiments of the present application with reference to the drawings.
图1示出了本申请实施例提供一种终端设备的结构图。参阅图1所示,在该终端设备中安装有type-c接口,即图中所示的type-c连接器104和PD芯片103。所述PD芯片103中的所有引脚均与所述type-c连接器104中相应的引脚连接,为了简化,图中仅画出了本申请实施例涉及的两个CC引脚(CC1引脚和CC2引脚)。FIG. 1 shows a structural diagram of a terminal device provided by an embodiment of the present application. Referring to FIG. 1, a type-c interface is installed in the terminal device, that is, the type-c connector 104 and the PD chip 103 shown in the figure. All the pins in the PD chip 103 are connected to corresponding pins in the type-c connector 104. For simplicity, only two CC pins (CC1 cited in the embodiment of the present application) are shown in the figure. Pin and CC2 pin).
为了实现对type-c接口的优化,该终端设备还包含处理模块101和监测模块102。下面先对各个模块的功能进行介绍:In order to optimize the type-c interface, the terminal device further includes a processing module 101 and a monitoring module 102. The following first introduces the functions of each module:
处理模块101,用于确定所述type-c连接器104未连接外部设备时,将所述PD芯片103设置为第一工作状态(又可以称为低电平(sink)模式),屏蔽所述PD芯片103的中断,并向监测模块102发送启动监测消息。其中,所述PD芯片103在所述第一工作状态下CC引脚持续输出低电平,所述启动监测消息用于通知所述监测模块102启动监测所述type-c连接器104是否连接外部设备。A processing module 101, configured to determine that the type-c connector 104 is connected to an external device, set the PD chip 103 to a first working state (also referred to as a low-level (sink) mode), and shield the PD chip 103 The PD chip 103 interrupts and sends a monitoring start message to the monitoring module 102. The PD chip 103 continuously outputs a low level in the CC pin in the first working state, and the startup monitoring message is used to notify the monitoring module 102 to start monitoring whether the type-c connector 104 is connected to an external device. device.
所述监测模块102,用于在接收到所述启动监测消息后,启动监测所述type-c连接器104是否连接外部设备,在监测到所述type-c连接器104连接外部设备时,向所述处理模块101发送第一消息。其中,所述第一消息用于通知所述处理模块101所述type-c连接器104连接外部设备,以使所述处理模块101重新设置所述PD芯片103的工作状态,以免影响所述终端设备的正常工作。The monitoring module 102 is configured to, after receiving the startup monitoring message, start monitoring whether the type-c connector 104 is connected to an external device, and when monitoring that the type-c connector 104 is connected to an external device, The processing module 101 sends a first message. The first message is used to notify the processing module 101 that the type-c connector 104 is connected to an external device, so that the processing module 101 resets the working state of the PD chip 103 so as not to affect the terminal. The device is working properly.
所述处理模块101,还用于在接收到所述第一消息后,将所述PD芯片103从所述第一工作状态调整为所述第二工作状态(又可以称为toggle模式),并启动接收所述PD芯片103的中断。其中,所述PD芯片103在所述第二工作状态下CC引脚输出高低电平的矩形方波。The processing module 101 is further configured to adjust the PD chip 103 from the first working state to the second working state (also referred to as a toggle mode) after receiving the first message, and Start receiving the interrupt of the PD chip 103. Wherein, the PD chip 103 outputs a rectangular square wave of high and low levels in the CC pin in the second working state.
通过上述方案,终端设备中的所述处理模块101在确定所述type-c连接器104未连接外部设备时,可以将PD芯片103设置为sink模式,并在确定所述type-c连接器104连接外部设备时将PD芯片103设置为toggle模式。这样,在不影响所述终端设备正常工作的情况下,在type-c连接器103未连接外部设备时,使PD芯片103中的CC引脚持续输出低电平,从而大大降低了CC引脚与GND引脚的电压差,进而可以缓解type-c接口受潮或浸液后CC引脚被腐蚀的情况,实现对type-c接口的优化。Through the above solution, when the processing module 101 in the terminal device determines that the type-c connector 104 is not connected to an external device, it can set the PD chip 103 to sink mode and determine the type-c connector 104 The PD chip 103 is set to the toggle mode when an external device is connected. In this way, without affecting the normal operation of the terminal device, when the type-c connector 103 is not connected to an external device, the CC pin in the PD chip 103 continuously outputs a low level, thereby greatly reducing the CC pin. The voltage difference from the GND pin can further alleviate the situation that the CC pin is corroded after the type-c interface is wet or immersed in liquid, so as to optimize the type-c interface.
在一个实现方式中,所述处理模块101可以通过以下两种情况下,可以确定所述type-c连接器104未连接外部设备:In an implementation manner, the processing module 101 may determine that the type-c connector 104 is not connected to an external device in the following two cases:
第一种情况:在所述终端设备开机启动时,确定所述type-c连接器104未连接外部设备。The first case: when the terminal device is powered on, it is determined that the type-c connector 104 is not connected to an external device.
由于用户在使用终端设备的过程中,很少会在type-c连接器104连接有外部设备的时开机启动,因此,在本申请实施例中,当所述终端设备开机启动时,默认type-c连接器104未连接外部设备。Because the user rarely uses the terminal device to start up when the type-c connector 104 is connected to an external device during the process of using the terminal device, in the embodiment of the present application, when the terminal device is started and started, the default type- The c connector 104 is not connected to an external device.
第二种情况:在接收到所述PD芯片103发送的第二消息时,确定所述type-c连接器104未连接外部设备;其中,所述第二消息为所述PD芯片103在所述第二工作状态下确定所述type-c连接器104持续设定时长内未连接外部设备后发送的。The second case: when receiving the second message sent by the PD chip 103, it is determined that the type-c connector 104 is not connected to an external device; wherein the second message is that the PD chip 103 is in the Sent after determining that the type-c connector 104 is not connected to an external device for a set duration in the second working state.
通过以上对PD芯片103的描述可知,PD芯片103在处于toggle模式时,可以通过CC引脚输出的矩形方波探测所述type-c连接器103是否连接外部设备。因此,当所述PD芯片103在探测到type-c连接103未连接外部设备时,可以及时通知所述处理模块101,从而使所述处理模块101可以及时将所述PD芯片103设置为sink模式。According to the above description of the PD chip 103, when the PD chip 103 is in the toggle mode, it can detect whether the type-c connector 103 is connected to an external device through a rectangular square wave output from the CC pin. Therefore, when the PD chip 103 detects that the type-c connection 103 is not connected to an external device, it can notify the processing module 101 in time, so that the processing module 101 can set the PD chip 103 to sink mode in a timely manner. .
另外,为了避免由于PD芯片103出现误判,所述PD芯片103会在持续设定时长内确定所述type-c连接器104未连接外部设备后,再发送所述第二消息。可选的,所述设定时长可以设置为5秒、10秒等。In addition, in order to avoid misjudgment due to the PD chip 103, the PD chip 103 sends the second message after determining that the type-c connector 104 is not connected to an external device within a continuously set duration. Optionally, the set duration can be set to 5 seconds, 10 seconds, or the like.
在一个实现方式中,所述处理模块101可以通过以下步骤将所述PD芯片103设置为所述第一工作状态:In one implementation, the processing module 101 may set the PD chip 103 to the first working state by the following steps:
向所述PD芯片103发送第三消息,所述第三消息用于通知所述PD芯片103将工作状态调整为所述第一工作状态。Send a third message to the PD chip 103, where the third message is used to notify the PD chip 103 to adjust a working state to the first working state.
类似的,所述处理模块101可以通过以下步骤将所述PD芯片103从所述第一工作状态调整为所述第二工作状态:Similarly, the processing module 101 can adjust the PD chip 103 from the first working state to the second working state by the following steps:
向所述PD芯片103发送第四消息,所述第四消息用于通知所述PD芯片103将工作状态调整为所述第二工作状态。Send a fourth message to the PD chip 103, where the fourth message is used to notify the PD chip 103 to adjust a working state to the second working state.
在一个实现方式中,所述处理模块101还可以在接收到所述第一消息后,向所述监测模块102发送停止监测消息,所述停止监测消息用于通知所述监测模块102停止监测所述type-c连接器104是否连接外部设备;所述监测模块102在接收到所述停止监测消息后,停止监测所述type-c连接器104是否连接外部设备。In an implementation manner, the processing module 101 may further send a stop monitoring message to the monitoring module 102 after receiving the first message, and the stop monitoring message is used to notify the monitoring module 102 to stop monitoring the office. Whether the type-c connector 104 is connected to an external device; the monitoring module 102 stops monitoring whether the type-c connector 104 is connected to an external device after receiving the stop monitoring message.
这样,可以避免所述PD芯片103在toggle模式下所述监测模块102还继续监测导致电能的浪费。In this way, it can be avoided that the monitoring module 102 continues to monitor the PD chip 103 in the toggle mode, resulting in waste of power.
可选的,所述处理模块101和所述PD芯片103之间的可以通过内部集成电路(inter-integrated circuit,I2C)总线进行通信,传输上述第二消息、第三消息和第四消息。Optionally, the processing module 101 and the PD chip 103 may communicate through an inter-integrated circuit (I2C) bus to transmit the second message, the third message, and the fourth message.
可选的,所述处理模块101和所述监测模块102之间可以通过同步串行接口(synchronous serial interface,SSI)进行通信,传输上述启动监测消息、停止监测消息、第一消息等。可选的,所述第一消息为中断。Optionally, the processing module 101 and the monitoring module 102 may communicate through a synchronous serial interface (SSI), and transmit the above-mentioned start monitoring message, stop monitoring message, first message, and the like. Optionally, the first message is an interrupt.
需要说明的是,在本申请实施例中,所述处理模块101可以通过多种方式实现,例如,FPGA、ASIC、SOC等,本申请对此不作限定。It should be noted that, in the embodiment of the present application, the processing module 101 may be implemented in multiple ways, for example, FPGA, ASIC, SOC, etc., which is not limited in this application.
另外,在本申请实施例中,所述监测模块102也可以通过多种方式实现,例如,专用的集成电路、FPGA等。可选的,在一个实现方式中,所述监测模块102中包含分压电路和监测芯片。其中,所述分压电路提供固定电压,并通过分压器件(例如电阻)分别与所述PD芯片103的所述CC引脚和所述type-c连接器104连接。可选的,所述监测模块102与终端设备的连接关系如图2所示。In addition, in the embodiment of the present application, the monitoring module 102 may also be implemented in multiple ways, for example, a dedicated integrated circuit, an FPGA, or the like. Optionally, in one implementation, the monitoring module 102 includes a voltage dividing circuit and a monitoring chip. The voltage dividing circuit provides a fixed voltage, and is connected to the CC pin of the PD chip 103 and the type-c connector 104 through a voltage dividing device (for example, a resistor). Optionally, the connection relationship between the monitoring module 102 and the terminal device is shown in FIG. 2.
所述监测芯片,具体用于:监测所述分压器件的电压变化;当监测到所述分压器件的电压变化超过设定电压阈值时,确定所述type-c连接器104连接外部设备;并向所述处理模块101发送所述第一消息。The monitoring chip is specifically configured to: monitor a voltage change of the voltage dividing device; when the voltage change of the voltage dividing device is monitored to exceed a set voltage threshold, determine that the type-c connector 104 is connected to an external device; And sending the first message to the processing module 101.
所述监测芯片会持续通过ADC1和ADC2采集分压器件1和分压器件2的电压值,并与保存的上一次采集到的电压值进行对比,确定每个分压器件的电压变化。另外,所述监测芯片会保存新采集到的分压器件的电压值,以便于后续继续确定电压变化。The monitoring chip continuously collects the voltage values of the voltage-dividing device 1 and the voltage-dividing device 2 through ADC1 and ADC2, and compares the voltage values with the voltage values collected last time to determine the voltage change of each voltage-dividing device. In addition, the monitoring chip saves the voltage value of the newly collected voltage-dividing device, so that it can continue to determine the voltage change in the future.
可选的,所述监测芯片可以为PMU。Optionally, the monitoring chip may be a PMU.
由于当所述type-c连接器104未连接外部设备时,分压电路是固定的,所述监测芯片通过ADC1和ADC2采集到的两个分压器件的电压值也是固定的。当所述type-c连接器104连接外部设备后,外部设备会引入新的电压、电流或等效电阻等,这就导致分压器件的电压发生变化。因此,所述监测芯片可以通过判断任一个分压器件的电压变化,判断所述 type-c连接器104是否连接外部设备。Because when the type-c connector 104 is not connected to an external device, the voltage dividing circuit is fixed, and the voltage values of the two voltage dividing devices collected by the monitoring chip through ADC1 and ADC2 are also fixed. When the type-c connector 104 is connected to an external device, the external device introduces a new voltage, current, or equivalent resistance, etc., which causes the voltage of the voltage dividing device to change. Therefore, the monitoring chip can determine whether the type-c connector 104 is connected to an external device by determining a voltage change of any voltage dividing device.
在上述实现方式中,所述设定电压阈值的取值可以根据具体的场景、分压电路中分压器件、固定电压等的取值等因素具体设置。In the above implementation manner, the value of the set voltage threshold may be specifically set according to factors such as a specific scenario, a value of a voltage dividing device in a voltage dividing circuit, and a value of a fixed voltage.
例如图3所示,当分压电路中的固定电压为1.8V,每个分压器件为51kΩ,每个CC引脚与分压电路接入该CC引脚和type-c连接器之间的通路的节点之间的等效电阻为120Ω时,所述监测芯片通过ADC1和ADC2可以监测到的两个分压器件的电压值为0.165V,所述设定电压阈值为0.04V。For example, as shown in Figure 3, when the fixed voltage in the voltage divider circuit is 1.8V and each voltage divider is 51kΩ, each CC pin and the voltage divider circuit are connected to the path between the CC pin and the type-c connector. When the equivalent resistance between the nodes is 120Ω, the voltage value of the two voltage-dividing devices that the monitoring chip can monitor through ADC1 and ADC2 is 0.165V, and the set voltage threshold is 0.04V.
下面继续以图3所示终端设备的等效电路为例,通过各种外部设备连接所述type-c连接器对上述接口配置方法进行测试。下面仅以外部设备为普通适配器、PD适配器、OTG线、数字耳机和模拟耳机为例进行说明。The following continues to use the equivalent circuit of the terminal device shown in FIG. 3 as an example to test the above interface configuration method by connecting the type-c connector with various external devices. The following description only uses external devices as common adapters, PD adapters, OTG cables, digital headphones, and analog headphones.
例1,当type-c连接器连接普通适配器时,终端设备的等效电路如图4a所示。Example 1: When a type-c connector is connected to a common adapter, the equivalent circuit of the terminal device is shown in Figure 4a.
由于市面普通适配器型号不同,因此,当不同的普通适配器连接type-c连接器时,等效电路中的VBUS和3个等效电阻的取值不同,ADC1采样到的分压器件1的电压也不同,最终导致type-c连接器连接普通适配器前后分压器件1的电压变化也不同。以上各项的具体取值参见以下表1-表3:Due to the different types of ordinary adapters in the market, when different ordinary adapters are connected to type-c connectors, the values of VBUS and 3 equivalent resistors in the equivalent circuit are different, and the voltage of the voltage dividing device 1 sampled by ADC1 is also Different, the voltage change of the voltage dividing device 1 before and after the type-c connector is connected to the ordinary adapter is also different. The specific values of the above items are shown in the following Tables 1 to 3:
表1Table 1
等效电阻1Equivalent resistance 1 4.71kΩ4.71kΩ
等效电阻2Equivalent resistance 2 4.71kΩ4.71kΩ
等效电阻3Equivalent resistance 3 56kΩ56kΩ
VBUSVBUS 5V5V
ADC1采样到的分压器件1的电压Voltage of the voltage-dividing device 1 sampled by ADC1 0.499V0.499V
分压器件1的电压变化Voltage change of voltage-dividing device 1 0.334V0.334V
表2Table 2
等效电阻1Equivalent resistance 1 5.62kΩ5.62kΩ
等效电阻2Equivalent resistance 2 5.62kΩ5.62kΩ
等效电阻3Equivalent resistance 3 2kΩ2kΩ
VBUSVBUS 5V5V
ADC1采样到的分压器件1的电压Voltage of the voltage-dividing device 1 sampled by ADC1 3.635V3.635V
分压器件1的电压变化Voltage change of voltage-dividing device 1 3.470V3.470V
表3table 3
等效电阻1Equivalent resistance 1 5.62kΩ5.62kΩ
等效电阻2Equivalent resistance 2 5.62kΩ5.62kΩ
等效电阻3Equivalent resistance 3 10kΩ10kΩ
VBUSVBUS 9V9V
ADC1采样到的分压器件1的电压Voltage of the voltage-dividing device 1 sampled by ADC1 3.143V3.143V
分压器件1的电压变化Voltage change of voltage-dividing device 1 2.978V2.978V
例2,当type-c连接器连接PD适配器时,终端设备的等效电路如图4b所示。Example 2: When a type-c connector is connected to a PD adapter, the equivalent circuit of the terminal device is shown in Figure 4b.
由于市面PD适配器型号不同,因此,当不同的PD适配器连接type-c连接器时,电 流源供给的电流和两个等效电阻的取值不同,ADC1采样到的分压器件1的电压也不同,最终导致type-c连接器连接PD适配器前后分压器件1的电压变化也不同。以上各项的具体取值参见以下表4-表6:Due to the different models of PD adapters on the market, when different PD adapters are connected to type-c connectors, the current supplied by the current source and the values of the two equivalent resistors are different, and the voltage of the voltage dividing device 1 sampled by ADC1 is also different. Finally, the voltage change of the voltage dividing device 1 before and after the type-c connector is connected to the PD adapter is also different. For the specific values of the above items, refer to the following Table 4 to Table 6:
表4Table 4
等效电阻1Equivalent resistance 1 4.7kΩ4.7kΩ
等效电阻2Equivalent resistance 2 4.7kΩ4.7kΩ
电流源供给的电流Current from current source 0.08A0.08A
ADC1采样到的分压器件1的电压Voltage of the voltage-dividing device 1 sampled by ADC1 0.376V0.376V
分压器件1的电压变化Voltage change of voltage-dividing device 1 0.211V0.211V
表5table 5
等效电阻1Equivalent resistance 1 5.1kΩ5.1kΩ
等效电阻2Equivalent resistance 2 5.1kΩ5.1kΩ
电流源供给的电流Current from current source 0.18A0.18A
ADC1采样到的分压器件1的电压Voltage of the voltage-dividing device 1 sampled by ADC1 0.918V0.918V
分压器件1的电压变化Voltage change of voltage-dividing device 1 0.753V0.753V
表6Table 6
等效电阻1Equivalent resistance 1 5.6kΩ5.6kΩ
等效电阻2Equivalent resistance 2 5.6kΩ5.6kΩ
电流源供给的电流Current from current source 0.33A0.33A
ADC1采样到的分压器件1的电压Voltage of the voltage-dividing device 1 sampled by ADC1 1.848V1.848V
分压器件1的电压变化Voltage change of voltage-dividing device 1 1.683V1.683V
例3,当type-c连接器连接即插即用(on-the-go,OTG)线或数字耳机时,终端设备的等效电路如图4c所示。Example 3: When a type-c connector is connected to a plug-and-play (OTG) line or a digital headset, the equivalent circuit of the terminal device is shown in FIG. 4c.
等效电路中3个等效电阻的取值、ADC1采样到的分压器件1的电压,以及type-c连接器连接OTG线或数字耳机前后分压器件1的电压变化的具体取值参见以下表7:For the values of the three equivalent resistors in the equivalent circuit, the voltage of the voltage-dividing device 1 sampled by ADC1, and the voltage changes of voltage-dividing device 1 before and after the type-c connector is connected to the OTG line or digital headphones, see the following. Table 7:
表7Table 7
等效电阻1Equivalent resistance 1 2.419kΩ2.419kΩ
等效电阻2Equivalent resistance 2 2.419kΩ2.419kΩ
等效电阻3Equivalent resistance 3 2.419kΩ2.419kΩ
ADC1采样到的分压器件1的电压Voltage of the voltage-dividing device 1 sampled by ADC1 0.082V0.082V
分压器件1的电压变化Voltage change of voltage-dividing device 1 0.083V0.083V
例4,当type-c连接器连接模拟耳机时,终端设备的等效电路如图4d所示。Example 4: When a type-c connector is connected to an analog headset, the equivalent circuit of the terminal device is shown in Figure 4d.
等效电路中4个等效电阻的取值、ADC1采样到的分压器件1的电压,以及type-c连接器连接模拟耳机前后分压器件1的电压变化的具体取值参见以下表7。The specific values of the four equivalent resistors in the equivalent circuit, the voltage of the voltage-dividing device 1 sampled by ADC1, and the voltage change of the voltage-dividing device 1 before and after the type-c connector is connected to the analog headphones are shown in Table 7 below.
需要说明的是,ADC2采样到的分压器件2的电压与ADC1采样到的分压器件1的电压相同,相应的,type-c连接器连接模拟耳机前后分压器件2的电压变化与type-c连接器连接模拟耳机前后分压器件2的电压变化相同,此处不再列举。It should be noted that the voltage of the voltage-dividing device 2 sampled by ADC2 is the same as the voltage of voltage-dividing device 1 sampled by ADC1. Correspondingly, the voltage change and voltage of type-c connector 2 before and after the analog earphone is connected to the type-c connector The voltage change of the voltage dividing device 2 before and after the c connector is connected to the analog earphone is the same, and is not listed here.
表8Table 8
等效电阻1Equivalent resistance 1 0.13kΩ0.13kΩ
等效电阻2Equivalent resistance 2 0.13kΩ0.13kΩ
等效电阻3Equivalent resistance 3 0.15kΩ0.15kΩ
等效电阻4Equivalent resistance 4 0.15kΩ0.15kΩ
ADC1采样到的分压器件1的电压Voltage of the voltage-dividing device 1 sampled by ADC1 0.005V0.005V
分压器件1的电压变化Voltage change of voltage-dividing device 1 0.160V0.160V
通过以上各例中的分压器件1的电压变化可知,无论外部设备具体是哪种类型,type-c连接器连接外部设备前后至少一个分压器件的电压变化均超过设定电压阈值0.04V。因此,实验证明,监测模块可以通过监测分压器件的电压变化与设定电压阈值的大小关系,准确地判定type-c连接器是否连接外部设备。According to the voltage change of the voltage dividing device 1 in the above examples, it can be known that, regardless of the type of the external device, the voltage change of at least one voltage dividing device before and after the type-c connector is connected to the external device exceeds the set voltage threshold of 0.04V. Therefore, experiments prove that the monitoring module can accurately determine whether the type-c connector is connected to an external device by monitoring the relationship between the voltage change of the voltage dividing device and the set voltage threshold.
需要说明的是,本申请以上实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。It should be noted that the division of the modules in the above embodiments of the present application is schematic, and is only a logical function division. In actual implementation, there may be another division manner. In addition, each function in each embodiment of the present application Units can be integrated in one processing unit, or they can exist separately physically, or two or more units can be integrated in one unit. The above integrated unit may be implemented in the form of hardware or in the form of software functional unit.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。When the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially a part that contributes to the existing technology or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium. , Including a number of instructions to cause a computer device (which may be a personal computer, a server, or a network device) or a processor to perform all or part of the steps of the method described in the embodiments of the present application. The aforementioned storage media include: U disks, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks or compact discs, and other media that can store program codes .
基于以上实施例,为了实现对type-c接口的优化,本申请还提供了一种终端设备。参阅图5所示,在该终端设备中安装有type-c接口,即图中所示的功率输出PD芯片503和type-c连接器504。其中,所述PD芯片503中所有引脚均与所述type-c连接器504中相应的引脚连接。为了简化,图5中仅示例性的画出了本申请实施例涉及的两个CC引脚(即图中的CC1引脚和CC2引脚)。所述终端设备还包括:处理器501和存储器502。Based on the above embodiments, in order to optimize the type-c interface, this application also provides a terminal device. Referring to FIG. 5, a type-c interface is installed in the terminal device, that is, a power output PD chip 503 and a type-c connector 504 shown in the figure. All the pins in the PD chip 503 are connected to corresponding pins in the type-c connector 504. For simplicity, only two CC pins (ie, the CC1 pin and the CC2 pin in the figure) involved in the embodiment of the present application are exemplarily shown in FIG. 5. The terminal device further includes a processor 501 and a memory 502.
所述处理器501和所述存储器502以及所述PD芯片503相互连接。可选的,所述处理器501和所述存储器502可以通过总线505相互连接;所述总线505可以是外设部件互连标准(peripheral component interconnect,PCI)总线或扩展工业标准结构(extended industry standard architecture,EISA)总线等。所述总线可以分为地址总线、数据总线、控制总线等。为便于表示,图5中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The processor 501, the memory 502, and the PD chip 503 are connected to each other. Optionally, the processor 501 and the memory 502 may be connected to each other through a bus 505; the bus 505 may be a peripheral component interconnect (PCI) bus or an extended industry standard structure (extended industry standard structure) architecture, EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is used in FIG. 5, but it does not mean that there is only one bus or one type of bus.
可选的,所述终端设备还可以包括收发器,用于与移动通信系统中的网络设备进行无线通信。Optionally, the terminal device may further include a transceiver for performing wireless communication with a network device in a mobile communication system.
所述处理器501,集成有如图1所示的终端设备中的处理模块101的处理功能以及监测模块102中的监测功能,能够执行以下操作:The processor 501 integrates the processing function of the processing module 101 in the terminal device as shown in FIG. 1 and the monitoring function in the monitoring module 102, and can perform the following operations:
在确定所述type-c连接器504未连接外部设备时,将所述PD芯片503设置为第一工 作状态,屏蔽所述PD芯片503的中断,并启动监测所述type-c连接器504是否连接外部设备;其中,所述PD芯片503在所述第一工作状态下CC引脚持续输出低电平;When it is determined that the type-c connector 504 is not connected to an external device, the PD chip 503 is set to a first working state, the interrupt of the PD chip 503 is shielded, and whether the type-c connector 504 is monitored is started. Connected to an external device; wherein the PD pin 503 continuously outputs a low level under the first working state;
在确定所述type-c连接器504连接外部设备时,将所述PD芯片503从所述第一工作状态调整为第二工作状态,并启动接收所述PD芯片503的中断;所述PD芯片503在所述第二工作状态下CC引脚输出高低电平的矩形方波。When it is determined that the type-c connector 504 is connected to an external device, the PD chip 503 is adjusted from the first working state to the second working state, and an interrupt of receiving the PD chip 503 is started; the PD chip 503 In the second working state, the CC pin outputs a rectangular square wave of high and low levels.
在一种实现方式中,所述处理器501,在确定所述type-c连接器504未连接外部设备时,具体用于:In an implementation manner, when the processor 501 determines that the type-c connector 504 is not connected to an external device, it is specifically configured to:
在所述终端设备开机启动时,确定所述type-c连接器504未连接外部设备;或者When the terminal device is powered on, it is determined that the type-c connector 504 is not connected to an external device; or
在接收到所述PD芯片503发送的第一消息时,确定所述type-c连接器504未连接外部设备;其中,所述第一消息为所述PD芯片503在所述第二工作状态下确定所述type-c连接器504持续设定时长内未连接外部设备后发送的。When receiving the first message sent by the PD chip 503, it is determined that the type-c connector 504 is not connected to an external device; wherein the first message is that the PD chip 503 is in the second working state Sent after determining that the type-c connector 504 is not connected to an external device for a set duration.
可选的,所述处理器501可以通过多种方式,监测所述type-c连接器504是否连接外部设备。例如,所述处理器501可以通过自身的硬件或软件实现该监测功能;或者所述处理器501可以借助电路实现该监测功能。Optionally, the processor 501 can monitor whether the type-c connector 504 is connected to an external device in various ways. For example, the processor 501 may implement the monitoring function by its own hardware or software; or the processor 501 may implement the monitoring function by means of a circuit.
在一种实现方式中,所述终端设备中还包含分压电路,所述分压电路提供固定电压,并通过分压器件分别与所述PD芯片503的所述CC引脚和所述type-c连接器504连接;In an implementation manner, the terminal device further includes a voltage dividing circuit that provides a fixed voltage, and is separately connected to the CC pin and the type- of the PD chip 503 through a voltage dividing device. c connector 504 is connected;
所述处理器501,在监测所述type-c连接器504是否连接外部设备时,具体用于:When the processor 501 monitors whether the type-c connector 504 is connected to an external device, it is specifically configured to:
监测所述分压器件的电压变化;Monitoring a voltage change of the voltage dividing device;
当监测到所述分压器件的电压变化超过设置电压阈值时,确定所述type-c连接器504连接外部设备。When it is detected that the voltage change of the voltage dividing device exceeds a set voltage threshold, it is determined that the type-c connector 504 is connected to an external device.
在一种实现方式中,所述处理器501可以通过所述终端设备的电压采样器件(例如PMU中的ADC)等对所述分压器件中的电压进行采集,然后通过根据前后设定次数采集的电压值,确定所述分压器件的电压变化。In an implementation manner, the processor 501 may collect the voltage in the voltage dividing device through a voltage sampling device (such as an ADC in a PMU) of the terminal device, and then collect the The voltage value determines the voltage change of the voltage dividing device.
在一个实现方式中,所述处理器501,在将所述PD芯片503设置为所述第一工作状态时,具体用于:In an implementation manner, when the processor 501 sets the PD chip 503 to the first working state, the processor 501 is specifically configured to:
向所述PD芯片503发送第二消息,所述第二消息用于通知所述PD芯片503将工作状态调整为所述第一工作状态;Sending a second message to the PD chip 503, where the second message is used to notify the PD chip 503 to adjust a working state to the first working state;
所述处理器501,在将所述PD芯片503从所述第一工作状态调整为所述第二工作状态时,具体用于:When the processor 501 adjusts the PD chip 503 from the first working state to the second working state, the processor 501 is specifically configured to:
向所述PD芯片503发送第三消息,所述第三消息用于通知所述PD芯片503将工作状态调整为所述第二工作状态。Send a third message to the PD chip 503, where the third message is used to notify the PD chip 503 to adjust a working state to the second working state.
在一个实现方式中,所述处理器501还用于:In an implementation manner, the processor 501 is further configured to:
在确定所述type-c连接器504连接外部设备后,停止监测所述type-c连接器504是否连接外部设备。After determining that the type-c connector 504 is connected to an external device, monitoring of whether the type-c connector 504 is connected to an external device is stopped.
在一个实现方式中,所述处理器501可以通过与其分立的其他器件(例如PMU等)实现上述监测功能。具体的,所述处理器501可以通过向该器件发送指示消息,通知该器件启动或停止监测所述type-c连接器504是否连接外部设备,并通过接收该器件的通知消息,确定所述type-c连接器504连接外部设备。可选的,所述处理器501与该器件之间可以通过SSI进行通信。In an implementation manner, the processor 501 may implement the above-mentioned monitoring function through other devices (for example, PMU, etc.) separate from the processor. Specifically, the processor 501 may send an instruction message to the device to notify the device to start or stop monitoring whether the type-c connector 504 is connected to an external device, and determine the type by receiving a notification message from the device. -c connector 504 connects an external device. Optionally, the processor 501 and the device may communicate through SSI.
在一个实现方式中,所述处理器501与所述PD芯片503之间通过I2C总线进行通信, 以传输上述第一消息、第二消息,以及第三消息。In an implementation manner, the processor 501 and the PD chip 503 communicate with each other through an I2C bus to transmit the first message, the second message, and the third message.
所述存储器502,用于存放程序等。具体地,程序可以包括程序代码,该程序代码包括计算机操作的指令。存储器502可能包含随机存取存储器(random access memory,RAM),也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。处理器501读取并执行存储器502所存放的程序,实现上述功能,从而实现对type-c接口的优化。The memory 502 is configured to store programs and the like. Specifically, the program may include program code, and the program code includes a computer operation instruction. The memory 502 may include random access memory (RAM), and may also include non-volatile memory (non-volatile memory), such as at least one disk memory. The processor 501 reads and executes the program stored in the memory 502 to implement the functions described above, and thus optimizes the type-c interface.
本申请实施例提供了一种终端设备,该终端设备中的处理器在确定type-c连接器未连接外部设备时,可以将PD芯片设置为sink模式,并在确定所述type-c连接器连接外部设备时将PD芯片设置为toggle模式。这样,在不影响所述终端设备正常工作的情况下,在type-c连接器未连接外部设备时,使PD芯片中的CC引脚持续输出低电平,从而大大降低了CC引脚与GND引脚的电压差,进而可以缓解type-c接口受潮或浸液后CC引脚被腐蚀的情况,实现对type-c接口的优化。An embodiment of the present application provides a terminal device. When the processor in the terminal device determines that the type-c connector is not connected to an external device, the PD chip can be set to a sink mode, and the type-c connector is determined. Set the PD chip to toggle mode when connecting external devices. In this way, without affecting the normal operation of the terminal device, when the type-c connector is not connected to an external device, the CC pin in the PD chip continuously outputs a low level, thereby greatly reducing the CC pin and GND. The voltage difference between the pins can further alleviate the situation that the CC pin is corroded after the type-c interface is wet or immersed in liquid, so as to optimize the type-c interface.
基于以上实施例,本申请还提供了一种接口,该接口可以安装于如图1-3,以及图5所示的终端设备中。所述接口中包含功率输出PD芯片和type-c连接器,所述PD芯片中的通道配置CC引脚连接所述type-c连接器。Based on the above embodiments, this application further provides an interface, which can be installed in the terminal device shown in FIGS. 1-3 and FIG. 5. The interface includes a power output PD chip and a type-c connector, and a channel configuration CC pin in the PD chip is connected to the type-c connector.
其中,所述PD芯片不仅能够通过其包含的引脚实现传统的功能,还可以执行以下操作:Among them, the PD chip can not only implement traditional functions through the pins it contains, but also perform the following operations:
在接收到终端设备中的处理器发送的第一消息时,将所述PD芯片的工作状态调整为第一工作状态;其中,所述第一消息用于通知所述PD芯片将工作状态调整为所述第一工作状态;所述PD芯片在所述第一工作状态下CC引脚持续输出低电平;所述连接部件与所述PD芯片连接;When receiving the first message sent by the processor in the terminal device, adjusting the working state of the PD chip to the first working state; wherein the first message is used to notify the PD chip to adjust the working state to The first working state; the PD chip continuously outputs a low level under the first working state; the connecting component is connected to the PD chip;
在接收到所述处理器发送的第二消息时,将所述PD芯片的工作状态调整为第二工作状态;其中,所述第二消息用于通知所述PD芯片将工作状态调整为所述第二工作状态;所述PD芯片在所述第二工作状态下CC引脚输出高低电平的矩形方波。Upon receiving a second message sent by the processor, adjusting the working state of the PD chip to a second working state; wherein the second message is used to notify the PD chip to adjust the working state to the A second working state; in the second working state, the CC pin outputs a rectangular square wave of high and low levels.
在一个实现方式中,所述PD芯片还用于:In an implementation manner, the PD chip is further configured to:
在所述第二工作状态下,确定所述type-c连接器持续设定时长内未连接外部设备,并向所述处理器发送第三消息,所述第三消息用于通知所述type-c连接未连接外部设备。In the second working state, determine that the type-c connector is not connected to an external device for a set duration, and send a third message to the processor, where the third message is used to notify the type- cThe external device is not connected.
在一个实现方式中,所述PD芯片与所述处理器之间通过内部集成电路I2C总线进行通信。In an implementation manner, the PD chip and the processor communicate with each other through an internal integrated circuit I2C bus.
本申请实施例提供了一种接口,该接口中的PD芯片可以在收到终端设备中的处理器发送的指示消息时,根据该指示消息调整自身的工作状态。基于该接口,当所述处理器在确定该接口中的type-c连接器未连接外部设备时,可以将PD芯片设置为sink模式,并在确定所述type-c连接器连接外部设备时将PD芯片设置为toggle模式。这样,在不影响所述终端设备正常工作的情况下,在type-c连接器未连接外部设备时,使PD芯片中的CC引脚持续输出低电平,从而大大降低了CC引脚与GND引脚的电压差,进而可以缓解type-c接口受潮或浸液后CC引脚被腐蚀的情况,实现对type-c接口的优化。An embodiment of the present application provides an interface, and when a PD chip in the interface receives an instruction message sent by a processor in a terminal device, it can adjust its working state according to the instruction message. Based on the interface, when the processor determines that the type-c connector in the interface is not connected to an external device, it can set the PD chip to sink mode, and when it determines that the type-c connector is connected to an external device, The PD chip is set to toggle mode. In this way, without affecting the normal operation of the terminal device, when the type-c connector is not connected to an external device, the CC pin in the PD chip continuously outputs a low level, thereby greatly reducing the CC pin and GND. The voltage difference between the pins can further alleviate the situation that the CC pin is corroded after the type-c interface is wet or immersed in liquid, so as to optimize the type-c interface.
基于以上实施例,本申请还提供了一种接口配置方法,该方法应用如图5所示的终端设备中的处理器,其中,所述终端设备包含功率输出PD芯片和type-c连接器,所述PD芯片中的通道配置CC引脚连接所述type-c连接器。参阅图6所示,该方法包括以下流程:Based on the above embodiments, this application also provides an interface configuration method. The method is applied to a processor in a terminal device as shown in FIG. 5, where the terminal device includes a power output PD chip and a type-c connector. A channel configuration CC pin in the PD chip is connected to the type-c connector. Referring to FIG. 6, the method includes the following processes:
S601:所述处理器在确定所述type-c连接器未连接外部设备时,将所述PD芯片设置为第一工作状态(即sink模式),屏蔽所述PD芯片的中断,并启动监测所述type-c连接器是否连接外部设备。S601: When the processor determines that the type-c connector is not connected to an external device, the processor sets the PD chip to a first working state (that is, sink mode), shields the interrupt of the PD chip, and starts a monitoring station. Describes whether the type-c connector is connected to an external device.
其中,所述PD芯片在所述第一工作状态下CC引脚持续输出低电平。Wherein, the CC pin continuously outputs a low level in the PD chip in the first working state.
在一个实现方式中,所述处理器可以但不限于通过以下两种方式,确定所述type-c连接器未连接外部设备:In one implementation, the processor may, but is not limited to, determine that the type-c connector is not connected to an external device in the following two ways:
第一种方式:所述处理器在所述终端设备开机启动时,确定所述type-c连接器未连接外部设备。First method: When the terminal device is powered on, the processor determines that the type-c connector is not connected to an external device.
第二种方式:所述处理器在接收到所述PD芯片发送的第一消息时,确定所述type-c连接器未连接外部设备;其中,所述第一消息为所述PD芯片在第二工作状态(即toggle模式)下确定所述type-c连接器持续设定时长内未连接外部设备后发送的。Second method: When the processor receives the first message sent by the PD chip, it determines that the type-c connector is not connected to an external device; wherein the first message is that the PD chip is in the first Sent after determining that the type-c connector has not been connected to an external device for a set period of time in the second working state (ie, the toggle mode).
在上述第二种方式中,所述PD芯片可以通过I2C总线向所述处理器发送所述第一消息。In the above second manner, the PD chip may send the first message to the processor through an I2C bus.
在另一个实现方式中,所述处理器可以通过以下步骤,将所述PD芯片设置为所述第一工作状态:In another implementation manner, the processor may set the PD chip to the first working state through the following steps:
所述处理器向所述PD芯片发送第二消息,所述第二消息用于通知所述PD芯片将工作状态调整为所述第一工作状态。The processor sends a second message to the PD chip, and the second message is used to notify the PD chip to adjust a working state to the first working state.
可选的,所述处理器可以通过I2C总线向所述PD芯片发送所述第二消息。Optionally, the processor may send the second message to the PD chip through an I2C bus.
S602:所述处理器在确定所述type-c连接器连接外部设备时,将所述PD芯片从所述第一工作状态调整为第二工作状态,并启动接收所述PD芯片的中断。S602: When the processor determines that the type-c connector is connected to an external device, the processor adjusts the PD chip from the first working state to a second working state, and starts receiving an interrupt of the PD chip.
其中,所述PD芯片在所述第二工作状态下CC引脚输出高低电平的矩形方波。Wherein, the PD chip outputs a rectangular square wave of high and low levels at the CC pin in the second working state.
在一个实现方式中,与所述处理器将所述PD芯片设置为所述第一工作状态类似,所述处理器可以通过以下步骤,将所述PD芯片从所述第一工作状态调整为所述第二工作状态:In one implementation, similar to the processor setting the PD chip to the first working state, the processor may adjust the PD chip from the first working state to the first working state by the following steps. Describe the second working state:
所述处理器向所述PD芯片发送第三消息,所述第三消息用于通知所述PD芯片将工作状态调整为所述第二工作状态。The processor sends a third message to the PD chip, and the third message is used to notify the PD chip to adjust a working state to the second working state.
可选的,所述处理器可以通过I2C总线向所述PD芯片发送所述第三消息。Optionally, the processor may send the third message to the PD chip through an I2C bus.
可选的,在本申请实施例中,所述处理器可以通过多种方式实现上述监测功能。Optionally, in the embodiments of the present application, the processor may implement the monitoring function in multiple ways.
例如,当所述终端设备中还包括如图2所示的分压电路,所述处理器具有图2中监测芯片和处理模块的功能时,所述处理器可以监测所述分压器件的电压变化;当监测到所述分压器件的电压变化超过设置电压阈值时,所述处理器确定所述type-c连接器连接外部设备。For example, when the terminal device further includes a voltage dividing circuit as shown in FIG. 2, and the processor has the functions of a monitoring chip and a processing module in FIG. 2, the processor may monitor the voltage of the voltage dividing device. When the voltage change of the voltage dividing device exceeds a set voltage threshold, the processor determines that the type-c connector is connected to an external device.
另外,为了避免所述PD芯片在toggle模式下所述处理器还继续监测导致电能的浪费在本申请实施例中,在所述处理器确定所述type-c连接器连接外部设备后,所述方法还包括:In addition, in order to prevent the PD chip from continuing to monitor the waste of power caused by the processor in the toggle mode, in the embodiment of the present application, after the processor determines that the type-c connector is connected to an external device, the The method also includes:
所述处理器停止监测所述type-c连接器是否连接外部设备。The processor stops monitoring whether the type-c connector is connected to an external device.
在一个实现方式中,所述处理器中可以内部集成有具有监测功能的其他器件(例如PMU等)或模块实现上述监测功能,或者通过与该处理器分立的具有监测功能的其他器件或模块实现该监测功能。具体的,所述处理器可以通过向该器件发送指示消息,通知该器件启动或停止监测所述type-c连接器是否连接外部设备,并通过接收该器件的通知消息, 确定所述type-c连接器连接外部设备。In an implementation manner, the processor may internally integrate other devices (for example, PMU, etc.) or modules with a monitoring function to implement the above monitoring function, or use other devices or modules with a monitoring function that are separate from the processor. The monitoring function. Specifically, the processor may notify the device to start or stop monitoring whether the type-c connector is connected to an external device by sending an instruction message to the device, and determine the type-c by receiving a notification message from the device. The connector connects external devices.
可选的,所述处理器与该器件之间可以通过SSI进行通信。Optionally, the processor and the device can communicate through SSI.
本申请实施例提供了一种接口配置方法,在该方法中,终端设备中的处理器在确定type-c连接器未连接外部设备时,将PD芯片设置为CC引脚持续输出低电平的第一工作状态,并且在当所述处理器确定所述type-c连接外部设备时,将PD芯片设置为cc引脚输出高低电平的矩形方波的第二工作状态,以使所述PD芯片识别该外部设备,从而保证type-c接口的正常工作。上述方案可以保证终端设备的type-c接口能够连接并识别外部设备正常工作的基础上,在type-c连接器未连接外部设备时,使CC引脚持续输出低电平,从而大大降低了CC引脚与GND引脚的电压差,进而可以缓解type-c接口受潮或浸液后CC引脚被腐蚀的情况,实现对type-c接口的优化。An embodiment of the present application provides an interface configuration method. In this method, when the processor in the terminal device determines that the type-c connector is not connected to an external device, the PD chip is set to a CC pin that continuously outputs a low level. A first working state, and when the processor determines that the type-c is connected to an external device, the PD chip is set to a second working state of a rectangular square wave in which a cc pin outputs high and low levels, so that the PD The chip recognizes the external device to ensure the normal operation of the type-c interface. The above solution can ensure that the type-c interface of the terminal device can be connected and recognize the normal operation of the external device. When the type-c connector is not connected to the external device, the CC pin continuously outputs a low level, thereby greatly reducing the CC. The voltage difference between the pin and the GND pin can further alleviate the situation that the CC pin is corroded after the type-c interface is wet or immersed in liquid, so as to optimize the type-c interface.
由于用户使用终端设备的情况多元化,仅仅基于以上接口配置方法可能会对type-c连接器是否连接外部设备造成误判,为了降低误判的情况,本申请实施例还提供了一接口配置实例。在该实例中,终端设备可以通过设定的容错机制,降低对type-c连接器的连接情况的误判。在该实例中,以处理模块为SOC,监测模块中包括PMU和分压电路为例进行说明,其中,所述分压电路为如图2所示的分压电路。参阅图7所示,在该接口配置实例的流程包括以下步骤:Due to the diversified use of terminal equipment by users, the above interface configuration method may cause misjudgment whether the type-c connector is connected to an external device. In order to reduce the situation of misjudgment, an example of an interface configuration is provided in the embodiment of this application. . In this example, the terminal device can reduce the misjudgment of the connection status of the type-c connector through a set fault tolerance mechanism. In this example, the processing module is an SOC, and the monitoring module includes a PMU and a voltage dividing circuit as an example. The voltage dividing circuit is a voltage dividing circuit as shown in FIG. 2. Referring to FIG. 7, the process of configuring an interface on this interface includes the following steps:
S701:终端设备开机启动后,SOC启动接收充电管理芯片的中断。S701: After the terminal device is powered on, the SOC starts receiving interrupts from the charge management chip.
其中,充电管理芯片用于管理终端设备的充电,当所述终端设备的type-c接口中的type-c连接器连接电源设备(例如,适配器)后该充电管理芯片会向SOC发送中断,以通知SOC启动充电工作保证终端设备的正常充电。The charging management chip is used to manage the charging of the terminal device. When the type-c connector in the type-c interface of the terminal device is connected to a power supply device (for example, an adapter), the charging management chip sends an interrupt to the SOC to Notify the SOC to start the charging work to ensure the normal charging of the terminal device.
可选的,所述充电管理芯片的中断可以为Vbus_dec_in中断,当PMU不仅具有电源管理功能还具有充电管理功能时,所述充电管理芯片可以为PMU。Optionally, the interrupt of the charge management chip may be a Vbus_dec_in interrupt. When the PMU has not only a power management function but also a charge management function, the charge management chip may be a PMU.
S702:SOC将终端设备的type-c接口中的PD芯片设置为sink模式,屏蔽所述PD芯片的中断,并向PMU发送启动监测消息,以通知所述PMU通过两个ADC分别监测分压电路中的两个分压器件的电压变化,从而监测type-c连接器是否连接外部设备。S702: The SOC sets the PD chip in the type-c interface of the terminal device to sink mode, shields the interruption of the PD chip, and sends a start monitoring message to the PMU to notify the PMU to separately monitor the voltage dividing circuit through two ADCs. The voltage changes of the two voltage-dividing devices in the device monitor whether the type-c connector is connected to an external device.
其中,PMU确定至少一个分压器件的电压变化超过设定电压阈值时,表示type-c连接器连接外部设备。When the PMU determines that the voltage change of the at least one voltage dividing device exceeds a set voltage threshold, it indicates that the type-c connector is connected to an external device.
可选的,PMU可以采用以下方法,通过任一个ADC监测一个分压器件的电压变化:Optionally, the PMU can use the following methods to monitor the voltage change of a voltage-dividing device through any ADC:
ADC按照设定的采样周期对该分压器件的电压进行采样,并将采集的电压值存储到PMU中;The ADC samples the voltage of the voltage dividing device according to the set sampling period, and stores the collected voltage value in the PMU;
PMU会将ADC最新采样的电压值和上一次采样的电压值进行对比,以确定该分压器件的电压变化。可选的,所述PMU可以存储该ADC采样的该分压器件的所有电压值,或者,所述PMU可以保存ADC采样的该分压器件的设定个数的电压值,或者所述PMU可以保存距离当前时刻最近的设定时长(例如5s,6s)内采集该分压器件的电压值,本申请对此不作限定。The PMU compares the newly sampled voltage value of the ADC with the voltage value of the last sample to determine the voltage change of the voltage-dividing device. Optionally, the PMU may store all voltage values of the voltage dividing device sampled by the ADC, or the PMU may save a set number of voltage values of the voltage dividing device sampled by the ADC, or the PMU may The voltage value of the voltage-dividing device is collected within a set duration (for example, 5s, 6s) that is closest to the current moment, which is not limited in this application.
S703:SOC会持续判断是否接收到充电管理芯片的中断,若是,则执行S707,否则执行S704。S703: The SOC continues to determine whether an interruption to the charge management chip is received, and if so, executes S707, otherwise executes S704.
若SOC接收到充电管理芯片的中断,表示type-c连接器可能连接电源设备,则需要SOC通过PD芯片识别设备的类型,以保证终端设备的正常工作。若SOC未接收到充电管 理芯片的中断,则不需要SOC改变PD芯片的模式而是继续通过PMU监测分压器件的电压变化,直至SOC收到PMU在确定type-c连接器连接外部设备时发送的第一消息。If the SOC receives the interruption of the charge management chip, which indicates that the type-c connector may be connected to a power supply device, the SOC needs to identify the type of the device through the PD chip to ensure the normal operation of the terminal device. If the SOC does not receive the interrupt from the charge management chip, the SOC does not need to change the mode of the PD chip. Instead, the PMU continues to monitor the voltage change of the voltage-dividing device until the SOC receives the PMU and sends it when it determines that the type-c connector is connected to an external device. First news.
S704:SOC判断是否接收到PMU的第一消息,若是,则执行S707,否则执行S705。S704: The SOC determines whether the first message of the PMU is received, and if yes, executes S707, otherwise executes S705.
若SOC接收到第一消息,表示type-c连接器可能连接电源设备,则需要SOC通过PD芯片识别设备的类型,以保证终端设备的正常工作。若SOC未接收到第一消息,则不需要SOC改变PD芯片的模式而是继续通过PMU监测分压器件的电压变化。If the SOC receives the first message, indicating that the type-c connector may be connected to a power supply device, the SOC needs to identify the type of the device through the PD chip to ensure the normal operation of the terminal device. If the SOC does not receive the first message, the SOC does not need to change the mode of the PD chip, but continues to monitor the voltage change of the voltage dividing device through the PMU.
S705:SOC确定终端设备的屏幕从黑屏变为亮屏(即终端设备的屏幕被唤醒)。S705: The SOC determines that the screen of the terminal device changes from a black screen to a bright screen (that is, the screen of the terminal device is woken up).
由于终端设备的屏幕可以通过多种方式被唤醒,例如,终端设备接收到短信和各种应用的通知、终端设备接收到来电、终端设备的用户通过触屏或功能键唤醒屏幕等。Because the screen of the terminal device can be awakened in various ways, for example, the terminal device receives notifications of text messages and various applications, the terminal device receives incoming calls, and the user of the terminal device wakes up the screen by touching the screen or function keys.
在实际应用中,当终端设备的type-c连接器连接外部设备时,有可能由于PMU误判或者分压器件的电话变化未超过设定电压阈值等各种原因导致SOC未接收PMU的第一消息和/或充电管理芯片的中断,在该情况下,终端设备一般无任何操作反应,终端设备的用户就会唤醒屏幕,以确定终端设备的工作情况。In practical applications, when the type-c connector of the terminal device is connected to an external device, there may be various reasons such as misidentification of the PMU or the phone change of the voltage-dividing device not exceeding the set voltage threshold. The message and / or the interruption of the charging management chip. In this case, the terminal device generally has no operation response, and the user of the terminal device wakes up the screen to determine the working condition of the terminal device.
基于上述操作流程可以确定,当终端设备的屏幕被唤醒,且该屏幕变化是由用户触发时,存在较大可能是type-c连接器连接外部设备,因此需要SOC执行S707。当该平面变化不是由用户触发时,存在较大可能是type-c连接器未连接外部设备,因此,需要SOC继续执行S703。Based on the above operation process, it can be determined that when the screen of the terminal device is awakened and the screen change is triggered by the user, there is a high possibility that the type-c connector is connected to the external device, so the SOC needs to execute S707. When the plane change is not triggered by the user, there is a large possibility that the type-c connector is not connected to an external device, and therefore, the SOC is required to continue to execute S703.
S706:SOC判断该屏幕变化是否有用户触发,若是则执行S707,否则执行S703。S706: The SOC judges whether the screen change is triggered by the user, if yes, executes S707, otherwise executes S703.
S707:SOC向PMU发送停止监测消息,以通知所述PMU停止通过两个ADC分别监测分压电路中的两个分压器件的电压变化;将PD芯片从sink模式调整为toggle模式,并启动接收PD芯片的中断。S707: The SOC sends a stop monitoring message to the PMU to notify the PMU to stop monitoring the voltage change of the two voltage-dividing devices in the voltage-dividing circuit through two ADCs; adjusting the PD chip from sink mode to toggle mode and starting reception PD chip interrupt.
其中,PD芯片的中断是PD芯片探测到type-c连接器连接外部设备时发送的。Among them, the PD chip interrupt is sent when the PD chip detects that the type-c connector is connected to an external device.
S708:SOC判断是否接收到PD芯片的中断,若是,则执行S709,否则,表示type-c连接器很可能未连接外部设备,需要SOC执行S702继续将PD芯片设置为sink模式。S708: The SOC determines whether an interrupt of the PD chip is received, and if so, executes S709; otherwise, it indicates that the type-c connector is likely not connected to an external device, and the SOC is required to execute S702 to continue setting the PD chip to sink mode.
在终端设备的实际应用中,当type-c连接器连接外部设备时,一般终端设备的屏幕持续亮屏一段时间。由于SOC通过S703、S704、S706,可以确定type-c连接器连接外部设备的概率较高,那么为了避免由于PD芯片故障等原因造成误判,在SOC未接收到PD芯片的中断的情况下,SOC还可以通过屏幕的显示状态,判断是否需要延缓执行S702:当SOC确定当前终端设备的屏幕为亮屏,那么SOC经过第一设定时长(例如5s,或10s等)后执行S702;当SOC确定当前终端设备的屏幕为黑屏,那么SOC即刻或经过第二设定时长执行S702。其中所述第二设定时长小于所述第一设定时长。In the actual application of the terminal device, when the type-c connector is connected to an external device, the screen of the general terminal device remains bright for a period of time. Since the SOC can determine that the type-c connector has a higher probability of connecting to external devices through S703, S704, and S706, in order to avoid misjudgment due to PD chip failure and other reasons, when the SOC does not receive the PD chip interrupt, The SOC can also determine whether the execution of S702 needs to be postponed based on the display status of the screen: When the SOC determines that the screen of the current terminal device is bright, the SOC executes S702 after the first set time period (for example, 5s, or 10s, etc.); If it is determined that the screen of the current terminal device is a black screen, the SOC executes S702 immediately or after a second set duration. The second set duration is shorter than the first set duration.
S709:SOC从PD芯片获取外部设备的信息,以识别外部设备的类型,从而执行终端设备的正常工作。S709: The SOC obtains the information of the external device from the PD chip to identify the type of the external device, thereby performing the normal work of the terminal device.
S710:当SOC接收到PD芯片发送的第二消息时,返回执行S702。其中,所述第二消息是PD芯片在toggle模式下确定type-c连接器持续第三设定时长(例如10s)内未连接外部设备后发送的,因此,为了实现接口优化,需要SOC继续将PD芯片设置为sink模式。S710: When the SOC receives the second message sent by the PD chip, it returns to execute S702. The second message is sent after the PD chip determines that the type-c connector is not connected to an external device for a third set duration (for example, 10s) in the toggle mode. Therefore, in order to optimize the interface, the SOC needs to continue to The PD chip is set to sink mode.
通过上述实例,终端设备中的SOC在type-c连接器未连接外部设备时,可以将PD芯片设置为sink模式,并在确定type-c连接器连接外部设备时将PD芯片设置为toggle模式。这样,在不影响所述终端设备正常工作的情况下,在type-c连接器未连接外部设备时,使PD芯片中的CC引脚持续输出低电平,从而大大降低了CC引脚与GND引脚的电压差, 进而可以缓解type-c接口受潮或浸液后CC引脚被腐蚀的情况。另外,为了避免由于PMU和/或PD芯片由于各种原因准确判定type-c连接器连接外部设备,在本实例中,还通过S706中SOC判断屏幕被唤醒时是否由用户触发、S708中SOC是否接收到PD芯片的终端,以及S708之后SOC延缓执行S702等容错机制,降低对type-c连接器的连接情况的误判。Through the above example, the SOC in the terminal device can set the PD chip to sink mode when the type-c connector is not connected to an external device, and set the PD chip to toggle mode when it is determined that the type-c connector is connected to an external device. In this way, without affecting the normal operation of the terminal device, when the type-c connector is not connected to an external device, the CC pin in the PD chip continuously outputs a low level, thereby greatly reducing the CC pin and GND. The voltage difference between the pins can further alleviate the situation that the CC pin is corroded after the type-c interface is wet or immersed in liquid. In addition, in order to prevent the PMU and / or PD chip from accurately determining that the type-c connector is connected to an external device for various reasons, in this example, the SOC in S706 is also used to determine whether the screen is triggered by the user when the screen is woken up, and whether the SOC in S708 The terminal that received the PD chip and the SOC post-S708 postponed the execution of fault tolerance mechanisms such as S702 to reduce the misjudgment of the connection status of the type-c connector.
基于以上实施例,本申请实施例还提供了一种计算机程序,当所述计算机程序在计算机上运行时,使得所述计算机执行图6或图7所示的实施例提供的接口配置方法。Based on the above embodiments, an embodiment of the present application further provides a computer program, which, when the computer program runs on a computer, causes the computer to execute the interface configuration method provided by the embodiment shown in FIG. 6 or FIG. 7.
基于以上实施例,本申请实施例还提供了一种计算机存储介质,该计算机存储介质中存储有计算机程序,所述计算机程序被计算机执行时,使得计算机执行图6或图7所示的实施例提供的接口配置方法。Based on the above embodiments, an embodiment of the present application further provides a computer storage medium. The computer storage medium stores a computer program, and when the computer program is executed by the computer, the computer executes the embodiment shown in FIG. 6 or FIG. 7. Provided interface configuration methods.
基于以上实施例,本申请实施例还提供了一种芯片,所述芯片用于读取存储器中存储的计算机程序,实现图6或图7所示的实施例提供的接口配置方法。Based on the above embodiments, an embodiment of the present application further provides a chip for reading a computer program stored in a memory to implement the interface configuration method provided by the embodiment shown in FIG. 6 or FIG. 7.
基于以上实施例,本申请实施例提供了一种芯片系统,该芯片系统包括处理器,用于支持计算机装置实现图6中处理器或图7中SOC所涉及的功能。在一种可能的设计中,所述芯片系统还包括存储器,所述存储器用于保存该计算机装置必要的程序和数据。该芯片系统,可以由芯片构成,也可以包含芯片和其他分立器件。Based on the above embodiments, an embodiment of the present application provides a chip system including a processor, which is configured to support a computer device to implement functions related to the processor in FIG. 6 or the SOC in FIG. 7. In a possible design, the chip system further includes a memory, and the memory is configured to store programs and data necessary for the computer device. The chip system can be composed of chips, and can also include chips and other discrete devices.
综上所述,本申请实施例提供了一种接口配置方法、终端设备及接口,在该方案中,终端设备中的处理模块在确定type-c连接器未连接外部设备时,将PD芯片设置为CC引脚持续输出低电平的第一工作状态,并且在当所述处理模块通过监测模块监测type-c连接外部设备时,将PD芯片设置为cc引脚输出高低电平的矩形方波的第二工作状态,以使所述PD芯片识别该外部设备,从而保证type-c接口的正常工作。上述方案可以保证终端设备的type-c接口能够连接并识别外部设备正常工作的基础上,在type-c连接器未连接外部设备时,使CC引脚持续输出低电平,从而大大降低了CC引脚与GND引脚的电压差,进而可以缓解type-c接口受潮或浸液后CC引脚被腐蚀的情况,实现对type-c接口的优化。In summary, the embodiments of the present application provide an interface configuration method, terminal device, and interface. In this solution, the processing module in the terminal device sets the PD chip when it determines that the type-c connector is not connected to an external device. It is the first working state where the CC pin continuously outputs a low level, and when the processing module monitors the type-c through the monitoring module to connect to an external device, the PD chip is set to output a rectangular square wave of high and low level on the cc pin. A second working state, so that the PD chip recognizes the external device, thereby ensuring normal work of the type-c interface. The above solution can ensure that the type-c interface of the terminal device can be connected and recognize the normal operation of the external device. When the type-c connector is not connected to the external device, the CC pin continuously outputs a low level, thereby greatly reducing the CC. The voltage difference between the pin and the GND pin can further alleviate the situation that the CC pin is corroded after the type-c interface is wet or immersed in liquid, so as to optimize the type-c interface.
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present application may be provided as a method, a system, or a computer program product. Therefore, this application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, this application may take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
本申请是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。This application is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present application. It should be understood that each process and / or block in the flowcharts and / or block diagrams, and combinations of processes and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device to produce a machine, so that the instructions generated by the processor of the computer or other programmable data processing device are used to generate instructions Means for implementing the functions specified in one or more flowcharts and / or one or more blocks of the block diagrams.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to work in a particular manner such that the instructions stored in the computer-readable memory produce a manufactured article including an instruction device, the instructions The device implements the functions specified in one or more flowcharts and / or one or more blocks of the block diagram.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机 或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded on a computer or other programmable data processing device, so that a series of steps can be performed on the computer or other programmable device to produce a computer-implemented process, which can be executed on the computer or other programmable device. The instructions provide steps for implementing the functions specified in one or more flowcharts and / or one or more blocks of the block diagrams.
显然,本领域的技术人员可以对本申请实施例进行各种改动和变型而不脱离本申请实施例的范围。这样,倘若本申请实施例的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。Obviously, those skilled in the art can make various changes and modifications to the embodiments of the present application without departing from the scope of the embodiments of the present application. In this way, if these modifications and variations of the embodiments of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application also intends to include these changes and variations.

Claims (25)

  1. 一种终端设备,所述终端设备包含功率输出PD芯片和type-c连接器,所述PD芯片中的通道配置CC引脚连接所述type-c连接器,其特征在于,所述终端设备还包括:A terminal device includes a power output PD chip and a type-c connector, and a channel configuration CC pin in the PD chip is connected to the type-c connector, wherein the terminal device is also include:
    处理模块,用于确定所述type-c连接器未连接外部设备时,将所述PD芯片设置为第一工作状态,屏蔽所述PD芯片的中断,并向监测模块发送启动监测消息;其中,所述PD芯片在所述第一工作状态下CC引脚持续输出低电平,所述启动监测消息用于通知所述监测模块启动监测所述type-c连接器是否连接外部设备;A processing module, configured to determine that the type-c connector is not connected to an external device, set the PD chip to a first working state, shield the interrupt of the PD chip, and send a monitoring start message to a monitoring module; The PD chip continuously outputs a low level under the first working state of the PD chip, and the startup monitoring message is used to notify the monitoring module to start monitoring whether the type-c connector is connected to an external device;
    所述监测模块,用于在接收到所述启动监测消息后,启动监测所述type-c连接器是否连接外部设备,在监测到所述type-c连接器连接外部设备时,向所述处理模块发送第一消息;The monitoring module is configured to start monitoring whether the type-c connector is connected to an external device after receiving the startup monitoring message, and to detect when the type-c connector is connected to an external device. The module sends a first message;
    所述处理模块,还用于在接收到所述第一消息后,将所述PD芯片从所述第一工作状态调整为第二工作状态,并启动接收所述PD芯片的中断;其中,所述PD芯片在所述第二工作状态下CC引脚输出高低电平的矩形方波。The processing module is further configured to, after receiving the first message, adjust the PD chip from the first working state to a second working state, and start receiving an interrupt of the PD chip; The PD chip outputs a rectangular square wave of high and low levels at the CC pin in the second working state.
  2. 如权利要求1所述的终端设备,其特征在于,所述处理模块在确定所述type-c连接器未连接外部设备时,具体用于:The terminal device according to claim 1, wherein the processing module is specifically configured to: when determining that the type-c connector is not connected to an external device:
    在所述终端设备开机启动时,确定所述type-c连接器未连接外部设备;或者When the terminal device is powered on, determine that the type-c connector is not connected to an external device; or
    在接收到所述PD芯片发送的第二消息时,确定所述type-c连接器未连接外部设备;其中,所述第二消息为所述PD芯片在所述第二工作状态下确定所述type-c连接器持续设定时长内未连接外部设备后发送的。When receiving a second message sent by the PD chip, determining that the type-c connector is not connected to an external device; wherein the second message is that the PD chip determines the second chip in the second working state The type-c connector is sent after the external device is not connected for a set period of time.
  3. 如权利要求1或2所述的终端设备,其特征在于,所述监测模块中包含分压电路和监测芯片;其中,所述分压电路提供固定电压,并通过分压器件分别与所述PD芯片的所述CC引脚和所述type-c连接器连接;The terminal device according to claim 1 or 2, wherein the monitoring module includes a voltage dividing circuit and a monitoring chip; wherein the voltage dividing circuit provides a fixed voltage and is separately connected to the PD through a voltage dividing device. The CC pin of the chip is connected to the type-c connector;
    所述监测芯片,具体用于:The monitoring chip is specifically used for:
    监测所述分压器件的电压变化;Monitoring a voltage change of the voltage dividing device;
    当监测到所述分压器件的电压变化超过设定电压阈值时,确定所述type-c连接器连接外部设备;Determining that the type-c connector is connected to an external device when the voltage change of the voltage-dividing device exceeds a set voltage threshold;
    向所述处理模块发送所述第一消息。Sending the first message to the processing module.
  4. 如权利要求1-3任一项所述的终端设备,其特征在于,The terminal device according to any one of claims 1 to 3, wherein
    所述处理模块,在将所述PD芯片设置为所述第一工作状态时,具体用于:When the processing module sets the PD chip to the first working state, the processing module is specifically configured to:
    向所述PD芯片发送第三消息,所述第三消息用于通知所述PD芯片将工作状态调整为所述第一工作状态;Sending a third message to the PD chip, where the third message is used to notify the PD chip to adjust a working state to the first working state;
    所述处理模块,在将所述PD芯片从所述第一工作状态调整为所述第二工作状态时,具体用于:The processing module, when adjusting the PD chip from the first working state to the second working state, is specifically configured to:
    向所述PD芯片发送第四消息,所述第四消息用于通知所述PD芯片将工作状态调整为所述第二工作状态。Sending a fourth message to the PD chip, where the fourth message is used to notify the PD chip to adjust a working state to the second working state.
  5. 如权利要求1-4任一项所述的终端设备,其特征在于,所述处理模块还用于:The terminal device according to any one of claims 1-4, wherein the processing module is further configured to:
    在接收到所述第一消息后,向所述监测模块发送停止监测消息,所述停止监测消息用于通知所述监测模块停止监测所述type-c连接器是否连接外部设备;After receiving the first message, sending a stop monitoring message to the monitoring module, the stop monitoring message is used to notify the monitoring module to stop monitoring whether the type-c connector is connected to an external device;
    所述监测模块,还用于:在接收到所述停止监测消息后,停止监测所述type-c连接器 是否连接外部设备。The monitoring module is further configured to stop monitoring whether the type-c connector is connected to an external device after receiving the stop monitoring message.
  6. 如权利要求1-5任一项所述的终端设备,其特征在于,所述处理模块与所述PD芯片之间通过内部集成电路I2C总线进行通信。The terminal device according to any one of claims 1-5, wherein the processing module and the PD chip communicate with each other through an internal integrated circuit (I2C) bus.
  7. 如权利要求1-6任一项所述的终端设备,其特征在于,所述处理模块与所述监测模块之间通过同步串行接口SSI进行通信。The terminal device according to any one of claims 1-6, wherein the processing module and the monitoring module communicate with each other through a synchronous serial interface SSI.
  8. 一种终端设备,所述终端设备包含功率输出PD芯片和type-c连接器,所述PD芯片中的通道配置CC引脚连接所述type-c连接器,其特征在于,所述终端设备还包括:A terminal device includes a power output PD chip and a type-c connector, and a channel configuration CC pin in the PD chip is connected to the type-c connector, wherein the terminal device is also include:
    存储器,用于存储程序;Memory for storing programs;
    处理器,用于读取所述存储器中存储的程序,执行:A processor, configured to read a program stored in the memory and execute:
    在确定所述type-c连接器未连接外部设备时,将所述PD芯片设置为第一工作状态,屏蔽所述PD芯片的中断,并启动监测所述type-c连接器是否连接外部设备;其中,所述PD芯片在所述第一工作状态下CC引脚持续输出低电平;When it is determined that the type-c connector is not connected to an external device, set the PD chip to a first working state, shield the interruption of the PD chip, and start monitoring whether the type-c connector is connected to an external device; Wherein, the PD chip continuously outputs a low level under the first working state of the PD chip;
    在确定所述type-c连接器连接外部设备时,将所述PD芯片从所述第一工作状态调整为第二工作状态,并启动接收所述PD芯片的中断;其中,所述PD芯片在所述第二工作状态下CC引脚输出高低电平的矩形方波。When determining that the type-c connector is connected to an external device, adjust the PD chip from the first working state to the second working state, and start receiving an interrupt of the PD chip; wherein the PD chip is in In the second working state, the CC pin outputs a rectangular square wave of high and low levels.
  9. 如权利要求8所述的终端设备,其特征在于,所述处理器,在确定所述type-c连接器未连接外部设备时,具体用于:The terminal device according to claim 8, wherein the processor is specifically configured to: when determining that the type-c connector is not connected to an external device:
    在所述终端设备开机启动时,确定所述type-c连接器未连接外部设备;或者When the terminal device is powered on, determine that the type-c connector is not connected to an external device; or
    在接收到所述PD芯片发送的第一消息时,确定所述type-c连接器未连接外部设备;其中,所述第一消息为所述PD芯片在所述第二工作状态下确定所述type-c连接器持续设定时长内未连接外部设备后发送的。When the first message sent by the PD chip is received, it is determined that the type-c connector is not connected to an external device; wherein the first message is that the PD chip determines that the PD chip is in the second working state; The type-c connector is sent after the external device is not connected for a set period of time.
  10. 如权利要求8或9所述的终端设备,其特征在于,所述终端设备中还包含分压电路,所述分压电路提供固定电压,并通过分压器件分别与所述PD芯片的所述CC引脚和所述type-c连接器连接;The terminal device according to claim 8 or 9, wherein the terminal device further comprises a voltage dividing circuit, the voltage dividing circuit provides a fixed voltage, and is separately connected to the PD chip through the voltage dividing device. The CC pin is connected to the type-c connector;
    所述处理器,在监测所述type-c连接器是否连接外部设备时,具体用于:The processor, when monitoring whether the type-c connector is connected to an external device, is specifically configured to:
    监测所述分压器件的电压变化;Monitoring a voltage change of the voltage dividing device;
    当监测到所述分压器件的电压变化超过设置电压阈值时,确定所述type-c连接器连接外部设备。When a voltage change of the voltage dividing device is monitored to exceed a set voltage threshold, it is determined that the type-c connector is connected to an external device.
  11. 如权利要求8-10任一项所述的终端设备,其特征在于,The terminal device according to any one of claims 8 to 10, wherein
    所述处理器,在将所述PD芯片设置为所述第一工作状态时,具体用于:When the processor sets the PD chip to the first working state, the processor is specifically configured to:
    向所述PD芯片发送第二消息,所述第二消息用于通知所述PD芯片将工作状态调整为所述第一工作状态;Sending a second message to the PD chip, where the second message is used to notify the PD chip to adjust a working state to the first working state;
    所述处理器,在将所述PD芯片从所述第一工作状态调整为所述第二工作状态时,具体用于:When the processor adjusts the PD chip from the first working state to the second working state, the processor is specifically configured to:
    向所述PD芯片发送第三消息,所述第三消息用于通知所述PD芯片将工作状态调整为所述第二工作状态。Sending a third message to the PD chip, where the third message is used to notify the PD chip to adjust a working state to the second working state.
  12. 如权利要求8-11任一项所述的终端设备,其特征在于,所述处理器还用于:The terminal device according to any one of claims 8-11, wherein the processor is further configured to:
    在确定所述type-c连接器连接外部设备后,停止监测所述type-c连接器是否连接外部设备。After determining that the type-c connector is connected to an external device, stop monitoring whether the type-c connector is connected to an external device.
  13. 如权利要求8-12任一项所述的终端设备,其特征在于,所述处理器与所述PD芯 片之间通过内部集成电路I2C总线进行通信。The terminal device according to any one of claims 8 to 12, wherein the processor and the PD chip communicate with each other through an internal integrated circuit (I2C) bus.
  14. 一种接口,所述接口中包含功率输出PD芯片和type-c连接器,所述PD芯片中的通道配置CC引脚连接所述type-c连接器,其特征在于,所述PD芯片用于:An interface includes a power output PD chip and a type-c connector, and a channel configuration CC pin in the PD chip is connected to the type-c connector, wherein the PD chip is used for :
    在接收到终端设备中的处理器发送的第一消息时,将所述PD芯片的工作状态调整为第一工作状态;其中,所述第一消息用于通知所述PD芯片将工作状态调整为所述第一工作状态;所述PD芯片在所述第一工作状态下CC引脚持续输出低电平;所述连接部件与所述PD芯片连接;When receiving the first message sent by the processor in the terminal device, adjusting the working state of the PD chip to the first working state; wherein the first message is used to notify the PD chip to adjust the working state to The first working state; the PD chip continuously outputs a low level under the first working state; the connecting component is connected to the PD chip;
    在接收到所述处理器发送的第二消息时,将所述PD芯片的工作状态调整为第二工作状态;其中,所述第二消息用于通知所述PD芯片将工作状态调整为所述第二工作状态;所述PD芯片在所述第二工作状态下CC引脚输出高低电平的矩形方波。Upon receiving a second message sent by the processor, adjusting the working state of the PD chip to a second working state; wherein the second message is used to notify the PD chip to adjust the working state to the A second working state; in the second working state, the CC pin outputs a rectangular square wave of high and low levels.
  15. 如权利要求14所述的接口,其特征在于,所述PD芯片还用于:The interface according to claim 14, wherein the PD chip is further configured to:
    在所述第二工作状态下,确定所述type-c连接器持续设定时长内未连接外部设备,并向所述处理器发送第三消息,所述第三消息用于通知所述type-c连接未连接外部设备。In the second working state, determine that the type-c connector is not connected to an external device for a set duration, and send a third message to the processor, where the third message is used to notify the type- cThe external device is not connected.
  16. 如权利要求14或15所述的接口,其特征在于,所述PD芯片与所述处理器之间通过内部集成电路I2C总线进行通信。The interface according to claim 14 or 15, wherein the PD chip and the processor communicate with each other through an internal integrated circuit (I2C) bus.
  17. 一种接口配置方法,该方法应用于终端设备中的处理器,其中,所述终端设备包含功率输出PD芯片和type-c连接器,所述PD芯片中的通道配置CC引脚连接所述type-c连接器,其特征在于,所述方法包括:An interface configuration method applied to a processor in a terminal device, wherein the terminal device includes a power output PD chip and a type-c connector, and a channel configuration CC pin in the PD chip is connected to the type -c connector, characterized in that the method includes:
    所述处理器在确定所述type-c连接器未连接外部设备时,将所述PD芯片设置为第一工作状态,屏蔽所述PD芯片的中断,并启动监测所述type-c连接器是否连接外部设备;其中,所述PD芯片在所述第一工作状态下CC引脚持续输出低电平;When the processor determines that the type-c connector is not connected to an external device, the processor sets the PD chip to a first working state, shields the interrupt of the PD chip, and starts monitoring whether the type-c connector is Connected to an external device; wherein the PD chip continuously outputs a low level under the first working state of the PD chip;
    所述处理器在确定所述type-c连接器连接外部设备时,将所述PD芯片从所述第一工作状态调整为第二工作状态,并启动接收所述PD芯片的中断;所述PD芯片在所述第二工作状态下CC引脚输出高低电平的矩形方波。When determining that the type-c connector is connected to an external device, the processor adjusts the PD chip from the first working state to a second working state, and starts receiving an interrupt of the PD chip; the PD The CC pin outputs a rectangular square wave of high and low levels in the second working state of the chip.
  18. 如权利要求17所述的方法,其特征在于,所述处理器确定所述type-c连接器未连接外部设备,包括:The method according to claim 17, wherein the processor determining that the type-c connector is not connected to an external device comprises:
    所述处理器在所述终端设备开机启动时,确定所述type-c连接器未连接外部设备;或者The processor determines that the type-c connector is not connected to an external device when the terminal device is powered on; or
    所述处理器在接收到所述PD芯片发送的第一消息时,确定所述type-c连接器未连接外部设备;其中,所述第一消息为所述PD芯片在所述第二工作状态下确定所述type-c连接器持续设定时长内未连接外部设备后发送的。When receiving the first message sent by the PD chip, the processor determines that the type-c connector is not connected to an external device; wherein the first message is that the PD chip is in the second working state. It is determined that the type-c connector is sent after an external device is not connected for a set duration.
  19. 如权利要求17或18所述的方法,其特征在于,所述终端设备中还包含分压电路,所述分压电路提供固定电压,并通过分压器件分别与所述PD芯片的所述CC引脚和所述type-c连接器连接;The method according to claim 17 or 18, wherein the terminal device further comprises a voltage dividing circuit, the voltage dividing circuit provides a fixed voltage, and is separately connected to the CC of the PD chip through a voltage dividing device. The pin is connected to the type-c connector;
    所述处理器监测所述type-c连接器是否连接外部设备,包括:The processor monitoring whether the type-c connector is connected to an external device includes:
    所述处理器监测所述分压器件的电压变化;The processor monitors a voltage change of the voltage dividing device;
    当监测到所述分压器件的电压变化超过设置电压阈值时,所述处理器确定所述type-c连接器连接外部设备。When it is detected that the voltage change of the voltage dividing device exceeds a set voltage threshold, the processor determines that the type-c connector is connected to an external device.
  20. 如权利要求17-19任一项所述的方法,其特征在于,The method according to any one of claims 17 to 19, wherein:
    所述处理器将所述PD芯片设置为所述第一工作状态,包括:The setting, by the processor, the PD chip to the first working state includes:
    所述处理器向所述PD芯片发送第二消息,所述第二消息用于通知所述PD芯片将工作状态调整为所述第一工作状态;Sending, by the processor, a second message to the PD chip, the second message is used to notify the PD chip to adjust a working state to the first working state;
    所述处理器将所述PD芯片从所述第一工作状态调整为所述第二工作状态,包括:The adjusting, by the processor, the PD chip from the first working state to the second working state includes:
    所述处理器向所述PD芯片发送第三消息,所述第三消息用于通知所述PD芯片将工作状态调整为所述第二工作状态。The processor sends a third message to the PD chip, and the third message is used to notify the PD chip to adjust a working state to the second working state.
  21. 如权利要求17-20任一项所述的方法,其特征在于,在所述处理器确定所述type-c连接器连接外部设备后,所述方法还包括:The method according to any one of claims 17-20, wherein after the processor determines that the type-c connector is connected to an external device, the method further comprises:
    所述处理器停止监测所述type-c连接器是否连接外部设备。The processor stops monitoring whether the type-c connector is connected to an external device.
  22. 如权利要求17-21任一项所述的方法,其特征在于,所述处理器与所述PD芯片之间通过内部集成电路I2C总线进行通信。The method according to any one of claims 17 to 21, wherein the processor and the PD chip communicate with each other through an internal integrated circuit (I2C) bus.
  23. 一种计算机程序,其特征在于,当所述计算机程序在计算机上运行时,使得所述计算机执行如权利要求17-22任一项所述的方法。A computer program, wherein when the computer program is run on a computer, the computer is caused to execute the method according to any one of claims 17-22.
  24. 一种计算机存储介质,其特征在于,所述计算机存储介质中存储有计算机程序,当所述计算机程序被计算机执行时,使得所述计算机执行如权利要求17-22任一项所述的方法。A computer storage medium, characterized in that a computer program is stored in the computer storage medium, and when the computer program is executed by a computer, the computer is caused to execute the method according to any one of claims 17-22.
  25. 一种芯片,其特征在于,所述芯片用于读取存储器中存储的计算机程序,执行如权利要求17-22任一项所述的方法。A chip, wherein the chip is used to read a computer program stored in a memory and execute the method according to any one of claims 17-22.
PCT/CN2018/097815 2018-07-31 2018-07-31 Interface configuration method, terminal device and interface WO2020024116A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201880080710.6A CN111480152B (en) 2018-07-31 2018-07-31 Interface configuration method, terminal equipment and interface
PCT/CN2018/097815 WO2020024116A1 (en) 2018-07-31 2018-07-31 Interface configuration method, terminal device and interface

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/097815 WO2020024116A1 (en) 2018-07-31 2018-07-31 Interface configuration method, terminal device and interface

Publications (1)

Publication Number Publication Date
WO2020024116A1 true WO2020024116A1 (en) 2020-02-06

Family

ID=69230973

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/097815 WO2020024116A1 (en) 2018-07-31 2018-07-31 Interface configuration method, terminal device and interface

Country Status (2)

Country Link
CN (1) CN111480152B (en)
WO (1) WO2020024116A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111420391A (en) * 2020-03-04 2020-07-17 青岛小鸟看看科技有限公司 Head-mounted display system and space positioning method thereof
CN113030794A (en) * 2021-03-02 2021-06-25 Oppo广东移动通信有限公司 Device detection method and device, computer readable medium and electronic device
CN113672533A (en) * 2021-08-03 2021-11-19 维沃移动通信有限公司 Insertion detection method, insertion detection device, electronic equipment and storage medium

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112737034A (en) * 2020-12-29 2021-04-30 四川长虹电器股份有限公司 Low-power consumption lithium battery charging management driving circuit
CN114264423B (en) * 2022-03-03 2022-07-05 荣耀终端有限公司 Liquid inlet detection control method and electronic equipment
CN115904851B (en) * 2023-01-10 2023-08-15 荣耀终端有限公司 Terminal equipment and external equipment access detection system
CN116069697B (en) * 2023-03-06 2023-08-22 荣耀终端有限公司 Type-C interface level control method and related device
CN116962953A (en) * 2023-09-21 2023-10-27 荣耀终端有限公司 Equipment connection detection circuit, audio channel switching method and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180059771A1 (en) * 2016-08-25 2018-03-01 Samsung Electronics Co., Ltd. Semiconductor device and method of operating the same
CN207249664U (en) * 2017-08-09 2018-04-17 深圳市亿道数码技术有限公司 A kind of double type c interface arrangements based on intel kabylake platforms
CN108268405A (en) * 2016-12-30 2018-07-10 维沃移动通信有限公司 Protection circuit, guard method and the mobile terminal of Type-C interfaces
CN108337463A (en) * 2017-07-20 2018-07-27 青岛海信电器股份有限公司 A kind of control method of television set and its USB-C interfaces connection external equipment

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9146888B2 (en) * 2012-07-05 2015-09-29 Apple Inc. Techniques for monitoring contacts in a connector
US10324877B2 (en) * 2014-12-24 2019-06-18 Texas Instruments Incorporated Circuit and method for interfacing universal serial bus
US10014637B2 (en) * 2015-10-20 2018-07-03 Sony Mobile Communications Inc. Connector receptacle interfacing circuit and method of operation
US11181966B2 (en) * 2015-11-13 2021-11-23 Texas Instruments Incorporated USB interface circuit and method for low power operation
KR102628011B1 (en) * 2016-01-29 2024-01-22 삼성전자주식회사 Universal serial bus power delivery device and system including the same
WO2017166211A1 (en) * 2016-03-31 2017-10-05 华为技术有限公司 Testing functional component and data debugging method
WO2017177377A1 (en) * 2016-04-12 2017-10-19 华为技术有限公司 Method, apparatus and system for identifying peer device by usb type-c port device
CN106843438B (en) * 2016-12-13 2020-05-29 硅谷数模半导体(北京)有限公司 Cascade communication method and cascade circuit
US10476394B2 (en) * 2016-12-28 2019-11-12 Texas Instruments Incorporated Dynamic learning of voltage source capabilities
CN108268388B (en) * 2016-12-30 2019-12-03 维沃移动通信有限公司 A kind of Type-C interface protective circuit and method, mobile terminal
CN106844265B (en) * 2017-02-06 2018-10-19 维沃移动通信有限公司 A kind of control method and mobile terminal of general-purpose serial bus USB interface
CN207051889U (en) * 2017-05-31 2018-02-27 珠海市魅族科技有限公司 A kind of terminal device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180059771A1 (en) * 2016-08-25 2018-03-01 Samsung Electronics Co., Ltd. Semiconductor device and method of operating the same
CN108268405A (en) * 2016-12-30 2018-07-10 维沃移动通信有限公司 Protection circuit, guard method and the mobile terminal of Type-C interfaces
CN108337463A (en) * 2017-07-20 2018-07-27 青岛海信电器股份有限公司 A kind of control method of television set and its USB-C interfaces connection external equipment
CN207249664U (en) * 2017-08-09 2018-04-17 深圳市亿道数码技术有限公司 A kind of double type c interface arrangements based on intel kabylake platforms

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111420391A (en) * 2020-03-04 2020-07-17 青岛小鸟看看科技有限公司 Head-mounted display system and space positioning method thereof
CN113030794A (en) * 2021-03-02 2021-06-25 Oppo广东移动通信有限公司 Device detection method and device, computer readable medium and electronic device
CN113672533A (en) * 2021-08-03 2021-11-19 维沃移动通信有限公司 Insertion detection method, insertion detection device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN111480152A (en) 2020-07-31
CN111480152B (en) 2022-04-22

Similar Documents

Publication Publication Date Title
WO2020024116A1 (en) Interface configuration method, terminal device and interface
US9846472B2 (en) Firmware update method and power system thereof
US8769317B2 (en) USB hub for supplying power upon determination whether a USB device is chargeable according to data transfer rate of the USB device
CN106291210B (en) USB interface detector, USB interface detection method, USB connector and electronic equipment
US9866055B2 (en) Automatic scheme to detect multi-standard charger types
CN112540304B (en) Battery power management method, electronic device and computer storage medium
JP2018206425A (en) Low-power implementation of type-c connector subsystem
WO2017152424A1 (en) Method and terminal device for establishing connection between devices with universal serial bus usb type-c interface
EP2584471A1 (en) Method and terminal for selecting internal circuit according to USB interface status
US8860378B2 (en) Method and system for attachment and removal indication for battery charging devices
EP2757839A1 (en) Power management method and apparatus for network access module
US9018896B2 (en) Method and system for determining whether a portable device is charging
US8671291B2 (en) Method and device for charging energy storage devices
CN109672950B (en) Power saving circuit and power saving method based on Type-C earphone
AU2015271399A1 (en) Super hub system and method thereof
US20160179153A1 (en) Systems and methods for automatic detection of a device
WO2022127659A1 (en) Protection method, protection apparatus, electronic device, readable storage medium, and chip
US11947481B2 (en) Terminal and type C interface anti-corrosion method
US20220173605A1 (en) Controlling charging of computing device through ports connected to external devices
EP3759573A1 (en) Operating modes of a computer display
CN111830394A (en) Charging circuit fault detection method, electronic device and computer readable storage medium
WO2017004876A1 (en) Method and terminal for configuring output current
US20230258696A1 (en) Voltage monitoring system, voltage monitoring device and voltage monitoring method
WO2022061935A1 (en) Power supply apparatus, control method for power supply apparatus, and storage medium

Legal Events

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

Ref document number: 18928872

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18928872

Country of ref document: EP

Kind code of ref document: A1