Functional module and terminal device

By designing control and switching circuits in the functional module, the USB interface can automatically switch modes when different devices are plugged in, solving the problem that the USB debugging interface cannot support the master device mode and achieving OTG function compatibility.

CN115344519BActive Publication Date: 2026-05-08FIBOCOM WIRELESS
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
FIBOCOM WIRELESS
Filing Date
2022-08-05
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

After the existing functional modules expand the USB interface through the HUB, the USB debugging interface can only support slave device mode and cannot realize OTG function in master device mode.

Method used

Design a functional module comprising a module body, a switching circuit, a first USB interface, a second USB interface, and a control circuit. Through the cooperation of the control circuit and the switching circuit, the first USB interface operates in slave mode when a master device is inserted and in master mode when a slave device is inserted, supporting OTG functionality.

Benefits of technology

It enables automatic switching between master and slave modes for the USB interface in the functional module, solves the problem that the USB debugging interface cannot implement OTG function, and does not require changes to the software code, making it easy to be compatible with the main body of the shipped module.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115344519B_ABST
    Figure CN115344519B_ABST
Patent Text Reader

Abstract

The application relates to a function module and a terminal device, and relates to the communication field. The function module comprises a module main body, a switching circuit, a first USB interface, a second USB interface and a control circuit; a voltage detection end of the first USB interface is connected with a control end of the switching circuit and a first input end of the control circuit, a device detection end of the first USB interface is connected with a second input end of the control circuit, and a mode control end of the control circuit is connected with a mode switching end of the module main body; wherein when a host device is inserted into the first USB interface, the control circuit controls the module main body to work in a slave device mode, and the switching circuit is switched to the first USB interface; when a slave device is inserted into the first USB interface, the control circuit controls the module main body to work in a host device mode, and the switching circuit is switched to the first USB interface. The application is used to solve the problem that the OTG function cannot be realized by the USB debugging interface when the function module is expanded with the USB interface through the HUB.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communications, and more particularly to a functional module and a terminal device. Background Technology

[0002] Currently, the functional module needs to connect to many USB (Universal Serial Bus) devices, such as cameras and displays. Since the functional module itself only has one USB interface and can only be used as either a host or a device at the same time, a hub is needed to expand the USB interface.

[0003] Because the USB protocol specifies that only one master device can connect to multiple slave devices, and not one slave device can connect to multiple master devices, the multiple USB ports extended by the hub can only connect to slave devices and operate in host mode. Currently, due to structural limitations or inherent USB resource constraints, many functional modules place the USB ports extended by the hub inside the functional module itself, rather than making them available to users outside the functional module. The functional module is exposed externally, and users can only use the external USB debugging interface. Therefore, the external USB debugging interface must support automatic switching between master and slave modes, i.e., OTG (On-The-Go) functionality.

[0004] However, currently, even when the functional module expands the USB interface through a HUB, the USB debugging interface can only support slave mode and cannot support master mode. Summary of the Invention

[0005] This application provides a functional module and a terminal device to solve the problem that the USB debugging interface cannot realize OTG function when the functional module expands the USB interface through a HUB.

[0006] In a first aspect, embodiments of this application provide a functional module, including a module body, a switching circuit, a first USB interface, a second USB interface, and a control circuit;

[0007] The USB connection terminal of the module body is connected to the fixed connection terminal of the switching circuit. The first switching terminal and the second switching terminal of the switching circuit are respectively connected to the USB connection terminal of the first USB interface and the USB connection terminal of the second USB interface. The voltage detection terminal of the first USB interface is connected to the control terminal of the switching circuit and the first input terminal of the control circuit. The device detection terminal of the first USB interface is connected to the second input terminal of the control circuit. The mode control terminal of the control circuit is connected to the mode switching terminal of the module body.

[0008] Specifically, when a host device is inserted into the first USB interface, the control circuit controls the module body to operate in slave device mode, and the switching circuit switches to the first USB interface; when a slave device is inserted into the first USB interface, the control circuit controls the module body to operate in host device mode, and the switching circuit switches to the first USB interface.

[0009] Optionally, when a host device is inserted into the first USB interface, the voltage detection terminal is at a high level, the device detection terminal is at a high level, the mode switching terminal is at a high level, and the module body operates in slave device mode; when a slave device is inserted into the first USB interface, the voltage detection terminal is at a high level, the device detection terminal is at a low level, the mode switching terminal is at a low level, and the module body operates in master device mode.

[0010] Optionally, when the first USB interface is floating, the control circuit controls the module body to work in master device mode, and the switching circuit switches to the second USB interface.

[0011] Optionally, when the first USB interface is floating, the voltage detection terminal is at a low level, the device detection terminal is at a high level, the mode switching terminal is at a low level, and the module body operates in master device mode.

[0012] Optionally, the power output terminal of the control circuit is connected to the voltage detection terminal of the first USB interface;

[0013] Specifically, when the device detection terminal is at a low level, the power output terminal is at a high level.

[0014] Optionally, the control circuit includes a non-inverting circuit A, a non-inverting circuit B, an OTG power supply, and an AND operation circuit;

[0015] The voltage detection terminal of the first USB interface is connected to the input terminal of the in-phase circuit B, the output terminal of the in-phase circuit B is connected to the first input terminal of the AND operation circuit, the device detection terminal of the first USB interface is connected to the input terminal of the in-phase circuit A, the output terminal of the in-phase circuit A is connected to the second input terminal of the AND operation circuit, the output terminal of the AND operation circuit is connected to the mode switching terminal of the module body, the control terminal of the in-phase circuit A is connected to the enable terminal of the OTG power supply, and the output terminal of the OTG power supply is connected to the voltage detection terminal of the first USB interface.

[0016] Optionally, the in-phase circuit A includes a first transistor and a second transistor, and the in-phase circuit B includes a third transistor and a fourth transistor;

[0017] The device detection terminal of the first USB interface is connected to the base of the first transistor, the emitter of the first transistor is grounded, the collector of the first transistor is connected to the base of the second transistor, the emitter of the second transistor is grounded, the collector of the second transistor is connected to the second input terminal of the AND operation circuit, the collector of the first transistor is connected to the enable terminal of the OTG power supply, the voltage detection terminal of the first USB interface is connected to the base of the third transistor, the emitter of the third transistor is grounded, the collector of the third transistor is connected to the base of the fourth transistor, the emitter of the fourth transistor is grounded, and the collector of the fourth transistor is connected to the first input terminal of the AND operation circuit.

[0018] Optionally, the functional module further includes a normally high circuit for the device detection end;

[0019] The output terminal of the normally high circuit of the device detection terminal is connected to the device detection terminal of the first USB interface;

[0020] The normally high circuit of the device detection terminal is used to output a high level to the device detection terminal of the first USB interface when the first USB interface is floating.

[0021] Optionally, the voltage detection terminal of the first USB interface is connected to the voltage detection terminal of the module body;

[0022] The module body is used to communicate with the device inserted into the first USB interface when the voltage detection terminal of the module body is at a high level.

[0023] Secondly, embodiments of this application provide a terminal device including the functional module described in the first aspect.

[0024] Compared with the prior art, the technical solution provided in this application has the following advantages: In this application embodiment, when a master device is inserted into the first USB interface, the control circuit controls the module body to work in slave device mode, and the switching circuit switches to the first USB interface. The master device can communicate with the module body through the first USB interface to debug the module body. The master device can be a PC (Personal Computer) or other devices. When a slave device is inserted into the first USB interface, the control circuit controls the module body to work in master device mode, and the switching circuit switches to the first USB interface. The slave device can communicate with the module body through the first USB interface, and the module body can recognize the slave device inserted into the USB debugging interface. The slave device can be a USB flash drive or other devices. This achieves the automatic switching function between master device mode and slave device mode for the first USB interface, solving the problem that the USB debugging interface cannot realize OTG function when the functional module expands the USB interface through a HUB. Furthermore, by implementing it through circuitry, there is no need to change the software code of the USB part, which facilitates compatibility with previously shipped module bodies and reduces the management pressure of software versions. Attached Figure Description

[0025] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0026] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0027] Figure 1 This is a schematic diagram of the structure of a functional module in the prior art;

[0028] Figure 2 This is a schematic diagram of the structure of the functional module in the embodiments of this application;

[0029] Figure 3 This is a schematic diagram of the structure of a functional module in a specific embodiment of this application;

[0030] Figure 4 This is a schematic diagram of the structure of a functional module in a specific embodiment of this application;

[0031] Figure 5 This is a schematic diagram of the structure of a functional module in a specific embodiment of this application. Detailed Implementation

[0032] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0033] In this embodiment, the functional module can be a wireless communication module or other types of modules. The wireless communication module can be any one of 2G communication modules, 3G communication modules, 4G communication modules, 5G communication modules, NB-IoT communication modules, etc.

[0034] The inventors, through analysis of functional modules in existing technologies, discovered that, for example... Figure 1 As shown, the functional module in the prior art includes a module body, a switching circuit, a USB debugging interface, a hub, a hub expansion interface, and a non-inverting circuit B; the hub is connected to the hub expansion interface.

[0035] The USB connection terminal of the module body is connected to the fixed connection terminal of the switching circuit. The first switching terminal and the second switching terminal of the switching circuit are respectively connected to the USB connection terminal of the USB debugging interface and the USB connection terminal of the hub. The voltage detection terminal of the USB debugging interface is connected to the control terminal of the switching circuit and the input terminal of the in-phase circuit B. The output terminal of the in-phase circuit B is connected to the mode switching terminal of the module body.

[0036] Specifically, when the host device is inserted into the USB debugging interface, the main body of the in-phase circuit B controls the main body to work in slave device mode, and the switching circuit switches to the USB debugging interface; when the USB debugging interface is left floating, the main body of the in-phase circuit B controls the main body to work in master device mode, and the switching circuit switches to the hub.

[0037] When a host device is inserted into the USB debugging interface, the in-phase circuit B controls the module to operate in slave mode, and the switching circuit switches to USB debugging interface mode. The host device can communicate with the module through the USB debugging interface to debug the module. The host device can be a PC or other similar device. When the USB debugging interface is not in use, the in-phase circuit B controls the module to operate in master mode, and the switching circuit switches to hub mode. Devices inserted into the hub expansion interface can communicate with the module through the hub expansion interface, and the module can recognize the devices inserted into the hub expansion interface. Devices inserted into the hub expansion interface can be USB flash drives, mice, or other similar devices.

[0038] However, currently, even when the functional module expands the USB interface through a HUB, the USB debugging interface can only support slave mode and cannot support master mode.

[0039] To address the issue that the USB debugging interface cannot implement OTG functionality when the functional module extends the USB interface via a HUB, this application provides a functional module, such as... Figure 2 As shown, the functional module includes a module body, a switching circuit, a first USB interface, a second USB interface, and a control circuit.

[0040] The USB connection terminal USB1 of the module body is connected to the fixed connection terminal USB2 of the switching circuit. The first switching terminal USB3 and the second switching terminal USB5 of the switching circuit are respectively connected to the USB connection terminal USB4 of the first USB interface and the USB connection terminal USB6 of the second USB interface. The voltage detection terminal VBUS of the first USB interface is connected to the control terminal S of the switching circuit and the first input terminal of the control circuit. The device detection terminal CC of the first USB interface is connected to the second input terminal of the control circuit. The mode control terminal of the control circuit is connected to the mode switching terminal ID of the module body.

[0041] Specifically, when a master device is inserted into the first USB interface, the control circuit controls the main body of the module to operate in slave device mode, and the switching circuit switches to the first USB interface; when a slave device is inserted into the first USB interface, the control circuit controls the main body of the module to operate in master device mode, and the switching circuit switches to the first USB interface.

[0042] In this context, "module main body operating in slave mode" means that the module main body acts as a slave device and can communicate with the master device. "Module main body operating in master mode" means that the module main body acts as a master device and can communicate with the slave device.

[0043] In this embodiment, when a master device is inserted into the first USB interface, the control circuit controls the module body to operate in slave mode, and the switching circuit switches to the first USB interface. The master device can communicate with the module body through the first USB interface to debug the module body. The master device can be a PC (Personal Computer) or similar device. When a slave device is inserted into the first USB interface, the control circuit controls the module body to operate in master mode, and the switching circuit switches to the first USB interface. The slave device can communicate with the module body through the first USB interface, and the module body can recognize the slave device inserted into the USB debugging interface. The slave device can be a USB flash drive or similar device. This achieves automatic switching between master and slave modes for the first USB interface, solving the problem that the USB debugging interface cannot implement OTG functionality when the functional module expands the USB interface through a HUB. Furthermore, this circuit implementation eliminates the need to modify the USB software code, facilitating compatibility with previously shipped module bodies and reducing the management burden of software versions.

[0044] In one specific embodiment, when a master device is inserted into the first USB interface, the voltage detection terminal VBUS is at a high level, the device detection terminal CC is at a high level, the mode switching terminal ID is at a high level, and the module body operates in slave device mode; when a slave device is inserted into the first USB interface, the voltage detection terminal VBUS is at a high level, the device detection terminal CC is at a low level, the mode switching terminal ID is at a low level, and the module body operates in master device mode.

[0045] When the voltage detection terminal VBUS is high, the switching circuit switches to the first USB interface.

[0046] The state of the mode switching terminal is determined by the voltage detection terminal and the device detection terminal. When a master device is inserted into the first USB interface, the mode switching terminal is at a high level and the main body of the module works in slave mode. When a slave device is inserted into the first USB interface, the mode switching terminal is at a low level and the main body of the module works in master mode, thus realizing the automatic switching function of the first USB interface between master mode and slave mode.

[0047] In one specific embodiment, when the first USB interface is left unconnected, the control circuit controls the main body of the control module to work in master device mode, and the switching circuit switches to the second USB interface.

[0048] The second USB interface may include a hub and a hub expansion interface.

[0049] When the first USB port is left unconnected, the control circuit controls the main body of the module to work in master mode, and the switching circuit switches to the second USB port. The slave device inserted into the second USB port can communicate with the main body of the module through the second USB port. The main body of the module can recognize the slave device inserted into the second USB port. The slave device inserted into the second USB port can be a USB flash drive, mouse, or other devices.

[0050] In one specific embodiment, when the first USB interface is floating, the voltage detection terminal VBUS is at a low level, the device detection terminal CC is at a high level, the mode switching terminal ID is at a low level, and the module body works in master device mode.

[0051] When the voltage detection terminal VBUS is low, the switching circuit switches to the second USB interface.

[0052] The state of the mode switching terminal is determined by the voltage detection terminal and the device detection terminal. When the first USB interface is floating, the mode switching terminal is at a low level, and the main body of the module works in the master device mode, which does not affect the normal use of the master device mode of the second USB interface.

[0053] In one specific embodiment, the power output terminal of the control circuit is connected to the voltage detection terminal VBUS of the first USB interface; wherein, when the device detection terminal CC is at a low level, the power output terminal is at a high level.

[0054] When a slave device is inserted into the first USB port, its CC pin is grounded, causing the device detection pin (CC) of the first USB port to go low. Since the power output of the control circuit is high when CC is low, and this power output is connected to the voltage detection pin (VBUS) of the first USB port, the control circuit will make VBUS high. With VBUS high, CC low, and the mode switching pin (ID) low, the module operates in master mode. If the control circuit fails to make VBUS high when the slave device is inserted into the first USB port, VBUS will go low, the switching circuit will switch to the second USB port, and the slave device inserted into the first USB port will be unable to communicate with the module.

[0055] In one specific embodiment, such as Figure 3 As shown, the control circuit includes non-inverting circuit A, non-inverting circuit B, OTG power supply, and AND operation circuit;

[0056] The voltage detection terminal VBUS of the first USB interface is connected to the input terminal of the in-phase circuit B. The output terminal of the in-phase circuit B is connected to the first input terminal of the AND operation circuit. The device detection terminal CC of the first USB interface is connected to the input terminal of the in-phase circuit A. The output terminal of the in-phase circuit A is connected to the second input terminal of the AND operation circuit. The output terminal of the AND operation circuit is connected to the mode switching terminal ID of the module body. The control terminal of the in-phase circuit A is connected to the enable terminal EN1 of the OTG power supply. The output terminal of the OTG power supply is connected to the voltage detection terminal VBUS of the first USB interface.

[0057] The non-inverting circuit A ensures that the signal output to the second input terminal of the AND-AND circuit is in phase with the second control signal input through the device detection terminal CC of the first USB interface. Specifically, when the second control signal is high, the signal output from non-inverting circuit A to the second input terminal of the AND-AND circuit is high; when the second control signal is low, the signal output from non-inverting circuit A to the second input terminal of the AND-AND circuit is low. Furthermore, non-inverting circuit A also functions as a voltage converter. The non-inverting circuit B ensures that the signal output to the first input terminal of the AND-AND circuit is in phase with the first control signal input through the voltage detection terminal VBUS of the first USB interface. Specifically, when the first control signal is high, the signal output from non-inverting circuit B to the first input terminal of the AND-AND circuit is high; when the first control signal is low, the signal output from non-inverting circuit B to the first input terminal of the AND-AND circuit is low. Furthermore, non-inverting circuit B also functions as a voltage converter.

[0058] Furthermore, when the device is plugged into the first USB interface, the device detection terminal CC is at a low level, the control terminal of the in-phase circuit A enables the OTG power supply, the output terminal of the OTG power supply is at a high level, the voltage detection terminal VBUS is at a high level, the switching circuit switches to the first USB interface, and the module works in master device mode.

[0059] In one specific embodiment, the non-inverting circuit A includes a first transistor and a second transistor, and the non-inverting circuit B includes a third transistor and a fourth transistor;

[0060] The device detection terminal of the first USB interface is connected to the base of the first transistor, the emitter of the first transistor is grounded, the collector of the first transistor is connected to the base of the second transistor, the emitter of the second transistor is grounded, the collector of the second transistor is connected to the second input terminal of the operational circuit, the collector of the first transistor is connected to the enable terminal of the OTG power supply, the voltage detection terminal of the first USB interface is connected to the base of the third transistor, the emitter of the third transistor is grounded, the collector of the third transistor is connected to the base of the fourth transistor, the emitter of the fourth transistor is grounded, and the collector of the fourth transistor is connected to the first input terminal of the operational circuit.

[0061] In one specific embodiment, the functional module further includes a normally high circuit for the device detection end;

[0062] The output of the normally high circuit of the device detection terminal is connected to the device detection terminal of the first USB interface;

[0063] The device detection terminal normally high circuit is used to output a high level to the device detection terminal of the first USB interface when the first USB interface is floating.

[0064] When the first USB interface is floating, the device detection terminal of the first USB interface is controlled to be at a high level by the device detection terminal normally high circuit. When the master device is inserted into the first USB interface, the device detection terminal of the first USB interface will also remain at a high level. Only when the slave device is inserted into the first USB interface will the CC pin of the first USB interface become low level because the CC pin of the inserted slave device is grounded.

[0065] In one specific embodiment, such as Figure 4 As shown, the normally high circuit of the equipment detection terminal includes a pull-up power supply, a fuse FU, and a diode D;

[0066] The output terminal of the pull-up power supply is connected to the first terminal of the fuse FU, the second terminal of the fuse FU is connected to the anode of the diode D, and the cathode of the diode D is connected to the device detection terminal CC of the first USB interface.

[0067] Diode D prevents current from flowing into the pull-up power supply when the host device is plugged into the first USB port, thus avoiding damage to the pull-up power supply.

[0068] In one specific embodiment, such as Figure 5 As shown, the voltage detection terminal VBUS of the first USB interface is connected to the voltage detection terminal VBUS1 of the module body;

[0069] The module body is used to communicate with the device inserted into the first USB interface when the voltage detection terminal of the module body is at a high level.

[0070] Based on the same concept, this application provides a terminal device, including the functional module provided in this application. The specific implementation of the functional module can be found in the foregoing content, and the repeated parts will not be described again.

[0071] The terminal device can be a mobile terminal or a smart terminal. Specifically, a mobile terminal can be at least one of a mobile phone, tablet computer, or laptop computer; a smart terminal can be a smart car, smartwatch, shared bicycle, smart locker, or other terminal containing a functional module; the functional module can be a wireless communication module or other types of modules, specifically any one of a 2G communication module, 3G communication module, 4G communication module, 5G communication module, or NB-IoT communication module.

[0072] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0073] The above description is merely a specific embodiment of the present invention, enabling those skilled in the art to understand or implement the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features claimed herein.

Claims

1. A functional module, characterized in that, It includes the module body, switching circuit, first USB interface, second USB interface, and control circuit; The USB connection terminal of the module body is connected to the fixed connection terminal of the switching circuit. The first switching terminal and the second switching terminal of the switching circuit are respectively connected to the USB connection terminal of the first USB interface and the USB connection terminal of the second USB interface. The voltage detection terminal of the first USB interface is connected to the control terminal of the switching circuit and the first input terminal of the control circuit. The device detection terminal of the first USB interface is connected to the second input terminal of the control circuit. The mode control terminal of the control circuit is connected to the mode switching terminal of the module body. Specifically, when a host device is inserted into the first USB interface, the control circuit controls the module body to operate in slave device mode, and the switching circuit switches to the first USB interface; when a slave device is inserted into the first USB interface, the control circuit controls the module body to operate in host device mode, and the switching circuit switches to the first USB interface. When the first USB interface is floating, the control circuit controls the module body to work in master device mode, the switching circuit switches to the second USB interface, the voltage detection terminal is low level, the device detection terminal is high level, and the mode switching terminal is low level.

2. The functional module according to claim 1, characterized in that, When a master device is inserted into the first USB interface, the voltage detection terminal is at a high level, the device detection terminal is at a high level, the mode switching terminal is at a high level, and the module body operates in slave mode; when a slave device is inserted into the first USB interface, the voltage detection terminal is at a high level, the device detection terminal is at a low level, the mode switching terminal is at a low level, and the module body operates in master mode.

3. The functional module according to claim 1, characterized in that, The power output terminal of the control circuit is connected to the voltage detection terminal of the first USB interface; Specifically, when the device detection terminal is at a low level, the power output terminal is at a high level.

4. The functional module according to claim 3, characterized in that, The control circuit includes in-phase circuit A, in-phase circuit B, OTG power supply, and AND operation circuit. The voltage detection terminal of the first USB interface is connected to the input terminal of the in-phase circuit B, the output terminal of the in-phase circuit B is connected to the first input terminal of the AND operation circuit, the device detection terminal of the first USB interface is connected to the input terminal of the in-phase circuit A, the output terminal of the in-phase circuit A is connected to the second input terminal of the AND operation circuit, the output terminal of the AND operation circuit is connected to the mode switching terminal of the module body, the control terminal of the in-phase circuit A is connected to the enable terminal of the OTG power supply, and the output terminal of the OTG power supply is connected to the voltage detection terminal of the first USB interface.

5. The functional module according to claim 4, characterized in that, The in-phase circuit A includes a first transistor and a second transistor, and the in-phase circuit B includes a third transistor and a fourth transistor; The device detection terminal of the first USB interface is connected to the base of the first transistor, the emitter of the first transistor is grounded, the collector of the first transistor is connected to the base of the second transistor, the emitter of the second transistor is grounded, the collector of the second transistor is connected to the second input terminal of the AND operation circuit, the collector of the first transistor is connected to the enable terminal of the OTG power supply, the voltage detection terminal of the first USB interface is connected to the base of the third transistor, the emitter of the third transistor is grounded, the collector of the third transistor is connected to the base of the fourth transistor, the emitter of the fourth transistor is grounded, and the collector of the fourth transistor is connected to the first input terminal of the AND operation circuit.

6. The functional module according to claim 1, characterized in that, The functional module also includes a normally high circuit for the device detection end; The output terminal of the normally high circuit of the device detection terminal is connected to the device detection terminal of the first USB interface; The normally high circuit of the device detection terminal is used to output a high level to the device detection terminal of the first USB interface when the first USB interface is floating.

7. The functional module according to claim 1, characterized in that, The voltage detection terminal of the first USB interface is connected to the voltage detection terminal of the module body; The module body is used to communicate with the device inserted into the first USB interface when the voltage detection terminal of the module body is at a high level.

8. A terminal device, characterized in that, Includes the functional module described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Circuit supporting OTG function, terminal and control method of circuit

    CN107480086A

  • Serial port communication switching system

    CN214896592U