CN110008163A - Double ports TYPE-C time-sharing multiplexing method and equipment based on single USB physical interface - Google Patents
Double ports TYPE-C time-sharing multiplexing method and equipment based on single USB physical interface Download PDFInfo
- Publication number
- CN110008163A CN110008163A CN201910272900.4A CN201910272900A CN110008163A CN 110008163 A CN110008163 A CN 110008163A CN 201910272900 A CN201910272900 A CN 201910272900A CN 110008163 A CN110008163 A CN 110008163A
- Authority
- CN
- China
- Prior art keywords
- switch
- usb
- interface
- type
- time
- Prior art date
- Legal status (The legal status 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 status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/40—Bus structure
- G06F13/4004—Coupling between buses
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/42—Bus transfer protocol, e.g. handshake; Synchronisation
- G06F13/4282—Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Information Transfer Systems (AREA)
Abstract
The embodiment of the invention discloses a kind of double ports TYPE-C time-sharing multiplexing methods based on single USB physical interface, comprising: first switch is arranged in the first USB interface with TYPE-C function;Second switch is set in the secondary USB interface for not having TYPE-C function;The main switch switched between the first switch and the second switch is set, and the main switch is connect with USB TYPE-C controller;And the control instruction based on user, it controls the USB TYPE-C controller and the first switch or second switch carries out time-sharing multiplex connection.By the scheme of the application, solve the problems, such as not supporting the port multiple USB TYPE-C based on single USB physical interface, while saving the cost of product.
Description
Technical field
The present invention relates to communication interface technique fields, more particularly to double ports TYPE-C based on single USB physical interface
Time-sharing multiplexing method and equipment.
Background technique
Many smart machines have the demand for supporting double-USB interface at present.In only USB physical interface module
On SOC, expanding the multiple USB interfaces come if necessary is that same type (such as all as USB Host), is gone back at this time
It can be extended by USB Hub.But under certain more special application scenarios, user needs to realize double USB ports: wherein
One is only supported Host, is used for the USB such as carry u-disk from equipment;Another is as Device (or OTG), for charging
Or as Gadget equipment.Regulation based on usb protocol, single USB physical interface cannot be used as Host/Device, institute simultaneously
Cannot achieve the demand of double-USB interface using USB Hub at this time, to be unable to satisfy the demand of user.
In the hardware structure of certain high-end SOC, default just supports double USB physical interfaces, it is achieved that double-USB interface
Without too big technical bottleneck.But in the hardware structure of most of SOC, default is only capable of supporting a USB as OTG
Physical interface module just needs to realize using some special technologies at this time to meet the needs of users.
Summary of the invention
In view of this, to provide a kind of double ports TYPE-C timesharing based on single USB physical interface multiple for the embodiment of the present invention
With method and apparatus, at least part of solution problems of the prior art.
In a first aspect, the embodiment of the invention provides a kind of double ports TYPE-C timesharing based on single USB physical interface
Multiplexing method, comprising:
First switch is set in the first USB interface with TYPE-C function;
Second switch is set in the secondary USB interface for not having TYPE-C function;
The main switch switched between the first switch and the second switch, the main switch and USB are set
The connection of TYPE-C controller;And
Control instruction based on user, control the USB TYPE-C controller and the first switch or second switch into
The connection of row time-sharing multiplex.
A kind of specific implementation according to an embodiment of the present invention when system electrification, sets second switch to disconnect shape
State, switches to the first USB interface access for main switch, and first switch is switched to the first USB interface access.
A kind of specific implementation according to an embodiment of the present invention, when the secondary USB interface is inserted into equipment, second
The default pin of USB interface is dragged down by mechanical switch, the insertion of the interruption identification equipment by presetting general-purpose interface.
A kind of specific implementation according to an embodiment of the present invention, when the secondary USB interface is inserted into equipment, control the
One switch is in an off state, and control main switch switches to secondary USB interface access.
A kind of specific implementation according to an embodiment of the present invention, the method also includes: control second switch, which is in, leads
Logical state, is switched to Host mode for the state of USB physical layer, controls power module by configuring general-purpose interface, gives the 2nd USB
Interface provides 5v power supply.
Second aspect, the embodiment of the invention also provides a kind of double ports TYPE-C based on single USB physical interface point
When multiplexing equipment, comprising:
First switch, the first switch are connect with the first USB interface with TYPE-C function;
Second switch, the second switch are connect with the secondary USB interface for not having TYPE-C function;
Main switch, the main switch control and execute handover operation between the first switch and the second switch, and the master opens
Pass is connect with USB TYPE-C controller;
Controller, control instruction of the controller based on user control the USB TYPE-C controller and described the
One switch or second switch carry out time-sharing multiplex connection.
A kind of specific implementation according to an embodiment of the present invention when system electrification, sets second switch to disconnect shape
State, switches to the first USB interface access for main switch, and first switch is switched to the first USB interface access.
A kind of specific implementation according to an embodiment of the present invention, when the secondary USB interface is inserted into equipment, second
The default pin of USB interface is dragged down by mechanical switch, the insertion of the interruption identification equipment by presetting general-purpose interface.
A kind of specific implementation according to an embodiment of the present invention, the controller are used for: when the secondary USB interface is inserted
When entering equipment, control first switch is in an off state, and control main switch switches to secondary USB interface access.
A kind of specific implementation according to an embodiment of the present invention, the controller are also used to: control second switch is in
The state of USB physical layer is switched to Host mode by state, is controlled power module by configuring general-purpose interface, is given second
USB interface provides 5v power supply.
Using the technical solution of the double-USB interface time-sharing multiplex in invention, solve to be based on single USB physical interface
The problem of cannot realizing while supporting double TYPE-C interfaces.From the angle of technology, does not need to change other hardware platform into or adopt
With additional third party's USB physical interface, hardware cost can be significantly reduced and reduce project risk.With following beneficial to effect
Fruit:
(1) hardware structure based on existing SOC can be realized, and project process/R&D risk is convenient for control;
(2) it does not need replacement hardware platform or purchases new IC, convenient for control hardware cost.It solves based on single USB
Physical interface can not support the problem of multiple ports USB TYPE-C, while save the cost of product.
Detailed description of the invention
In order to illustrate the technical solution of the embodiments of the present invention more clearly, below will be to needed in the embodiment attached
Figure is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for this field
For those of ordinary skill, without creative efforts, it can also be obtained according to these attached drawings other attached drawings.
Fig. 1 is the hardware structural diagram having in the prior art there are two USB interface;
Fig. 2 is a kind of double ports TYPE-C time-sharing multiplex based on single USB physical interface provided in an embodiment of the present invention
The flow diagram of method;
Fig. 3 is a kind of double ports TYPE-C time-sharing multiplex based on single USB physical interface provided in an embodiment of the present invention
The system construction drawing of method.
Specific embodiment
The embodiment of the present invention is described in detail with reference to the accompanying drawing.
It will be appreciated that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.Base
Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts it is all its
Its embodiment, shall fall within the protection scope of the present invention.
Invention is to design to realize based on USB Type-C, but since usb protocol is backward compatible, so
The design philosophy of invention can be adapted for existing all usb protocols.
Double-USB interface application scenarios:
1, USB1 just can connect on Host as Device by USB line, for example be connected to PC Host by USB line
On, it is charged by PC Host, or using USB Device as Gadget equipment.On certain more high-end hardware platforms,
If USB physical interface support OTG function, USB1 can also be used as OTG, can between Host/Device switching at runtime.
2, USB2 can be directly connected to u-disk/usb-mouse etc. from equipment as Host.
Although can realize that double USB are supported using mode shown in FIG. 1 in the prior art, due to needing two
USB physical interface all supports TYPE-C, will increase the cost of system.
Referring to fig. 2 and Fig. 3, the embodiment of the invention provides a kind of double ports TYPE-C based on single USB physical interface
Time-sharing multiplexing method, comprising:
First switch is arranged in the first USB interface with TYPE-C function in S101.
First USB interface is usually connect with USB controller, for this purpose, increase first switch between, first switch
It can be controlled by the general-purpose interface of chip.
Second switch is arranged in the secondary USB interface for not having TYPE-C function in S102.
Secondary USB interface is connect with USB controller, increases second switch between, and second switch can pass through core
The general-purpose interface of piece is controlled.
The main switch switched between the first switch and the second switch, the main switch and USB is arranged in S103
The connection of TYPE-C controller;
First switch and the second switch only one in an ON state, thus be arranged main switch come control first switch or
Second switch is switched on or off state.
S104, the control instruction based on user control the USB TYPE-C controller and the first switch or second
Switch carries out time-sharing multiplex connection.
Invention realizes double TYPE-C interface time sharing multiplexes to solve the problems, such as to be based on single USB physical interface:
It is added to multiple switch in the hardware design, realizes the physical isolation in double channels USB, passes through multiple general-purpose interfaces on software
(GPIO) mode of respective switch is controlled respectively, is realized opening/closing for physical USB channel, is simulated pulling out for USB device
Out/insertion operation, so that the state machine logic to USB physical interface drive code set be avoided to cause confusion.
A kind of specific implementation according to an embodiment of the present invention when system electrification, sets second switch to disconnect shape
State, switches to the first USB interface access for main switch, and first switch is switched to the first USB interface access.
Referring to Fig. 3, every time when booting, channel default is switched on USB1 (the first USB interface) access, is implemented
Method is as follows: disconnecting Switch_B by GP configuring IO_B, is switched Switch_Main (main switch) by GP configuring IO_M
To USB1 access.Switch_A (first switch) is conducted to USB1 access by GP configuring IO_A.It detects and confirms GPIO_O
Default conditions draw high, it is ensured that ID pin default be to draw high state.Under default conditions, if USB1 insertion Device is set
It is standby, it can normally be identified.
A kind of specific implementation according to an embodiment of the present invention, when the secondary USB interface is inserted into equipment, second
The default pin of USB interface is dragged down by mechanical switch, the insertion of the interruption identification equipment by presetting general-purpose interface.
A kind of specific implementation according to an embodiment of the present invention, when the secondary USB interface is inserted into equipment, control the
One switch is in an off state, and control main switch switches to secondary USB interface access.
A kind of specific implementation according to an embodiment of the present invention, the method also includes: control second switch, which is in, leads
Logical state, is switched to Host mode for the state of USB physical layer, controls power module by configuring general-purpose interface, gives the 2nd USB
Interface provides 5v power supply.
Assuming that USB1 does not connect any equipment, USB2 (secondary USB interface) insertion is specific real from equipment under default conditions
Existing method is as follows: USB2 is inserted into from equipment, and the DET foot of USB2 is dragged down by mechanical switch, interrupts identification from equipment by GPIO_H
Insertion.Switch_A is disconnected by GP configuring IO_A.Switch_Main USB2 is switched to by GP configuring IO_M to lead to
Road.Switch_B (second switch) is connected by GP configuring IO_B.The state of USB physical interface is switched to Host mode.
Power module is controlled by GP configuring IO_P, gives USB2_VBUS power supply 5v.USB2 can enumerate USB from equipment and normal work at this time
Make.
Second aspect, the embodiment of the invention also provides a kind of double ports TYPE-C based on single USB physical interface point
When multiplexing equipment, comprising:
First switch, the first switch are connect with the first USB interface with TYPE-C function;
Second switch, the second switch are connect with the secondary USB interface for not having TYPE-C function;
Main switch, the main switch control and execute handover operation between the first switch and the second switch, and the master opens
Pass is connect with USB TYPE-C controller;
Controller, control instruction of the controller based on user control the USB TYPE-C controller and described the
One switch or second switch carry out time-sharing multiplex connection.
A kind of specific implementation according to an embodiment of the present invention when system electrification, sets second switch to disconnect shape
State, switches to the first USB interface access for main switch, and first switch is switched to the first USB interface access.
A kind of specific implementation according to an embodiment of the present invention, when the secondary USB interface is inserted into equipment, second
The default pin of USB interface is dragged down by mechanical switch, the insertion of the interruption identification equipment by presetting general-purpose interface.
A kind of specific implementation according to an embodiment of the present invention, the controller are used for: when the secondary USB interface is inserted
When entering equipment, control first switch is in an off state, and control main switch switches to secondary USB interface access.
A kind of specific implementation according to an embodiment of the present invention, the controller are also used to: control second switch is in
The state of USB physical layer is switched to Host mode by state, is controlled power module by configuring general-purpose interface, is given second
USB interface provides 5v power supply.
Because using the method for double-USB interface time-sharing multiplex, if there is the situation that double USB ports have equipment in place simultaneously,
It is determined to switch to which channel USB by user at this time, needs to reserve the interface that can be manipulated to user on software.
The insertion of USB2 is identified by the triggering of DET pin and interrupts, and notifies that, to upper layer, the insertion identification of USB1 is logical by event
It crosses logic detection module and recognizes the insertion of equipment, and recognize Host the or Device mode of USB1, then determined by user
Which surely switch on a USB access.For example, if when USB1 has equipment in place and works normally, if USB2 mouthful slotting from equipment
Enter, the DET pin of the port USB2 is dragged down by mechanical switch at this time, notifies upper layer by Event event, UI pops up dialog box prompt
User determines which channel USB used by user.If user still selects the channel USB1, software and hardware is not appointed at this time
Where reason;If user selects the channel USB2,3 process is thened follow the steps, the channel USB2 is switched to, USB1 stops work at this time
Make, USB2 starts to work normally.
For another example, if having in place from equipment and when working normally on USB2, if USB1 has equipment insertion, MCU will at this time
It will receive the interruption that CC logic detection chip report comes, judge insertion is USB line or from equipment, it is then turned off the channel USB2,
And by channel conductive to the channel USB1, the master slave mode then to be come according to the report of CC logic chip judges whether to switch USB object
The master slave mode of interface is managed, and decides whether to close power module or power module is switched into USB1_VBUS.USB1 is at this time
Normal USB enumeration process can be walked and worked normally.
Technical solution using the double-USB interface time-sharing multiplex in invention is based on the hardware structure of existing SOC
It can be achieved, project process/R&D risk is convenient for control;It does not need replacement hardware platform or purchases new IC, convenient for control hardware
Cost.
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any
In the technical scope disclosed by the present invention, any changes or substitutions that can be easily thought of by those familiar with the art, all answers
It is included within the scope of the present invention.Therefore, protection scope of the present invention should be subject to the protection scope in claims.
Claims (10)
1. a kind of double ports TYPE-C time-sharing multiplexing method based on single USB physical interface characterized by comprising
First switch is set in the first USB interface with TYPE-C function;
Second switch is set in the secondary USB interface for not having TYPE-C function;
The main switch switched between the first switch and the second switch is set, and the main switch and USB TYPE-C are controlled
Device connection processed;And
Control instruction based on user controls the USB TYPE-C controller and is divided with the first switch or second switch
Shi Fuyong connection.
2. double ports TYPE-C time-sharing multiplexing method according to claim 1 based on single USB physical interface, feature
It is:
When system electrification, off-state is set by second switch, main switch is switched into the first USB interface access, by first
Switch connection is to the first USB interface access.
3. double ports TYPE-C time-sharing multiplexing method according to claim 1 based on single USB physical interface, feature
It is:
When the secondary USB interface is inserted into equipment, the default pin of secondary USB interface is dragged down by mechanical switch, by default
The insertion of the interruption identification equipment of general-purpose interface.
4. double ports TYPE-C time-sharing multiplexing method according to claim 3 based on single USB physical interface, feature
It is:
When the secondary USB interface is inserted into equipment, control first switch is in an off state, and control main switch switches to second
USB interface access.
5. double ports TYPE-C time-sharing multiplexing method according to claim 4 based on single USB physical interface, feature
It is, the method also includes:
It is in the conductive state to control second switch, the state of USB physical layer is switched to Host mode, by configuring general-purpose interface
Power module is controlled, provides 5v power supply to secondary USB interface.
6. a kind of double port TYPE-C time-sharing multiplex equipment based on single USB physical interface characterized by comprising
First switch, the first switch are connect with the first USB interface with TYPE-C function;
Second switch, the second switch are connect with the secondary USB interface for not having TYPE-C function;
Main switch, the main switch control and execute handover operation between the first switch and the second switch, the main switch with
The connection of USB TYPE-C controller;
Controller, control instruction of the controller based on user control the USB TYPE-C controller and open with described first
It closes or second switch carries out time-sharing multiplex connection.
7. the double port TYPE-C time-sharing multiplex equipment according to claim 6 based on single USB physical interface, feature
It is:
When system electrification, off-state is set by second switch, main switch is switched into the first USB interface access, by first
Switch connection is to the first USB interface access.
8. the double port TYPE-C time-sharing multiplex equipment according to claim 6 based on single USB physical interface, feature
It is:
When the secondary USB interface is inserted into equipment, the default pin of secondary USB interface is dragged down by mechanical switch, by default
The insertion of the interruption identification equipment of general-purpose interface.
9. the double port TYPE-C time-sharing multiplex equipment according to claim 8 based on single USB physical interface, feature
It is, the controller is used for:
When the secondary USB interface is inserted into equipment, control first switch is in an off state, and control main switch switches to second
USB interface access.
10. double ports TYPE-C time-sharing multiplexing method according to claim 9 based on single USB physical interface, special
Sign is that the controller is also used to:
It is in the conductive state to control second switch, the state of USB physical layer is switched to Host mode, by configuring general-purpose interface
Power module is controlled, provides 5v power supply to secondary USB interface.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910272900.4A CN110008163A (en) | 2019-04-04 | 2019-04-04 | Double ports TYPE-C time-sharing multiplexing method and equipment based on single USB physical interface |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910272900.4A CN110008163A (en) | 2019-04-04 | 2019-04-04 | Double ports TYPE-C time-sharing multiplexing method and equipment based on single USB physical interface |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110008163A true CN110008163A (en) | 2019-07-12 |
Family
ID=67170083
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910272900.4A Pending CN110008163A (en) | 2019-04-04 | 2019-04-04 | Double ports TYPE-C time-sharing multiplexing method and equipment based on single USB physical interface |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110008163A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110471878A (en) * | 2019-08-22 | 2019-11-19 | 深圳市新龙鹏科技有限公司 | Realize double TypeC interface blindmate control methods, device, equipment and storage medium |
CN111400220A (en) * | 2020-03-16 | 2020-07-10 | 中科创达软件股份有限公司 | Cable and method of use thereof |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN201860003U (en) * | 2010-11-16 | 2011-06-08 | 汉柏科技有限公司 | Multiplying device for USB (universal serial bus) port |
CN203387203U (en) * | 2013-05-09 | 2014-01-08 | 上海斐讯数据通信技术有限公司 | Charging switching system possessing USB on-the-go (OTG) function |
CN103684407A (en) * | 2013-12-16 | 2014-03-26 | 西安Tcl软件开发有限公司 | Otg device |
CN108563537A (en) * | 2018-03-13 | 2018-09-21 | 珠海慧联科技有限公司 | A kind of USB principals and subordinates detection device and method |
-
2019
- 2019-04-04 CN CN201910272900.4A patent/CN110008163A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN201860003U (en) * | 2010-11-16 | 2011-06-08 | 汉柏科技有限公司 | Multiplying device for USB (universal serial bus) port |
CN203387203U (en) * | 2013-05-09 | 2014-01-08 | 上海斐讯数据通信技术有限公司 | Charging switching system possessing USB on-the-go (OTG) function |
CN103684407A (en) * | 2013-12-16 | 2014-03-26 | 西安Tcl软件开发有限公司 | Otg device |
CN108563537A (en) * | 2018-03-13 | 2018-09-21 | 珠海慧联科技有限公司 | A kind of USB principals and subordinates detection device and method |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110471878A (en) * | 2019-08-22 | 2019-11-19 | 深圳市新龙鹏科技有限公司 | Realize double TypeC interface blindmate control methods, device, equipment and storage medium |
CN110471878B (en) * | 2019-08-22 | 2021-05-07 | 深圳市新龙鹏科技有限公司 | Method, device, equipment and storage medium for realizing blind plugging control of double TypeC interfaces |
CN111400220A (en) * | 2020-03-16 | 2020-07-10 | 中科创达软件股份有限公司 | Cable and method of use thereof |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106104509B (en) | Port disconnect charging function for USB hub | |
US8447893B2 (en) | USB peripheral device comprising limited function USB host controller | |
CN101359316B (en) | Method and apparatus for implementing general-purpose serial bus USB OTG | |
US20040088449A1 (en) | USB unit control method and a USB unit controller | |
CN102902518B (en) | A kind of changing method of active USB device and its mode of operation | |
CN104615572B (en) | Hot plug processing system and method | |
CN102567238B (en) | Interface switching control method, portable terminal device, portable mobile equipment and input equipment | |
CN102662708B (en) | A kind of (SuSE) Linux OS and video driver device thereof | |
CN105718408A (en) | Hot-pluggable computing system, computer-implemented method and system | |
CN101539897B (en) | Multi-computer switching device and operation method thereof | |
CN102749985A (en) | Method and device for dynamically adjusting bus clock | |
US20140280960A1 (en) | Methods and apparatus for dynamically allocating devices between multiple controllers | |
CN110008163A (en) | Double ports TYPE-C time-sharing multiplexing method and equipment based on single USB physical interface | |
CN102981981A (en) | USB (Universal Serial Bus) equipment, communication system and working mode switching method thereof | |
CN105893305A (en) | Intelligent mobile terminal USB TYPE-C interface system | |
CN100478935C (en) | PCIE channel expansion device, system and its collocation method | |
CN106249645A (en) | Built-in same table control system based on LIN communication | |
CN109726059A (en) | A kind of server test system | |
CN103164355A (en) | Switch method and electronic equipment | |
CN102421010A (en) | Software debugging system and method compatible to video graphics array (VGA) port input | |
CN102445981B (en) | Data transmission system and data transmission method | |
CN108153626B (en) | USB, serial port multiplexing and safety isolation system | |
US20130268748A1 (en) | System Status Control Method and Portable Terminal | |
CN103457304A (en) | Charge converter | |
CN106774769A (en) | The changing method and device of a kind of terminal work mode, handheld terminal |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190712 |