USB Type-C interface circuit and electronic devices

By designing the USB Type-C interface circuit, the interface module and logic module automatically identify the device type and switch modes, solving the problem of inconvenience caused by relying on dedicated adapter cables in the existing technology, and realizing convenient and reliable mode switching and power supply path adaptation.

CN225001734UActive Publication Date: 2026-11-20GUANGDONG LEAPFIVE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202522086829.4
Authority / Receiving Office
CN · China
Patent Type
Utility models(China)
Current Assignee / Owner
Filing Date
2025-09-26
Publication Date
2026-11-20
Estimated Expiration
2035-09-26

AI Technical Summary

Technical Problem

Existing USB OTG functionality implementations rely on dedicated OTG adapter cables for mode switching, leading to inconvenience for users and difficulties in device compatibility.

Method used

Design a USB Type-C interface circuit, including an interface module, a logic module, an enable module, a power path selection module, and a control module. The interface module outputs a level signal, the logic module determines the device type, and the control module automatically switches between master/slave mode and power path without the need for a dedicated adapter cable.

Benefits of technology

It achieves automatic control of master-slave mode switching and power path adaptation, simplifies the user operation process, and improves the convenience and reliability of USB OTG function.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN225001734U_ABST
    Figure CN225001734U_ABST
Patent Text Reader

Abstract

The application is suitable for the interface technical field, and provides a USB Type-C interface circuit and electronic equipment, the circuit comprises an interface module, a logic module, an enabling module, a power supply path selection module and a control module, the interface module is electrically connected with the logic module and the control module respectively, the logic module is electrically connected with the enabling module and the control module respectively, the enabling module is electrically connected with the power supply path selection module, the interface module is used for being electrically connected with an external device and a power supply bus respectively, and the power supply path selection module is used for being electrically connected with the power supply bus and a first power supply respectively.The circuit provided by the application embodiment realizes automatic control of master-slave mode switching and power supply path adaptation through the level signal output corresponding to the device type of the external device connected with the interface module, the logic signal output by the logic module triggers the master-slave mode switching of the control module and the path conversion of the power supply path selection module, and the mode switching can be completed without relying on two special conversion lines.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of interface technology, and in particular relates to a USB Type-C interface circuit and electronic device. Background Technology

[0002] In traditional implementations of USB OTG (Universal Serial Bus On-The-Go) functionality, master chips that only support Micro-USB interfaces often rely on two non-interchangeable dedicated OTG adapter cables to switch between master and slave modes, resulting in significant limitations and operational drawbacks. When connecting a slave peripheral, a Type 1 OTG adapter cable with a grounded ID pin must be used. This adapter cable uses internal hardware to permanently pull the ID signal low on the Micro-USB side. The master chip detects the low-level ID signal to determine if a slave peripheral is connected and switches to master mode, then outputs power to the peripheral. However, when connecting a master peripheral, a Type 2 OTG adapter cable with a floating ID pin is required. This adapter cable does not interfere with the ID signal; the master chip detects the default high level of the ID signal to determine if a master peripheral is connected and switches to slave mode to receive external power. This mode-switching method, relying on dedicated adapter cables, causes significant inconvenience for users and hinders device compatibility. Utility Model Content

[0003] This application provides a USB Type-C interface circuit and electronic device, which can solve the problem of relying on a dedicated adapter cable for mode switching, which brings significant inconvenience to user operation and device adaptation.

[0004] In a first aspect, embodiments of this application provide a USB Type-C interface circuit, including an interface module, a logic module, an enable module, a power path selection module, and a control module. The interface module is electrically connected to the logic module and the control module, the logic module is electrically connected to the enable module and the control module, the enable module is electrically connected to the power path selection module, the interface module is used to be electrically connected to an external device and a power supply bus, and the power path selection module is used to be electrically connected to the power supply bus and a first power source. When the external device is a slave device, the interface module outputs a first level signal to the logic module; the logic module is used to output a first logic signal to the control module and the enable module respectively according to the first level signal; the control module is used to switch to master mode according to the first logic signal; the enable module is used to output a first enable signal to the power supply path selection module according to the first logic signal; the power supply path selection module is used to control the first power supply to supply power to the power supply bus according to the first enable signal; When the external device is a host device, the interface module outputs a second level signal to the logic module; the logic module is used to output a second logic signal to the control module and the enable module respectively according to the second level signal; the control module is used to switch to slave mode according to the second logic signal and the voltage status signal of the power supply bus; the enable module is used to output a second enable signal to the power supply path selection module according to the second logic signal; the power supply path selection module is used to control the power supply bus to supply power to the first power source according to the second enable signal.

[0005] In one possible implementation of the first aspect, the logic module includes a first resistor, a second resistor, and a first OR gate. A first terminal of the first resistor is electrically connected to both the interface module and a first input terminal of the first OR gate. The second terminals of both the first and second resistors are grounded. A first terminal of the second resistor is electrically connected to both the interface module and a second input terminal of the first OR gate. The output terminal of the first OR gate is electrically connected to both the enable module and the control module. In one possible implementation of the first aspect, the enabling module includes a third resistor and a first switching transistor, a first end of the third resistor being electrically connected to the first power supply, a second end of the third resistor being electrically connected to the drain of the first switching transistor and the power supply path selection module, the gate of the first switching transistor being electrically connected to the logic module and the control module, and the source of the first switching transistor being grounded. In one possible implementation of the first aspect, the power supply path selection module includes a power switch unit and a unidirectional conduction unit, the power switch unit being electrically connected to the enable module, and both the power switch unit and the unidirectional conduction unit being electrically connected to the first power source and the power supply bus, respectively. The power switch unit is configured to be turned on according to the first enable signal, so that the first power supply supplies power to the power supply bus through the power switch unit; the power switch unit is also configured to be turned off according to the second enable signal, so that the power supply bus supplies power to the first power supply through the unidirectional conduction unit. In one possible implementation of the first aspect, the power switching unit includes a power switching chip, the enable terminal of the power switching chip is electrically connected to the enable module, the input terminal of the power switching chip is used to be electrically connected to the first power supply, and the output terminal of the power switching chip is used to be electrically connected to the power supply bus. In one possible implementation of the first aspect, the unidirectional conduction unit includes a first diode, the anode of which is electrically connected to the power supply bus, and the cathode of which is electrically connected to the first power source.

[0006] In one possible implementation of the first aspect, the USB Type-C interface circuit further includes a fourth resistor, a fifth resistor, and a sixth resistor. The first end of the fourth resistor is electrically connected to the logic module, the enable module, and the control module, respectively. The second ends of the fourth resistor and the sixth resistor are both grounded. The first end of the fifth resistor is used to be electrically connected to the power supply bus. The second end of the fifth resistor is electrically connected to the control module and the first end of the sixth resistor, respectively. In one possible implementation of the first aspect, the USB Type-C interface circuit further includes a transient suppression diode, the first terminal of which is electrically connected to the power supply bus, and the second terminal of which is grounded.

[0007] In one possible implementation of the first aspect, the USB Type-C interface circuit further includes multiple electrostatic discharge (ESD) protection devices, all of which have their I / O pins electrically connected to the interface module, and all of which have their GND pins grounded.

[0008] Secondly, embodiments of this application provide an electronic device including the USB Type-C interface circuit described in any one of the first aspects.

[0009] The beneficial effects of the embodiments of this application compared with the prior art are: The USB Type-C interface circuit provided in this application includes an interface module, a logic module, an enable module, a power path selection module, and a control module. In actual use, the interface module is electrically connected to both the external device and the power supply bus, and the power path selection module is electrically connected to both the power supply bus and a first power source. When the external device connected to the interface module is a slave device, the interface module outputs a first-level signal. The logic module outputs a first logic signal based on the first-level signal. The control module determines that the connected external device is a slave device based on the first logic signal and switches to master mode. The enable module outputs a first enable signal based on the first logic signal, enabling the power selection module to control the first power source to supply power to the power supply bus, thereby supplying power to the external device. At this time, the control module initiates communication with the slave peripheral. When the external device connected to the interface module is a master device, the interface module outputs a second-level signal. The logic module outputs a second logic signal based on the second level signal. The control module determines that the connected external device is a host device based on the second logic signal and the voltage status signal of the power supply bus, and switches to slave mode. The enable module outputs a second enable signal based on the second logic signal, so that the power supply selection module controls the power supply bus to supply power to the first power source, thereby supplying power to the control module. At this time, the control module waits for the host peripheral to initiate communication. Therefore, the USB Type-C interface circuit provided in this embodiment outputs a corresponding level signal based on the device type of the external device connected to the interface module. The logic signal output by the logic module triggers the master-slave mode switching of the control module and the path conversion of the power supply path selection module, realizing automatic control of master-slave mode switching and power supply path adaptation without relying on two dedicated OTG adapter cables. This design simplifies the process of connecting to external devices, brings convenience to user operation and device adaptation, and significantly improves the ease of use and reliability of the USB OTG function. Attached Figure Description

[0010] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0011] Figure 1 This is a schematic block diagram of a USB Type-C interface circuit provided in one embodiment of this application; Figure 2 This is a circuit connection diagram of a USB Type-C interface circuit provided in an embodiment of this application; Figure 3This is a block diagram of a USB Type-C interface circuit connected to a slave peripheral device according to an embodiment of this application; Figure 4 This is a block diagram of a USB Type-C interface circuit connecting a host peripheral device according to an embodiment of this application.

[0012] In the diagram: 101, Interface module; 102, Logic module; 103, Enable module; 104, Power path selection module; 1041, Power switch unit; 1042, One-way conduction unit; 105, Control module. Detailed Implementation

[0013] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.

[0014] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.

[0015] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if [the described condition or event] is detected" may be interpreted, depending on the context, as "once determined," "in response to determination," "once [the described condition or event] is detected," or "in response to detection of [the described condition or event]."

[0016] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0017] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0018] In traditional USB OTG implementations, master controller chips that only support Micro-USB interfaces often rely on two separate, non-interchangeable OTG adapter cables to switch between host and slave modes, resulting in significant limitations and operational drawbacks. When connecting a slave peripheral, a Type 1 OTG adapter cable with a grounded ID pin must be used. This cable uses internal hardware to permanently pull the ID signal low on the Micro-USB side. The master controller chip detects the low-level ID signal to determine if a slave peripheral is connected and switches to host mode, then supplies power to the peripheral. When connecting a host peripheral, a Type 2 OTG adapter cable with a floating ID pin is required. This cable does not interfere with the ID signal; the master controller chip detects the default high level of the ID signal to determine if a host peripheral is connected and switches to slave mode to receive external power. However, this mode-switching method, relying on dedicated adapter cables, causes significant inconvenience for users and hinders device compatibility.

[0019] To address the aforementioned issues, the USB Type-C interface circuit provided in this application includes an interface module, a logic module, an enable module, a power path selection module, and a control module. In practical use, the interface module is electrically connected to both the external device and the power supply bus, while the power path selection module is electrically connected to both the power supply bus and a first power source. When the external device connected to the interface module is a slave device, the interface module outputs a first-level signal. The logic module outputs a first logic signal based on the first-level signal. The control module determines that the connected external device is a slave device based on the first logic signal and switches to master mode. The enable module outputs a first enable signal based on the first logic signal, enabling the power selection module to control the first power source to supply power to the power supply bus, thereby supplying power to the external device. At this time, the control module initiates communication with the slave peripheral. When the external device connected to the interface module is a master device, the interface module outputs a second-level signal. The logic module outputs a second logic signal based on the second level signal. The control module determines that the connected external device is a host device based on the second logic signal and the voltage status signal of the power supply bus, and switches to slave mode. The enable module outputs a second enable signal based on the second logic signal, so that the power supply selection module controls the power supply bus to supply power to the first power source, thereby supplying power to the control module. At this time, the control module waits for the host peripheral to initiate communication. Therefore, the USB Type-C interface circuit provided in this embodiment outputs a corresponding level signal based on the device type of the external device connected to the interface module. The logic signal output by the logic module triggers the master-slave mode switching of the control module and the path conversion of the power supply path selection module, realizing automatic control of master-slave mode switching and power supply path adaptation without relying on two dedicated OTG adapter cables. This design simplifies the process of connecting to external devices, brings convenience to user operation and device adaptation, and significantly improves the ease of use and reliability of the USB OTG function.

[0020] To illustrate the technical solution described in this application, specific embodiments are provided below.

[0021] Figure 1 A schematic block diagram of a USB Type-C interface circuit according to an embodiment of this application is shown. See also... Figure 1As shown, the USB Type-C interface circuit includes an interface module 101, a logic module 102, an enable module 103, a power path selection module 104, and a control module 105. The interface module 101 is electrically connected to the logic module 102 and the control module 105, respectively. The logic module 102 is electrically connected to the enable module 103 and the control module 105, respectively. The enable module 103 is electrically connected to the power path selection module 104. The interface module 101 is used to electrically connect to external devices (which can be referred to as peripherals) and the power supply bus VBUS, respectively. The power path selection module 104 is used to electrically connect to the power supply bus VBUS and the first power supply VCC, respectively.

[0022] Specifically, when the external device connected to interface module 101 is a slave device, interface module 101 outputs a first level signal. Logic module 102 outputs a first logic signal based on the first level signal. Control module 105 determines that the connected external device is a slave device based on the first logic signal and switches to master mode. Enable module 103 outputs a first enable signal based on the first logic signal, so that the power supply selection module controls the first power supply VCC to supply power to the power supply bus VBUS, thereby supplying power to the external device. At this time, control module 105 initiates communication with the slave peripheral. When the external device connected to interface module 101 is a master device, interface module 101 outputs a second level signal. Logic module 102 outputs a second logic signal based on the second level signal. Control module 105 determines that the connected external device is a master device based on the second logic signal and the voltage status signal of power supply bus VBUS, and switches to slave mode. Enable module 103 outputs a second enable signal based on the second logic signal, so that the power supply selection module controls the power supply bus VBUS to supply power to the first power supply VCC, thereby supplying power to control module 105. At this time, the control module 105 waits for the host peripheral to initiate communication. Therefore, the USB Type-C interface circuit provided in this embodiment outputs a corresponding level signal based on the device type of the external device connected to the interface module 101. The logic signal output by the logic module 102 triggers the master-slave mode switching of the control module 105 and the path conversion of the power supply path selection module 104, realizing automatic control of master-slave mode switching and power supply path adaptation without relying on two dedicated OTG adapter cables. This design simplifies the process of connecting to external devices, brings convenience to user operation and device adaptation, and significantly improves the ease of use and reliability of the USB OTG function.

[0023] It should be noted that when the external device is a slave device (such as a mouse or keyboard), the first level signal output by the interface module 101 can be a low-level signal. The first logic signal output by the logic module 102 based on this low-level signal is also a low-level signal, meaning USB-ID is low. The control module 105 determines that the connected external device is a slave device based on this low level and switches to master mode. Conversely, when the external device is a master device (such as a PC), the power supply bus VBUS is connected to the master's power supply (such as a 5V power supply). In this case, the voltage status signal of the power supply bus VBUS is a high-level power supply status signal. Simultaneously, the second level signal output by the interface module 101 can be a high-level signal. The second logic signal output by the logic module 102 based on this high-level signal is also a high-level signal, meaning USB-ID is high. The control module 105 determines that the connected external device is a master device based on both the high-level logic signal and the high-level power supply status signal and switches to slave mode.

[0024] It should be noted that the control module 105 establishes a data interaction link with external devices through the interface module 101, using USB 2.0 and USB 3.0 buses as transmission carriers, to realize USB standard communication functions such as command sending and data reading and writing. The logic module 102 transmits CC signals with external devices through the CC (Configuration Channel) 1 and CC2 pins of the interface module 101. This signal is not only the core basis for determining the type of external device (master / slave), but its level state (such as the external slave's CC signal being pulled down and the external master's CC signal being pulled up) also provides the basis for the logic module 102 to generate corresponding logic signals and trigger subsequent mode switching and power supply path adjustment.

[0025] The following is combined Figures 2 to 4 The specific implementation methods and working principles of each module in the USB Type-C interface circuit are described in detail.

[0026] In one embodiment of this application, such as Figure 2 As shown, the interface module 101 includes a USB Type-C interface. Specifically, the USB Type-C interface supports reversible insertion, solving the problems of traditional interfaces that require distinguishing the insertion direction and are prone to damage or malfunction due to incorrect insertion. This greatly reduces the user's operational threshold and improves the convenience of device connection. When the USB Type-C interface is inserted correctly, CC1 is activated; when inserted incorrectly, CC2 is activated. Furthermore, the USB Type-C interface is compatible with multiple generations of data transmission standards, including USB 2.0 and USB 3.0, meeting both low-speed data interaction scenarios (such as keyboard and mouse connections) and high-speed data transmission needs (such as data reading and writing to USB flash drives and external hard drives). It also supports power supply, enabling bidirectional power supply between the control module 105 and external devices via the VBUS network. Furthermore, as the mainstream interface standard for current electronic devices, the USB Type-C interface is widely used in various products such as PCs, mobile terminals, and peripherals. Adopting this interface design can significantly improve the compatibility of the circuit in this application with existing devices on the market. It can be directly connected to external devices with USB Type-C connectors, eliminating the need for OTG adapter cables, reducing connection barriers between devices, and expanding the applicable scenarios and application scope of the USB Type-C interface circuit.

[0027] In one embodiment of this application, such as Figure 2 As shown, the logic module 102 includes a first resistor R1, a second resistor R2, and a first OR gate U1. The first end of the first resistor R1 is electrically connected to the first input terminal of the interface module 101 and the first OR gate U1, respectively. The second ends of the first resistor R1 and the second ends of the second resistor R2 are both grounded. The first end of the second resistor R2 is electrically connected to the second input terminal of the interface module 101 and the first OR gate U1, respectively. The output terminal of the first OR gate U1 is electrically connected to the enable module 103 and the control module 105, respectively.

[0028] Specifically, the first resistor R1 and the second resistor R2 serve as pull-down resistors for the CC1 and CC2 pins of the interface module 101, respectively. Through logical calculations with the resistance of the external device's CC pin, the type signal (master / slave) of the external device is converted into a recognizable level signal. Specifically, as... Figure 3 As shown, when a slave device is connected, the internal CC1 / CC2 signals of the external device are connected to GND via pull-down resistors (Rd1 and Rd2). At this time, the CC1 / CC2 pin levels are pulled low, and the low-level signal is transmitted to the input of the first OR gate U1. Figure 4As shown, when the host device is connected, the external device CC1 / CC2 signals are pulled up to a 5V high level through pull-up resistors (Rp1 and Rp2), and then pulled down to GND through the first resistor R1 and the second resistor R2. At this time, the first resistor R1 and Rp2 divide the 5V voltage and transmit the divided voltage to the first input terminal of the first OR gate U1, or the second resistor R2 and Rp1 divide the 5V voltage and transmit the divided voltage to the second input terminal of the first OR gate U1.

[0029] The first OR gate U1, as the core of the logic judgment, can perform an OR operation on the level signals of the two input terminals (where the operation logic is: the first OR gate U1 will only output a low level when both input terminals are low, and the first OR gate U1 will output a high level when at least one of the two input terminals is high), and convert the states of the CC1 and CC2 pins into logic signals (first logic signal / second logic signal), and output them synchronously to the enable module 103 and the control module 105.

[0030] As can be seen from the above, this application utilizes the CC1 / CC2 signals of the USB Type-C peripheral to control the level state of the USB-ID signal, and ultimately enables the control module 105 to automatically switch between master and slave modes according to the external device. It should be noted that appropriate resistance values ​​need to be selected for the first resistor R1 and the second resistor R2 so that when the external device is the host device, the voltage level after the CC1 / CC2 voltage divider is between the lowest input high level (VIH) and the highest input withstand voltage (VImax) of the first OR gate U1. In this case, it can be considered that at least one of the input signals CC1 or CC2 of the first OR gate U1 is high (CC1 is high when the device is inserted correctly; CC2 is high when the device is inserted incorrectly). At this time, the first OR gate U1 will set the output USB-ID signal to high level.

[0031] In one embodiment of this application, such as Figure 2 As shown, the enable module 103 includes a third resistor R3 and a first switch Q1. The first end of the third resistor R3 is electrically connected to the first power supply VCC. The second end of the third resistor R3 is electrically connected to the drain of the first switch Q1 and the power supply path selection module 104, respectively. The gate of the first switch Q1 is electrically connected to the logic module 102 and the control module 105, respectively. The source of the first switch Q1 is grounded.

[0032] Specifically, the third resistor R3 acts as a pull-up resistor, used to stably pull the first enable signal transmitted to the power supply path selection module 104 to a high level of the first power supply VCC (5VCC) when the first switch Q1 is turned off. This ensures that the power supply path selection module 104 can receive a valid high-level enable signal to switch the first power supply path, allowing the first power supply VCC to supply power to the power supply bus VBUS. Simultaneously, the third resistor R3 also limits the loop current, preventing damage to the device due to excessive current when the first switch Q1 is turned on, thus providing current limiting protection. The first switch Q1, as a switching device, is used to control its on / off state according to the logic signal received at its gate (a low-level first logic signal / a high-level second logic signal). When a low-level first logic signal is received, the first switch Q1 is turned off, and the 5VCC-EN signal is pulled up to a high level through the third resistor R3 (i.e., the first enable signal is high), causing the power supply path selection module 104 to switch to the first power supply path. When a high-level second logic signal is received, the first switch Q1 is turned on, pulling the 5VCC-EN signal to a low level close to ground (i.e., the second enable signal is low), causing the power supply path selection module 104 to switch to the second power supply path, and the power supply bus can supply power to the first power source. Therefore, by using the third resistor R3 and the first switch Q1, the operating state of the power supply path selection module 104 can be precisely controlled, achieving compatibility between the power supply path and the device type of the external device.

[0033] For example, designers can select the type of the first switching transistor Q1 according to the actual situation, that is, it can be a fully controllable power device such as a metal-oxide-semiconductor field-effect transistor or an insulated-gate bipolar transistor. For example, the first switching transistor Q1 can be selected as an NMOS transistor.

[0034] In one embodiment of this application, such as Figure 2 As shown, the power supply path selection module 104 includes a power switch unit 1041 and a unidirectional conduction unit 1042. The power switch unit 1041 is electrically connected to the enable module 103. Both the power switch unit 1041 and the unidirectional conduction unit 1042 are used to be electrically connected to the first power supply VCC and the power supply bus VBUS, respectively.

[0035] Specifically, the power switch unit 1041, as a controlled power supply path, can be turned on or off according to the enable signal output by the enable module 103. When the first enable signal (high level) is received, the power switch unit 1041 is turned on, ensuring that the first power supply VCC can stably output power to the power supply bus VBUS, thereby powering the slave device; when the second enable signal (low level) is received, the power switch unit 1041 is turned off to cut off the power supply from the first power supply VCC to the power supply bus VBUS, avoiding conflict with the power supply of the master device. The unidirectional conduction unit 1042, as a unidirectional path for reverse power supply, only allows current to flow from the power supply bus VBUS to the first power supply VCC. When the power switch unit 1041 is turned off and the master device is connected, it ensures that the master device transmits power to the first power supply VCC through the power supply bus VBUS to power the control module 105 of the master control terminal, while preventing the power of the first power supply VCC from flowing back into the power supply bus VBUS, ensuring that the two power supply paths are independent and conflict-free, and achieving precise switching of power supply direction.

[0036] In one embodiment of this application, such as Figure 2 As shown, the power switch unit 1041 includes a power switch chip U2. The enable terminal EN of the power switch chip U2 is electrically connected to the enable module 103. The input terminal Vin of the power switch chip U2 is used to be electrically connected to the first power supply VCC. The output terminal Vout of the power switch chip U2 is used to be electrically connected to the power supply bus VBUS. The ground terminal GND of the power switch chip U2 is grounded.

[0037] Specifically, the power switch chip U2, as the core device of the power switch unit 1041, can be turned on or off according to the enable signal output by the enable module 103. When the enable terminal EN receives the first enable signal (high level), the internal path between the input terminal Vin and the output terminal Vout of the power switch chip U2 is turned on, transferring the power of the first power supply VCC from the input terminal Vin to the output terminal Vout, and then powering the slave device through the power supply bus VBUS. When the enable terminal EN receives the second enable signal (low level), the internal path between the input terminal Vin and the output terminal Vout of the power switch chip U2 is turned off, cutting off the connection between the first power supply VCC and the power supply bus VBUS, preventing the first power supply VCC from supplying power to the power supply bus VBUS in reverse, and ensuring that the master device can safely supply power to the first power supply VCC through the unidirectional conduction unit 1042. At the same time, the power switch chip U2 has stable current carrying capacity and fast switching response characteristics, which can adapt to the power supply requirements of external devices with different power, ensuring the reliability and safety of power supply path switching, and is a key actuator for realizing power supply direction switching in master-slave mode.

[0038] For example, the power switch chip U2 in the power switch unit 1041 can be an existing power switch. Such devices have current carrying capacity and voltage tolerance characteristics suitable for USB power supply scenarios, and can stably realize the conduction and cutoff of the path between the first power supply VCC and the power supply bus VBUS, ensuring the safety and reliability of power transmission. In one embodiment of this application, such as Figure 2 As shown, the unidirectional conduction unit 1042 includes a first diode D1, the anode of the first diode D1 is used to be electrically connected to the power supply bus VBUS, and the cathode of the first diode D1 is used to be electrically connected to the first power supply VCC.

[0039] Specifically, the first diode D1 has unidirectional conductivity, ensuring a directional power supply path between the power supply bus VBUS and the first power supply VCC while achieving reverse isolation. When the external device is the host and needs to supply power to the master control unit, the power from the power supply bus VBUS flows into the anode and out through the cathode of the first diode D1, transmitting power to the first power supply VCC to provide stable power to the control module 105 of the master control unit, ensuring the normal operation of the master control unit in slave mode. When the external device is the slave and needs power from the master control unit, the first diode D1 blocks the reverse flow of power from the first power supply VCC into the power supply bus VBUS, avoiding conflict with the forward power supply of the power switching unit 1041, and preventing potential reverse surge currents in the power supply bus VBUS from damaging the first power supply VCC and the downstream circuitry. Using the first diode D1 for directional conduction and reverse protection ensures that the two power supply paths are independent and reliable, improving the reliability of safe switching of power supply directions.

[0040] In one embodiment of this application, such as Figure 2 As shown, the control module 105 includes a control chip SOC. The control chip SOC is electrically connected to the interface module 101 via a USB 2.0 bus and a USB 3.0 bus, enabling communication with external devices. The control chip SOC is electrically connected to the logic module 102 and is used to receive logic signals. The control chip SOC is also used to receive the voltage status signal of the power supply bus VBUS and can switch between master and slave modes based on the logic signal and the voltage status signal.

[0041] It should be noted that the master-slave mode switching function executed by the control chip SOC is based on the mature USB OTG protocol in this field. Its core logic is to control the switching between master and slave modes by parsing the level state of the USB-ID according to the standard protocol. This function is a conventional technical means in this field and does not require a customized dedicated chip. It can be implemented using common general-purpose control chips that support USB OTG function (such as MCUs or processors with USB OTG controllers), so it will not increase the hardware cost or design complexity of electronic devices.

[0042] In one embodiment of this application, such as Figure 2 As shown, the USB Type-C interface circuit also includes a fourth resistor R4, a fifth resistor R5, and a sixth resistor R6. The first end of the fourth resistor R4 is electrically connected to the logic module 102, the enable module 103, and the control module 105, respectively. The second ends of the fourth resistor R4 and the sixth resistor R6 are both grounded. The first end of the fifth resistor R5 is used to be electrically connected to the power supply bus VBUS. The second end of the fifth resistor R5 is electrically connected to the control module 105 and the first end of the sixth resistor R6, respectively.

[0043] Specifically, the fourth resistor R4 acts as a pull-down resistor. When the logic signal output by the logic module 102 is in a floating state, it can stably pull it to a low level, preventing the control module 105 from misjudging the logic state or the enable module 103 from being falsely triggered due to signal fluctuations, thus ensuring the stability of signal transmission. The fifth resistor R5 and the sixth resistor R6 form a voltage divider circuit, connected in series between the power supply bus VBUS and ground. By dividing the voltage of the power supply bus VBUS proportionally through the fifth resistor R5 and the sixth resistor R6, the voltage status signal of the power supply bus VBUS is obtained and input to the control chip SOC. This allows the control chip SOC to indirectly monitor the real-time voltage status of the power supply bus VBUS, providing a voltage reference for determining the device type and mode switching.

[0044] In one embodiment of this application, such as Figure 2 As shown, the USB Type-C interface circuit also includes a transient voltage suppressor diode (TVS1) and multiple electrostatic discharge (ESD) protection devices (ESD1, ESD2, ESD3, and ESD4). The first terminal of the TVS1 is electrically connected to the VBUS power supply bus, and the second terminal of the TVS1 is grounded. The IO pins of all ESD protection devices are electrically connected to the interface module 101, and the GND pins of all ESD protection devices are grounded. Specifically, ESD1 is connected between the USB 2.0 bus and ground, ESD2 is connected between the USB 3.0 bus and ground, ESD3 is connected between CC1 and ground, and ESD4 is connected between CC2 and ground.

[0045] Specifically, the transient voltage suppressor diode TVS1 is connected between the power supply bus VBUS and ground. When the power supply bus VBUS experiences a high voltage exceeding the safe range due to external power supply anomalies (such as surges or voltage spikes), it will quickly break down and conduct, releasing the overvoltage through the grounding path. This prevents high-voltage surges from damaging power supply link devices such as the first power supply VCC and the power switching unit 1041, ensuring the stability of the power supply system. The electrostatic discharge (ESD) protection device can quickly absorb the electrostatic charge generated by external device insertion / removal or environmental friction, clamping the ESD voltage within a safe threshold. This prevents ESD from damaging the signal transmission circuit of the interface module 101 (such as the USB data pins and CC pins) and the downstream logic module 102 and control module 105, ensuring reliable transmission of data communication and device identification signals. The TVS1 transient voltage suppressor diode and multiple ESD protection devices significantly improve the anti-interference capability and lifespan of the USB Type-C interface circuit in complex electromagnetic environments.

[0046] This application also discloses an electronic device including the aforementioned USB Type-C interface circuit. Using this USB Type-C interface circuit, the electronic device can automatically identify the type of external device (host / slave) and complete master-slave mode switching via the USB Type-C interface without relying on two dedicated OTG adapter cables. It also adapts to bidirectional power supply requirements, greatly simplifying the user's peripheral connection process, avoiding functional failures due to incorrect adapter cable usage, and significantly improving the ease of use of the device. Furthermore, as a mainstream standard, the USB Type-C interface enables broad compatibility between electronic devices and PCs, mobile terminals, and various external peripherals, significantly expanding the device's connectivity and application scenarios, and improving the market adaptability and user experience of the electronic device.

[0047] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A USB Type-C interface circuit, characterized in that, It includes an interface module, a logic module, an enable module, a power path selection module, and a control module. The interface module is electrically connected to the logic module and the control module, the logic module is electrically connected to the enable module and the control module, the enable module is electrically connected to the power path selection module, the interface module is used to electrically connect to external devices and the power supply bus, and the power path selection module is used to electrically connect to the power supply bus and the first power source. When the external device is a slave device, the interface module outputs a first level signal to the logic module; the logic module is used to output a first logic signal to the control module and the enable module respectively according to the first level signal; the control module is used to switch to master mode according to the first logic signal; the enable module is used to output a first enable signal to the power supply path selection module according to the first logic signal; the power supply path selection module is used to control the first power supply to supply power to the power supply bus according to the first enable signal; When the external device is a host device, the interface module outputs a second level signal to the logic module; the logic module is used to output a second logic signal to the control module and the enable module respectively according to the second level signal; the control module is used to switch to slave mode according to the second logic signal and the voltage status signal of the power supply bus; the enable module is used to output a second enable signal to the power supply path selection module according to the second logic signal; the power supply path selection module is used to control the power supply bus to supply power to the first power source according to the second enable signal.

2. The USB Type-C interface circuit according to claim 1, characterized in that, The logic module includes a first resistor, a second resistor, and a first OR gate. The first end of the first resistor is electrically connected to the interface module and the first input of the first OR gate, respectively. The second ends of the first resistor and the second resistor are both grounded. The first end of the second resistor is electrically connected to the interface module and the second input of the first OR gate, respectively. The output of the first OR gate is electrically connected to the enable module and the control module, respectively.

3. The USB Type-C interface circuit according to claim 1, characterized in that, The enabling module includes a third resistor and a first switching transistor. The first end of the third resistor is electrically connected to the first power supply, and the second end of the third resistor is electrically connected to the drain of the first switching transistor and the power supply path selection module. The gate of the first switching transistor is electrically connected to the logic module and the control module, and the source of the first switching transistor is grounded.

4. The USB Type-C interface circuit according to claim 1, characterized in that, The power supply path selection module includes a power switch unit and a unidirectional conduction unit. The power switch unit is electrically connected to the enable module. Both the power switch unit and the unidirectional conduction unit are used to be electrically connected to the first power supply and the power supply bus, respectively. The power switch unit is configured to be turned on according to the first enable signal, so that the first power supply supplies power to the power supply bus through the power switch unit; the power switch unit is also configured to be turned off according to the second enable signal, so that the power supply bus supplies power to the first power supply through the unidirectional conduction unit.

5. The USB Type-C interface circuit according to claim 4, characterized in that, The power switch unit includes a power switch chip. The enable terminal of the power switch chip is electrically connected to the enable module. The input terminal of the power switch chip is used to be electrically connected to the first power supply. The output terminal of the power switch chip is used to be electrically connected to the power supply bus.

6. The USB Type-C interface circuit according to claim 4, characterized in that, The unidirectional conduction unit includes a first diode, the anode of which is electrically connected to the power supply bus, and the cathode of which is electrically connected to the first power source.

7. The USB Type-C interface circuit according to any one of claims 1-6, characterized in that, The USB Type-C interface circuit further includes a fourth resistor, a fifth resistor, and a sixth resistor. The first end of the fourth resistor is electrically connected to the logic module, the enable module, and the control module, respectively. The second ends of the fourth resistor and the sixth resistor are both grounded. The first end of the fifth resistor is used to electrically connect to the power supply bus. The second end of the fifth resistor is electrically connected to the control module and the first end of the sixth resistor, respectively.

8. The USB Type-C interface circuit according to any one of claims 1-6, characterized in that, The USB Type-C interface circuit also includes a transient suppression diode, the first end of which is electrically connected to the power supply bus, and the second end of which is grounded.

9. The USB Type-C interface circuit according to any one of claims 1-6, characterized in that, The USB Type-C interface circuit also includes multiple electrostatic discharge (ESD) protection devices. The IO pins of all the ESD protection devices are electrically connected to the interface module, and the GND pins of all the ESD protection devices are grounded.

10. An electronic device, characterized in that, Includes the USB Type-C interface circuit as described in any one of claims 1-9.