CN111339006A - USB debugging port multiplexing system and control method - Google Patents

USB debugging port multiplexing system and control method Download PDF

Info

Publication number
CN111339006A
CN111339006A CN202010110885.6A CN202010110885A CN111339006A CN 111339006 A CN111339006 A CN 111339006A CN 202010110885 A CN202010110885 A CN 202010110885A CN 111339006 A CN111339006 A CN 111339006A
Authority
CN
China
Prior art keywords
mode
usb
module
interface
type
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
Application number
CN202010110885.6A
Other languages
Chinese (zh)
Inventor
梁仲明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Telepower Communication Co ltd
Original Assignee
Guangdong Telepower Communication Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Telepower Communication Co ltd filed Critical Guangdong Telepower Communication Co ltd
Priority to CN202010110885.6A priority Critical patent/CN111339006A/en
Publication of CN111339006A publication Critical patent/CN111339006A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/382Information transfer, e.g. on bus using universal interface adapter
    • G06F13/385Information transfer, e.g. on bus using universal interface adapter for adaptation of a particular data processing system to different peripheral devices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • G06F13/4063Device-to-bus coupling
    • G06F13/4068Electrical coupling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/0042Universal serial bus [USB]

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)
  • Power Sources (AREA)

Abstract

The invention discloses a USB debugging port multiplexing system and a control method, wherein the USB debugging port multiplexing system comprises an initialization module, a mode setting module and a data transmission module, wherein the mode setting module is used for setting a USB mode of the system to be a host mode or a slave mode; and a Type A interface; the data transmission module is connected with the Type A interface. According to the technical scheme, the USB mode of the system is preset before data transmission with the USB peripheral, and the USB mode of the system is set to be the host mode or the slave mode, so that the multiplexing function of the USB2.0 slave debugging mode and the USB3.0 host mode can be realized through a Type A interface.

Description

USB debugging port multiplexing system and control method
Technical Field
The invention relates to the technical field of USB communication, in particular to a USB debugging port multiplexing system and a control method thereof.
Background
With the development of science and technology, USB OTG is used more and more frequently, and what is called USB OTG means that a device can be used as both a host device and a slave device during communication. Traditional USB OTG mainly uses Micro USB or Type C interface form, when using the Micro USB interface as USB OTG's physical interface, if when USB peripheral hardware such as external USB flash disk of needs, need a conversion line to convert Micro USB interface into Type A interface, when using Type C interface as USB OTG's physical interface equally, also need a conversion line to convert Type C interface into Type A interface and just can link to each other with the USB peripheral hardware. That is, in the prior art, two conversion lines are needed to realize multiplexing of the host mode and the debug mode of the USB interface of the intelligent hardware device.
Disclosure of Invention
The present invention is directed to a USB debug port multiplexing system and a control method thereof, which are used to solve one or more technical problems in the prior art and provide at least one of the advantages of the present invention.
The technical scheme adopted for solving the technical problems is as follows:
a USB debug port multiplexing system, comprising:
the initialization module is used for setting the initial state of the USB mode of the system as a USB OTG mode;
the mode setting module is used for setting the USB mode of the system to be a HOST mode or a slave mode, when the USB mode of the system is set to be the HOST mode, the USB mode of the system is in the HOST mode of USB3.0, and when the USB mode of the system is set to be the slave mode, the USB mode of the system is in the DEVICE mode of USB 2.0;
the data transmission module is used for sending or receiving data according to the USB mode of the system set by the mode setting module;
and a Type A interface;
the data transmission module is connected with the Type A interface.
As a further improvement of the above technical solution, the power supply system further includes a power module and an enabling module for controlling the power module to operate, the enabling module is connected to the power module, the power module is connected to the Type a interface, and the enabling module is configured to control the power module to be started when the USB mode of the system is set to the master mode, and control the power module to be stopped when the USB mode of the system is set to the slave mode.
As a further improvement of the above technical solution, the power module includes a voltage reduction unit and a current limiting unit, the voltage reduction unit is connected to the current limiting unit, the current limiting unit is connected to the Type a interface, and the enable module is connected to the current limiting unit.
As a further improvement of the above technical solution, the voltage dropping unit includes a voltage dropping chip of a model MP1471A and a peripheral circuit thereof, the current limiting unit includes a power switch chip of a model SY6280 and a peripheral circuit thereof, and the enabling module is connected to the power switch chip.
As a further improvement of the above technical solution, the initialization module, the mode setting module, the data transmission module, and the enabling module are all disposed in a processor chip, and the model of the processor chip is RK 3399.
The invention also discloses a control method of the USB debugging port multiplexing system, which comprises the following steps:
step 100, setting the initial state of the USB mode of the system as a USB OTG mode;
step 200, setting the USB mode of the system as a master mode or a slave mode, when the USB mode of the system is set as the master mode, the USB mode of the system is in the HOST mode of USB3.0, and when the USB mode of the system is set as the slave mode, the USB mode of the system is in the DEVICE mode of USB 2.0;
and step 300, transmitting or receiving data through a Type A interface according to the set USB mode of the system.
As a further improvement of the above technical solution, between step 200 and step 300, a step a is further included, in which the power connection between the power supply and the Type a interface is controlled according to the set USB mode of the system.
The invention has the beneficial effects that: according to the technical scheme, the USB mode of the system is preset before data transmission with the USB peripheral, and the USB mode of the system is set to be the host mode or the slave mode, so that the multiplexing function of the USB2.0 slave debugging mode and the USB3.0 host mode can be realized through a Type A interface.
Drawings
The invention is further described with reference to the accompanying drawings and examples;
FIG. 1 is a schematic diagram of the circuit configuration of the present invention;
fig. 2 is a flow chart of a control method of the present invention.
Detailed Description
Reference will now be made in detail to the present preferred embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like reference numerals refer to like elements throughout.
In the description of the present invention, it should be understood that the orientation or positional relationship referred to in the description of the orientation, such as the upper, lower, front, rear, left, right, etc., is based on the orientation or positional relationship shown in the drawings, and is only for convenience of description and simplification of description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus, should not be construed as limiting the present invention.
In the description of the present invention, if words such as "a plurality" are described, the meaning is one or more, the meaning of a plurality is two or more, more than, less than, more than, etc. are understood as excluding the present number, and more than, less than, etc. are understood as including the present number.
In the description of the present invention, unless otherwise explicitly limited, terms such as arrangement, installation, connection and the like should be understood in a broad sense, and those skilled in the art can reasonably determine the specific meanings of the above terms in the present invention in combination with the specific contents of the technical solutions.
Referring to fig. 1, the present application discloses a USB debug port multiplexing system, a first embodiment of which includes:
the initialization module is used for setting the initial state of the USB mode of the system as a USB OTG mode;
the mode setting module is used for setting the USB mode of the system to be a HOST mode or a slave mode, when the USB mode of the system is set to be the HOST mode, the USB mode of the system is in the HOST mode of USB3.0, and when the USB mode of the system is set to be the slave mode, the USB mode of the system is in the DEVICE mode of USB 2.0;
the data transmission module is used for sending or receiving data according to the USB mode of the system set by the mode setting module;
and a Type A interface;
the data transmission module is connected with the Type A interface.
Specifically, in this embodiment, before data transmission with the USB peripheral, the USB mode of the system is preset, and the USB mode of the system is set to the host mode or the slave mode, so that the multiplexing function of the USB2.0 slave debug mode and the USB3.0 host mode can be realized through one Type a interface.
As a preferred implementation manner, this embodiment further includes a power module and an enabling module for controlling the power module to operate, where the enabling module is connected to the power module, the power module is connected to the Type a interface, and the enabling module is configured to control the power module to be started when the USB mode of the system is set to the master mode, and control the power module to be stopped when the USB mode of the system is set to the slave mode.
Specifically, power module includes step-down unit and current-limiting unit, the step-down unit with the current-limiting unit links to each other, the current-limiting unit with Type A interface links to each other, enable the module with the current-limiting unit links to each other, and in this embodiment the current-limiting unit sets up the step-down unit with between the Type A interface, be used for the realization right the overcurrent protection and the short-circuit protection function of Type A interface. The voltage reduction unit comprises a voltage reduction chip with the model of MP1471A and a peripheral circuit thereof, the current limiting unit comprises a power switch chip with the model of SY6280 and a peripheral circuit thereof, and the enabling module is connected with the power switch chip. In this embodiment, the power switch chip of the type is configured with an enable input terminal, and the enable module is connected to the enable input terminal of the power switch chip to control the power switch chip to be turned on and off.
Further, in a preferred implementation manner, in this embodiment, the initialization module, the mode setting module, the data transmission module, and the enabling module are all disposed in a processor chip, and a model of the processor chip is RK 3399. Specifically, in the processor chip of the type described in this embodiment, the register for setting the system USB mode cannot be directly written by a program, and only the register data for setting the system USB mode can be rewritten by reading an external input signal, for this reason, the processor chip in this embodiment is configured with a first pin for outputting a command for setting the system USB mode and a second pin for reading a command for setting the system USB mode, so that it can be seen that the mode setting module in this embodiment needs to transmit a command for setting the system USB mode to the second pin of the processor chip through the first pin of the processor chip, and the first pin and the second pin are connected through a conversion circuit, where the conversion circuit is configured to perform a level conversion function on the first pin and the second pin. In this embodiment, the conversion circuit includes a resistor R1, a resistor R2, and a transistor Q1, the first pin is connected to a base of a transistor Q1 through a resistor R1, an emitter of a transistor Q1 is grounded, a collector of a transistor Q1 is connected to the power module through a resistor R2, and a collector of the transistor Q1 is connected to the second pin.
Referring to fig. 2, the present application also discloses a method for controlling a USB debug port multiplexing system, wherein a first embodiment of the method includes the following steps:
step 100, setting the initial state of the USB mode of the system as a USB OTG mode;
step 200, setting the USB mode of the system as a master mode or a slave mode, when the USB mode of the system is set as the master mode, the USB mode of the system is in the HOST mode of USB3.0, and when the USB mode of the system is set as the slave mode, the USB mode of the system is in the DEVICE mode of USB 2.0;
and step 300, transmitting or receiving data through a Type A interface according to the set USB mode of the system.
Further, as a preferred implementation manner, in this embodiment, between the step 200 and the step 300, a step a is further included, in which the power connection between the power supply and the Type a interface is controlled according to the set USB mode of the system. Specifically, when the USB mode of the system is in the HOST mode of USB3.0, the power connection with the Type a interface is turned on, and when the USB mode of the system is in the DEVICE mode of USB2.0, the power connection with the Type a interface is turned off.
While the preferred embodiments of the present invention have been illustrated and described, it will be understood by those skilled in the art that the present invention is not limited to the details of the embodiments shown and described, but is capable of numerous equivalents and substitutions without departing from the spirit of the invention as set forth in the claims appended hereto.

Claims (7)

1. A USB debugging port multiplexing system is characterized in that: the method comprises the following steps:
the initialization module is used for setting the initial state of the USB mode of the system as a USB OTG mode;
the mode setting module is used for setting the USB mode of the system to be a HOST mode or a slave mode, when the USB mode of the system is set to be the HOST mode, the USB mode of the system is in the HOST mode of USB3.0, and when the USB mode of the system is set to be the slave mode, the USB mode of the system is in the DEVICE mode of USB 2.0;
the data transmission module is used for sending or receiving data according to the USB mode of the system set by the mode setting module;
and a Type A interface;
the data transmission module is connected with the Type A interface.
2. The multiplexing system of USB debug ports of claim 1, wherein: the USB interface control system comprises a power module and an enabling module, wherein the enabling module is used for controlling the power module to work, the enabling module is connected with the power module, the power module is connected with the Type A interface, the enabling module is configured to control the power module to be started when the USB mode of the system is set to be the host mode, and control the power module to be stopped when the USB mode of the system is set to be the slave mode.
3. The multiplexing system of USB debug ports according to claim 2, wherein: the power module comprises a voltage reduction unit and a current limiting unit, the voltage reduction unit is connected with the current limiting unit, the current limiting unit is connected with the Type A interface, and the enabling module is connected with the current limiting unit.
4. The multiplexing system of USB debug ports of claim 3, wherein: the voltage reduction unit comprises a voltage reduction chip with the model of MP1471A and a peripheral circuit thereof, the current limiting unit comprises a power switch chip with the model of SY6280 and a peripheral circuit thereof, and the enabling module is connected with the power switch chip.
5. The multiplexing system of USB debug ports according to claim 2, wherein: the initialization module, the mode setting module, the data transmission module and the enabling module are all arranged in a processor chip.
6. A control method of a USB debugging port multiplexing system is characterized in that: the method comprises the following steps:
step 100, setting the initial state of the USB mode of the system as a USB OTG mode;
step 200, setting the USB mode of the system as a master mode or a slave mode, when the USB mode of the system is set as the master mode, the USB mode of the system is in the HOST mode of USB3.0, and when the USB mode of the system is set as the slave mode, the USB mode of the system is in the DEVICE mode of USB 2.0;
and step 300, transmitting or receiving data through a Type A interface according to the set USB mode of the system.
7. The method for controlling a multiplexing system of USB debug ports according to claim 6, wherein: between the step 200 and the step 300, a step a is further included, in which the power supply is controlled to be electrically connected with the Type a interface according to the set USB mode of the system.
CN202010110885.6A 2020-02-24 2020-02-24 USB debugging port multiplexing system and control method Pending CN111339006A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010110885.6A CN111339006A (en) 2020-02-24 2020-02-24 USB debugging port multiplexing system and control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010110885.6A CN111339006A (en) 2020-02-24 2020-02-24 USB debugging port multiplexing system and control method

Publications (1)

Publication Number Publication Date
CN111339006A true CN111339006A (en) 2020-06-26

Family

ID=71183697

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010110885.6A Pending CN111339006A (en) 2020-02-24 2020-02-24 USB debugging port multiplexing system and control method

Country Status (1)

Country Link
CN (1) CN111339006A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150269110A1 (en) * 2013-06-19 2015-09-24 Shanghai Bplus Electronics Technology Ltd. Cable with multiple functions
CN107277416A (en) * 2017-07-20 2017-10-20 青岛海信电器股份有限公司 television terminal and control method
CN207037649U (en) * 2017-06-30 2018-02-23 深圳市阿龙电子有限公司 A kind of USB switching circuits of smart machine

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150269110A1 (en) * 2013-06-19 2015-09-24 Shanghai Bplus Electronics Technology Ltd. Cable with multiple functions
CN207037649U (en) * 2017-06-30 2018-02-23 深圳市阿龙电子有限公司 A kind of USB switching circuits of smart machine
CN107277416A (en) * 2017-07-20 2017-10-20 青岛海信电器股份有限公司 television terminal and control method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李元章: "《汇编语言与接口技术》", 31 October 2018, 北京理工大学出版社 *

Similar Documents

Publication Publication Date Title
CN105681145A (en) FPGA-based FlexRay communication module
CN108205393B (en) Semiconductor device, man-machine interface device, and electronic apparatus
CN209560436U (en) A kind of NVMe hard disk backboard
CN114428756B (en) USB device, USB cable and USB repeater thereof
CN104834620A (en) SPI (serial peripheral interface) bus circuit, realization method and electronic equipment
CN100478935C (en) PCIE channel expansion device, system and its collocation method
CN101163308B (en) Intelligent platform management controller
CN102637453A (en) Phase change memory including serial input/output interface
CN101369948A (en) Communication system implementing low-power consumption
CN208141371U (en) A kind of multi-functional UART debugging board
CN110704288B (en) Information processing method and electronic equipment
JP2023502704A (en) Slave computers, connectors, slave computer assemblies and communication systems
CN103311766A (en) Mobile equipment switching device and working mode switching method thereof
CN111339006A (en) USB debugging port multiplexing system and control method
CN204480237U (en) A kind of connector, universal serial bus device and intelligent terminal
CN110908673B (en) Digital power supply chip burning method
CN110413550B (en) Chip serial port program downloading control circuit
CN114661646A (en) Serial port switching control circuit
CN209929621U (en) JTAG socket device for burning multiplex of multiple devices
CN208092483U (en) Brain communication system controller and robot for robot
CN115344105A (en) Chip with multiplexed interfaces and debugging system of chip
CN206893961U (en) A kind of USB turns AccessPort line
CN107704403B (en) Device and method for optimizing signal transmission of main back plate
CN217157277U (en) Storage device sharing SMBUS and UART interfaces
CN219739998U (en) Vehicle-mounted PD quick charging circuit comprising Type-C mobile phone interconnection function

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: 20200626