CN108549612A - A kind of method and USB controller of adjustment operating mode - Google Patents
A kind of method and USB controller of adjustment operating mode Download PDFInfo
- Publication number
- CN108549612A CN108549612A CN201810230135.5A CN201810230135A CN108549612A CN 108549612 A CN108549612 A CN 108549612A CN 201810230135 A CN201810230135 A CN 201810230135A CN 108549612 A CN108549612 A CN 108549612A
- Authority
- CN
- China
- Prior art keywords
- usb port
- usb
- manual mode
- vbus
- usb controller
- 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.)
- Granted
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/14—Handling requests for interconnection or transfer
- G06F13/16—Handling requests for interconnection or transfer for access to memory bus
- G06F13/1668—Details of memory controller
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Systems (AREA)
Abstract
The present invention relates to electronic technology field, more particularly to a kind of the method and USB controller of adjustment operating mode will be unable to carry out the state control of USB controller to solve the problems, such as existing in the prior art when the peripheral hardware of embedded device carry is unable to plug.USB controller of the embodiment of the present invention judges the vbus on off states of each USB port after determining that the USB port for being arranged to manual mode all exits manual mode;When the vbus on off states of each USB port of determination are to be closed, operating mode is adjusted to device patterns by USB controller.It includes multiple peripheral hardwares that the embodiment of the present invention, which is realized in embedded device, and control when peripheral hardware is unable to plug to the operating mode of USB controller, and reduces the power consumption of embedded device.
Description
Technical field
The present invention relates to electronic technology field, more particularly to a kind of the method and USB controller of adjustment operating mode.
Background technology
With the development of USB technologies so that PC (Personal Computer, personal computer) and peripheral equipment can
By simple mode, the manufacturing cost of appropriateness, the equipment of various data transmission bauds is linked together.Also, it is most common
Connection type be all that equipment is connected to PC by USB (Universal Serial Bus, universal serial bus), and in PC
Control under carry out data exchange.But this convenient exchanged form, once having left PC, each equipment room can not utilize USB port
It is operated.With the development of technology, there is the embedded device of support otg (On-The-Go) function, embedded device exists
When in otg patterns, USB port peripheral hardware can be hung over;Meanwhile when in host mode, and peripheral hardware can be served as and be connected to PC
On.
The plug event phase of the state needs and USB peripheral of vbus switches and USB controller is provided in existing USB standard
Association;For example, when plug event occurs for peripheral hardware, the ID pins of USB port can trigger ID interrupt signals, in the level quilt of ID pins
USB controller enters otg patterns when dragging down;Therefore, it will be unable to carry out USB when the peripheral hardware of embedded device carry is unable to plug
The state of controller controls.
Invention content
The present invention provides a kind of method and apparatus of adjustment operating mode, existing in the prior art in insertion to solve
The peripheral hardware of formula equipment carry is unable to the problem of state that will be unable to carry out USB controller when plug control.
Based on the above issues, the embodiment of the present invention provide it is a kind of adjustment operating mode method include:
USB controller judges each USB after determining that the USB port for being arranged to manual mode all exits manual mode
The vbus on off states of mouth;Wherein, when USB port is configured to manual mode, the USB controller is according to the first user instruction
The vbus switches of USB port to being arranged to manual mode control;
When the vbus on off states of each USB port of determination are to be closed, operating mode is adjusted to by the USB controller
Device patterns.
Second aspect, a kind of USB controller of offer of the embodiment of the present invention include:At least one processing unit and at least one
A storage unit, wherein the storage unit has program stored therein code, when said program code is executed by the processing unit
When so that the processing unit executes following process:
After determining that the USB port for being arranged to manual mode all exits manual mode, judge that the vbus of each USB port is opened
Off status;Wherein, when USB port is configured to manual mode, according to the first user instruction to being arranged to the USB of manual mode
The vbus switches of mouth are controlled;When the vbus on off states of each USB port of determination are to be closed, operating mode is adjusted to
Device patterns.
Since the embodiment of the present invention provides a kind of control model of manual mode for USB port, in the peripheral hardware of the carry of USB port
When being unable to plug, the control model of the USB port can be set to manual mode, by manual mode to the vbus of the USB port
Switch is controlled;Also, due to USB controller be in device patterns compared to otg pattern power consumptions it is less, the embodiment of the present invention
After the USB port for being configured to manual mode all exits manual mode, and the vbus of each USB port is switched when being closed, will
The operating mode of USB controller is adjusted to device patterns, and it includes multiple peripheral hardwares to realize in embedded device, and peripheral hardware cannot
To the control of the operating mode of USB controller when plug, and reduce the power consumption of embedded device.
Description of the drawings
Fig. 1 is the structural schematic diagram of embedded device of the embodiment of the present invention;
Fig. 2 is the schematic diagram that USB port signal wire of the embodiment of the present invention defines;
Fig. 3 is the control flow chart of the first USB controller operating mode of the embodiment of the present invention;
Fig. 4 is the control flow chart that the vbus of USB port of the embodiment of the present invention is switched;
Fig. 5 is the method flow diagram that the embodiment of the present invention adjusts operating mode;
Fig. 6 be the embodiment of the present invention the first adjustment operating mode method overall flow figure;
Fig. 7 is the overall flow figure of the method for second of adjustment operating mode of the embodiment of the present invention;
Fig. 8 is the structural schematic diagram of the first USB controller of the embodiment of the present invention;
Fig. 9 is the structural schematic diagram of second of USB controller of the embodiment of the present invention.
Specific implementation mode
To make the objectives, technical solutions, and advantages of the present invention clearer, below in conjunction with attached drawing to the present invention make into
It is described in detail to one step, it is clear that described embodiments are only a part of the embodiments of the present invention, rather than whole implementation
Example.Based on the embodiments of the present invention, obtained by those of ordinary skill in the art without making creative efforts
All other embodiment, shall fall within the protection scope of the present invention.
The method of the adjustment operating mode of the embodiment of the present invention can be applied to embedded device, be applied to embedded set
When standby, the structure of embedded device is as shown in Figure 1, including CPU (Central Processing Unit, central processing unit), position
USB controller in CPU, the USB HUB (hub) being connect with USB controller, USB HUB export at least two USB ports,
And the DCDC power supply chips between USB HUB and at least two USB ports, the vbus per USB port all the way are only by switching
It is vertical to be controlled.
As shown in Fig. 2, the definition of the signal wire of USB port;Wherein, pin 1 is vbus, and pin 2 is D-, and pin 3 is D+, is drawn
Foot 4 is ID, and pin 5 is GND;The ID pins of USB port and the gpio pins of CPU connect, for being interrupted to USB controller triggering ID
Signal;Pin 1 is switched by S and is connect with DCDC power supply chips, the opening for controlling vbus and closing.
The operating mode of USB controller of the embodiment of the present invention includes device patterns and otg patterns;
The control model of each USB port includes automatic mode and manual mode.
Wherein, USB controller is indicated according to user, configures the corresponding control model of each USB port;
Optionally, when user is that USB port manually selects the peripheral hardware of connection, the corresponding control model of the USB port is manual
Pattern, correspondingly, the control model of other USB ports is automatic mode.
USB port control model be automatic mode when, USB controller after receiving the ID interrupt signals of the USB port,
Adjust the operating mode of USB controller;
Specifically, after USB controller receives the ID interrupt signals of USB port, the electricity of the ID pins of current USB port is judged
Whether level state is low level;When the level state of the ID pins of the USB port is low level, the vbus for opening the USB port is opened
It closes, operating mode is adjusted to otg patterns by USB controller.
When the embodiment of the present invention only includes the USB port of an automatic mode, the control stream of the operating mode of USB controller
Journey is as shown in Figure 3:
Step 301, USB controller receive the ID interrupt signals of USB port triggering;
Step 302, USB controller judge whether the level state of the ID pins of the USB port is low level;If so, executing
Step 303, if it is not, executing step 304;
Step 303, USB controller open the vbus switches of the USB port, and operating mode is adjusted to otg patterns;
Step 304, USB controller close the vbus switches of the USB port, and operating mode is adjusted to device patterns.
When the control model of USB port is manual mode, operating mode is adjusted to otg patterns by USB controller;And according to
First user instruction controls the vbus switches of the corresponding USB port of manual mode;
Specifically, when it is manual mode that USB controller, which is determined there are the control model of USB port, then by operating mode tune
Whole is otg patterns;
It should be noted that when USB controller is corresponding with multiple USB ports, as long as there are USB ports in multiple USB ports
Control model is manual mode, just sets the control model of USB controller to manual mode.
USB controller indicates to open the first of vbus switches after operating mode is adjusted to otg patterns, if receiving
After user instruction, then USB controller opens the vbus switches of the corresponding USB port of the first user instruction;If receiving expression to close
After first user instruction of vbus switches, then USB controller closes the vbus switches of the corresponding USB port of the first user instruction.
When the embodiment of the present invention includes the USB port of manual mode, control flow such as Fig. 4 institutes of the vbus switches of USB port
Show:
Step 401, USB controller set the corresponding control model of at least one USB port to manual mode;
Operating mode is adjusted to otg patterns by step 402, USB controller;
Step 403, USB controller judge whether to receive the first user instruction for indicating to open vbus switches;If so, holding
Row step 404, if it is not, executing step 405;
Step 404, USB controller open the vbus switches of the corresponding USB port of the first user instruction;
Step 405, USB controller close the vbus switches of the corresponding USB port of the first user instruction.
Due in the prior art, if the peripheral hardware of carry is unable to plug at least one USB port of USB controller, inciting somebody to action
The method of adjustment USB controller operating mode when the control model of USB port cannot be used to be in automatic mode;It is asked based on this
Topic, as shown in figure 5, the embodiment of the present invention provide it is a kind of adjustment operating mode method include:
Step 501, USB controller judge after determining that the USB port for being arranged to manual mode all exits manual mode
The vbus on off states of each USB port;Wherein, when USB port is configured to manual mode, the USB controller is according to first
User instruction controls the vbus switches for being arranged to the USB port of manual mode;
Step 502, when the vbus on off states of each USB port of determination are to be closed, the USB controller is by operating mode
It is adjusted to device patterns.
Since the embodiment of the present invention provides a kind of control model of manual mode for USB port, in the peripheral hardware of the carry of USB port
When being unable to plug, the control model of the USB port can be set to manual mode, by manual mode to the vbus of the USB port
Switch is controlled;Also, due to USB controller be in device patterns compared to otg pattern power consumptions it is less, the embodiment of the present invention
After the USB port for being configured to manual mode all exits manual mode, and the vbus of each USB port is switched when being closed, will
The operating mode of USB controller is adjusted to device patterns, and it includes multiple peripheral hardwares to realize in embedded device, and peripheral hardware cannot
To the control of the operating mode of USB controller when plug, and reduce the power consumption of embedded device.
Wherein, USB controller is indicated according to user, sets the control model of at least one USB port to manual mode;
For the embodiment of the present invention after setting the control model of at least one USB port to manual mode, USB controller will
Operating mode is adjusted to otg patterns.
Specifically, if USB controller receives user's instruction, before setting a USB port to manual mode, the USB
Controller determines that the control model of existing USB port is manual mode, can determine the operating mode of USB controller at this time
It is adjusted to otg patterns, it is no longer necessary to adjust the operating mode of USB controller;If USB controller receives user's instruction, by one
A USB port is set as before manual mode, which determines that there is no the control model of USB port be manual mode, at this time
USB controller needs operating mode being adjusted to otg patterns.
Also, USB controller determines the manual mode for exiting USB port when receiving second user instruction.
It should be noted that entering automatic mode after USB port exits manual mode.
USB controller of the embodiment of the present invention can periodically judge whether operating mode being adjusted to device patterns;
Specifically, USB controller periodically judges whether the USB port for being arranged to manual mode all exits manual mould
Formula, after determining that the USB port for being arranged to manual mode all exits manual mode, and the vbus switches of each USB port are closed
When, operating mode is adjusted to device patterns by USB controller.
Alternatively, USB controller of the embodiment of the present invention is determining that USB controller judges whether work when meeting trigger condition
Operation mode is adjusted to device patterns;
Wherein, the trigger condition of the embodiment of the present invention can be:
Trigger condition 1:
USB controller receives the ID interrupt signals of USB port triggering, and determines the USB port for triggering the ID interrupt signals
ID pins be high level.
After meeting the trigger condition 1, before judging the vbus on off states of each USB port, USB controller, which is closed, to be touched
The vbus switches for the USB port for sending out ID interrupt signals described.
It should be noted that USB controller of the embodiment of the present invention can be judging the USB port for being arranged to manual mode
No whole exits before manual mode, closes the vbus switches of the USB port of triggering ID interrupt signals;Or judging to be arranged to
Whether the USB port of manual mode all exits after manual mode, before the vbus on off states for judging each USB port, closes
Trigger the vbus switches of the USB port of ID interrupt signals.
After meeting the trigger condition 1, USB controller judges whether the USB port for being arranged to manual mode all exits
Manual mode, and close the vbus switches of the USB port of triggering ID interrupt signals;Determining the USB for being arranged to manual mode
Mouth all exits manual mode, and when the vbus switch closures of each USB port, operating mode is adjusted to by USB controller
Device patterns.
It should be noted that after the ID interrupt signals that USB controller receives USB port triggering, however, it is determined that triggering ID is interrupted
The ID pins of the USB port of signal are low level, then the vbus switches of the USB port of triggering ID interrupt signals are opened, if current USB
The operating mode of controller is device patterns, then the operating mode of USB controller is adjusted to otg patterns.
For example, USB controller extends three USB ports, respectively USB port 1, USB port 2 and USB port 3 by USB HUB,
In, the control model of USB port 2 is configured to manual mode;If USB controller receives the ID interrupt signals of the triggering of USB port 1,
USB controller judges the level state of the ID pins of USB port 1, and when the ID pins of USB port 1 are high level, USB controller closes
Close the vbus switches of USB port 1;At this point, USB controller judges whether USB port 2 exits manual mode;Hand is exited in USB port 2
When dynamic model formula, and the vbus of USB port 2 and USB port 3 is switched when being closed, and operating mode is adjusted to device moulds by USB controller
Formula;When USB port 2 does not exit manual mode, operating mode is remained otg patterns by USB controller;If alternatively, USB port 2
It switchs and opens with the vbus for having any one in USB port 3, then operating mode is remained otg patterns by USB controller.
If USB controller receives the ID interrupt signals of the triggering of USB port 1, USB controller determines that the ID pins of USB port 1 are
When low level, USB controller opens the vbus switches of USB port 1.
As shown in fig. 6, the overall flow figure of the first adjustment operating mode of the embodiment of the present invention:
Step 601, USB controller are indicated according to user, set the control model of at least one USB port to manual mould
Formula;
Operating mode is adjusted to otg patterns by step 602, USB controller;
Step 603, USB controller receive the ID interrupt signals of USB port triggering;
Step 604, USB controller judge to trigger whether the ID pins of the USB port of ID interrupt signals are low level;If so,
Step 605 is executed, if it is not, executing step 606;
Step 605, USB controller open the vbus switches of the USB port of triggering ID interrupt signals;
It is otg patterns that step 606, USB controller, which keep operating mode,;
Step 607, USB controller close the vbus switches of the USB port of triggering ID interrupt signals;
Step 608, USB controller judge whether the USB port for being arranged to manual mode all exits manual mode;If
It is to execute step 609, if it is not, executing step 606;
Wherein, step 606 and step 607 do not differentiate between sequencing;
Step 609, USB controller judge whether the vbus switches of each USB port are all closed;If so, executing step
610, if it is not, executing step 606;
Operating mode is adjusted to device patterns by step 610, USB controller.
Trigger condition 2:
The USB controller receives the second user instruction for the manual mode for indicating to exit USB port, and determines and need to move back
The ID pins for going out the USB port of manual mode are high level.
After meeting the trigger condition 2, before judging the vbus on off states of each USB port, USB controller, which is closed, to be needed
Exit the vbus switches of the USB port of manual mode.
It should be noted that USB controller of the embodiment of the present invention can be judging the USB port for being arranged to manual mode
No whole exits before manual mode, closes the vbus switches for the USB port for needing to exit manual mode;Or judging to be set
For manual mode USB port whether all exit manual mode after, before the vbus on off states for judging each USB port, close
Close the vbus switches for the USB port for needing to exit manual mode.
After meeting the trigger condition 2, USB controller judges whether the USB port for being arranged to manual mode all exits
Manual mode, and close the vbus switches of the USB port of triggering ID interrupt signals;Determining the USB for being arranged to manual mode
Mouth all exits manual mode, and when the vbus switch closures of each USB port, operating mode is adjusted to by USB controller
Device patterns.
Optionally, after USB controller receives the second user instruction, if described need to exit manual mode
The level state of the ID pins of USB port is low level, and the USB controller opens the USB port for needing to exit manual mode
Vbus switch.
For example, USB controller extends three USB ports, respectively USB port 1, USB port 2 and USB port 3 by USB HUB,
In, the control model of USB port 1 and USB port 2 is configured to manual mode;If USB controller receives instruction, USB port 1 exits hand
The second user of dynamic model formula instructs, and USB controller judges the level state of the ID pins of USB port 1, is in the ID pins of USB port 1
When high level, USB controller closes the vbus switches of USB port 1;At this point, USB controller judges whether USB port 2 exits manual mould
Formula;In USB port 2 when exiting manual mode, and the vbus of USB port 2 and USB port 3 switches are when being closed, and USB controller is by work
Operation mode is adjusted to device patterns;When USB port 2 does not exit manual mode, USB controller remains operating mode
Otg patterns;If alternatively, thering are the vbus switches of any one to open in USB port 2 and USB port 3, USB controller is by operating mode
Remain otg patterns.
If the instruction USB port 1 that USB controller receives exits the second user instruction of manual mode, USB controller determines
When the ID pins of USB port 1 are low level, USB controller opens the vbus switches of USB port 1.
As shown in fig. 7, the overall flow figure of the first adjustment operating mode of the embodiment of the present invention:
Step 701, USB controller are indicated according to user, set the control model of at least one USB port to manual mould
Formula;
Operating mode is adjusted to otg patterns by step 702, USB controller;
Step 703, USB controller receive the second user instruction for the manual mode for indicating to exit USB port;
Step 704, USB controller judgement need to exit whether the ID pins of the USB port of manual mode are low level;If
It is to execute step 705, if it is not, executing step 706;
Step 705, USB controller open the vbus switches for the USB port for needing to exit manual mode;
It is otg patterns that step 706, USB controller, which keep operating mode,;
Step 707, USB controller close the vbus switches for the USB port for needing to exit manual mode;
Step 708, USB controller judge whether the USB port for being arranged to manual mode all exits manual mode;If
It is to execute step 709, if it is not, executing step 706;
Wherein, step 707 and step 708 do not differentiate between sequencing;
Step 709, USB controller judge whether the vbus switches of each USB port are all closed;If so, executing step
710, if it is not, executing step 706;
Operating mode is adjusted to device patterns by step 710, USB controller.
Based on same inventive concept, a kind of USB controller is additionally provided in the embodiment of the present invention, due to the USB controller
Be the adjustment operating mode in the embodiment of the present invention method in USB controller, and the original that the USB controller solves the problems, such as
Reason is similar to this method, therefore the implementation of the USB controller may refer to the implementation of method, and overlaps will not be repeated.
As shown in figure 8, the first USB controller of the embodiment of the present invention includes at least one processing unit 800 and at least
One storage unit 801, wherein the storage unit 801 has program stored therein code, when said program code is single by the processing
When member 800 executes so that the processing unit 800 executes following process:
After determining that the USB port for being arranged to manual mode all exits manual mode, judge that the vbus of each USB port is opened
Off status;Wherein, when USB port is configured to manual mode, according to the first user instruction to being arranged to the USB of manual mode
The vbus switches of mouth are controlled;When the vbus on off states of each USB port of determination are to be closed, operating mode is adjusted to
Device patterns.
Optionally, the processing unit 800 is additionally operable to:
Before determining that the USB port for being arranged to manual mode all exits manual mode, indicated according to user, it will at least
The control model of one USB port is set as manual mode.
Optionally, the processing unit 800 is additionally operable to:
It is indicated according to user, after setting the control model of at least one USB port to manual mode, by operating mode tune
Whole is otg patterns.
Optionally, the processing unit 800 is additionally operable to:
Before determining that the USB port for being arranged to manual mode all exits manual mode, the ID of USB port triggering is received
Interrupt signal, and determine that the ID pins for the USB port for triggering the ID interrupt signals are high level;
Before judging the vbus on off states of each USB port, the vbus for the USB port for triggering the ID interrupt signals is closed
Switch.
Optionally, the processing unit 800 is additionally operable to:
Before determining that the USB port for being arranged to manual mode all exits manual mode, receives expression and exit USB port
Manual mode second user instruction, and determine need to exit manual mode USB port ID pins be high level;
Before judging the vbus on off states of each USB port, the vbus for closing the USB port for needing to exit manual mode is opened
It closes.
Optionally, the processing unit 800 is additionally operable to:
After receiving the second user instruction, if the level for needing to exit the ID pins of the USB port of manual mode
State is low level, opens the vbus switches for needing to exit the USB port of manual mode.
As shown in figure 9, second of USB controller of the embodiment of the present invention, including:
Judgment module 901, for after determining that the USB port for being arranged to manual mode all exits manual mode, judging
The vbus on off states of each USB port;Wherein, when USB port is configured to manual mode, according to the first user instruction to being set
The vbus switches for being set to the USB port of manual mode are controlled;
Module 902 is adjusted, for when the vbus on off states of each USB port of determination are to be closed, operating mode to be adjusted
For device patterns.
Optionally, the judgment module 901 is additionally operable to:
Before determining that the USB port for being arranged to manual mode all exits manual mode, indicated according to user, it will at least
The control model of one USB port is set as manual mode.
Optionally, the judgment module 901 is additionally operable to:
It is indicated according to user, after setting the control model of at least one USB port to manual mode, by operating mode tune
Whole is otg patterns.
Optionally, the judgment module 901 is additionally operable to:
Before determining that the USB port for being arranged to manual mode all exits manual mode, the ID of USB port triggering is received
Interrupt signal, and determine that the ID pins for the USB port for triggering the ID interrupt signals are high level;
Before judging the vbus on off states of each USB port, the vbus for the USB port for triggering the ID interrupt signals is closed
Switch.
Optionally, the judgment module 901 is additionally operable to:
Before determining that the USB port for being arranged to manual mode all exits manual mode, receives expression and exit USB port
Manual mode second user instruction, and determine need to exit manual mode USB port ID pins be high level;
Before judging the vbus on off states of each USB port, the vbus for closing the USB port for needing to exit manual mode is opened
It closes.
Optionally, the judgment module 901 is additionally operable to:
After receiving the second user instruction, if the level for needing to exit the ID pins of the USB port of manual mode
State is low level, opens the vbus switches for needing to exit the USB port of manual mode.
The embodiment of the present invention provides a kind of computing device readable storage medium storing program for executing, including program code, works as said program code
When running on the computing device, said program code is used to make the computing device to execute the side that USB controls adjust operating mode
The step of method.
Above by reference to showing according to the method, apparatus (system) of the embodiment of the present application and/or the frame of computer program product
Figure and/or flow chart describe the application.It should be understood that can realize that block diagram and or flow chart is shown by computer program instructions
The combination of one block of figure and the block of block diagram and or flow chart diagram.These computer program instructions can be supplied to logical
With computer, the processor of special purpose computer and/or other programmable data processing units so that via computer processor
And/or the instruction that executes of other programmable data processing units creates for realizing specified in block diagram and or flow chart block
The method of function action.
Correspondingly, the application can also be implemented with hardware and/or software (including firmware, resident software, microcode etc.).More
Further, the application can take computer usable or the shape of computer program product on computer readable storage medium
Formula has the computer realized in the medium usable or computer readable program code, to be made by instruction execution system
It is used with or in conjunction with instruction execution system.In the present context, computer can be used or computer-readable medium can be with
It is arbitrary medium, can includes, store, communicating, transmitting or transmitting program, is made by instruction execution system, device or equipment
With, or instruction execution system, device or equipment is combined to use.
Obviously, various changes and modifications can be made to the invention without departing from essence of the invention by those skilled in the art
God and range.In this way, if these modifications and changes of the present invention belongs to the range of the claims in the present invention and its equivalent technologies
Within, then the present invention is also intended to include these modifications and variations.
Claims (10)
1. a kind of method of adjustment operating mode, which is characterized in that this method includes:
USB controller judges each USB port after determining that the USB port for being arranged to manual mode all exits manual mode
Vbus on off states;Wherein, when USB port is configured to manual mode, the USB controller is according to the first user instruction to quilt
The vbus switches for being set as the USB port of manual mode are controlled;
When the vbus on off states of each USB port of determination are to be closed, operating mode is adjusted to device by the USB controller
Pattern.
2. the method as described in claim 1, which is characterized in that the USB controller is arranged to manual mode in determination
USB port all exits before manual mode, further includes:
The USB controller is indicated according to user, sets the control model of at least one USB port to manual mode.
3. method as claimed in claim 2, which is characterized in that the USB controller indicates according to user, will be at least one
The control model of USB port is set as after manual mode, further includes:
Operating mode is adjusted to otg patterns by the USB controller.
4. the method as described in claim 1, which is characterized in that be arranged to manual mode in USB controller determination
USB port all exits before manual mode, further includes:
The USB controller receives the ID interrupt signals of USB port triggering, and determines the USB port for triggering the ID interrupt signals
ID pins be high level;
Before the USB controller judges the vbus on off states of each USB port, further include:
The USB controller closes the vbus switches for the USB port for triggering the ID interrupt signals.
5. the method as described in claim 1, which is characterized in that be arranged to manual mode in USB controller determination
USB port all exits before manual mode, further includes:
The USB controller receives the second user instruction for the manual mode for indicating to exit USB port, and determination needs to exit hand
The ID pins of the USB port of dynamic model formula are high level;
Before the USB controller judges the vbus on off states of each USB port, further include:
The USB controller closes the vbus switches for the USB port for needing to exit manual mode.
6. method as claimed in claim 5, which is characterized in that this method further includes:
After the USB controller receives the second user instruction, if described need the ID for exiting the USB port of manual mode to draw
The level state of foot is low level, and the USB controller opens the vbus switches for needing to exit the USB port of manual mode.
7. a kind of USB controller, which is characterized in that including:At least one processing unit and at least one storage unit,
In, the storage unit has program stored therein code, when said program code is executed by the processing unit so that the processing
Unit executes following process:
After determining that the USB port for being arranged to manual mode all exits manual mode, the vbus switch shapes of each USB port are judged
State;Wherein, when USB port is configured to manual mode, according to first user instruction to being arranged to the USB port of manual mode
Vbus switches are controlled;When the vbus on off states of each USB port of determination are to be closed, operating mode is adjusted to device
Pattern.
8. USB controller as claimed in claim 7, which is characterized in that the processing unit is additionally operable to:
Before determining that the USB port for being arranged to manual mode all exits manual mode, indicated according to user, it will be at least one
The control model of USB port is set as manual mode.
9. USB controller as claimed in claim 7, which is characterized in that the processing unit is additionally operable to:
Before determining that the USB port for being arranged to manual mode all exits manual mode, the ID for receiving USB port triggering is interrupted
Signal, and determine that the ID pins for the USB port for triggering the ID interrupt signals are high level;
Before judging the vbus on off states of each USB port, the vbus for closing the USB port for triggering the ID interrupt signals is opened
It closes.
10. USB controller as claimed in claim 7, which is characterized in that the processing unit is additionally operable to:
Before determining that the USB port for being arranged to manual mode all exits manual mode, the hand for indicating to exit USB port is received
The second user of dynamic model formula instructs, and determines that the ID pins for the USB port for needing to exit manual mode are high level;
Before judging the vbus on off states of each USB port, the vbus switches for the USB port for needing to exit manual mode are closed.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810230135.5A CN108549612B (en) | 2018-03-20 | 2018-03-20 | Method for adjusting working mode and USB controller |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810230135.5A CN108549612B (en) | 2018-03-20 | 2018-03-20 | Method for adjusting working mode and USB controller |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108549612A true CN108549612A (en) | 2018-09-18 |
CN108549612B CN108549612B (en) | 2021-03-19 |
Family
ID=63516760
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810230135.5A Active CN108549612B (en) | 2018-03-20 | 2018-03-20 | Method for adjusting working mode and USB controller |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108549612B (en) |
Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20000008657A (en) * | 1998-07-15 | 2000-02-07 | 윤종용 | Power source management circuit for usb hub |
US20050134321A1 (en) * | 2003-12-09 | 2005-06-23 | Nokia Corporation | Interface for serial data communication |
CN1916879A (en) * | 2005-08-16 | 2007-02-21 | 凌阳科技股份有限公司 | USB device and method capable of automatic sensing mode of USB |
CN101340110A (en) * | 2008-04-29 | 2009-01-07 | 北京中星微电子有限公司 | USB OTC device power source and implementing method thereof |
CN101359316A (en) * | 2007-08-03 | 2009-02-04 | 大唐移动通信设备有限公司 | Method and apparatus for implementing general-purpose serial bus USB OTG |
CN101622612A (en) * | 2007-03-02 | 2010-01-06 | 密克罗奇普技术公司 | Detecting connection to a USB host or hub without using an extra status input |
CN101901201A (en) * | 2010-08-06 | 2010-12-01 | 中兴通讯股份有限公司 | Method and device for realizing USB OTG function on electronic equipment |
CN102831084A (en) * | 2012-08-16 | 2012-12-19 | 刘伟 | Controller and controlling method for re-identifying USB (universal serial bus) equipment |
CN103117490A (en) * | 2011-08-30 | 2013-05-22 | 瑞萨电子株式会社 | USB hub and control method of USB hub |
CN103559149A (en) * | 2013-10-30 | 2014-02-05 | 上海斐讯数据通信技术有限公司 | Method and system for working mode switchover of universal serial bus on-the-go (USB OTG) dual-role devices |
CN104253459A (en) * | 2013-06-28 | 2014-12-31 | 鸿富锦精密工业(深圳)有限公司 | USB device with power supply mode switching function |
CN104777891A (en) * | 2015-04-13 | 2015-07-15 | 广东欧珀移动通信有限公司 | OTG (on-the-go) connecting control method applied to intelligent terminal and connecting control device |
CN105824771A (en) * | 2015-10-28 | 2016-08-03 | 维沃移动通信有限公司 | Electronic device and master-slave switching method and apparatus thereof |
-
2018
- 2018-03-20 CN CN201810230135.5A patent/CN108549612B/en active Active
Patent Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20000008657A (en) * | 1998-07-15 | 2000-02-07 | 윤종용 | Power source management circuit for usb hub |
US20050134321A1 (en) * | 2003-12-09 | 2005-06-23 | Nokia Corporation | Interface for serial data communication |
CN1916879A (en) * | 2005-08-16 | 2007-02-21 | 凌阳科技股份有限公司 | USB device and method capable of automatic sensing mode of USB |
CN101622612A (en) * | 2007-03-02 | 2010-01-06 | 密克罗奇普技术公司 | Detecting connection to a USB host or hub without using an extra status input |
CN101359316A (en) * | 2007-08-03 | 2009-02-04 | 大唐移动通信设备有限公司 | Method and apparatus for implementing general-purpose serial bus USB OTG |
CN101340110A (en) * | 2008-04-29 | 2009-01-07 | 北京中星微电子有限公司 | USB OTC device power source and implementing method thereof |
CN101901201A (en) * | 2010-08-06 | 2010-12-01 | 中兴通讯股份有限公司 | Method and device for realizing USB OTG function on electronic equipment |
CN103117490A (en) * | 2011-08-30 | 2013-05-22 | 瑞萨电子株式会社 | USB hub and control method of USB hub |
CN102831084A (en) * | 2012-08-16 | 2012-12-19 | 刘伟 | Controller and controlling method for re-identifying USB (universal serial bus) equipment |
CN104253459A (en) * | 2013-06-28 | 2014-12-31 | 鸿富锦精密工业(深圳)有限公司 | USB device with power supply mode switching function |
CN103559149A (en) * | 2013-10-30 | 2014-02-05 | 上海斐讯数据通信技术有限公司 | Method and system for working mode switchover of universal serial bus on-the-go (USB OTG) dual-role devices |
CN104777891A (en) * | 2015-04-13 | 2015-07-15 | 广东欧珀移动通信有限公司 | OTG (on-the-go) connecting control method applied to intelligent terminal and connecting control device |
CN105824771A (en) * | 2015-10-28 | 2016-08-03 | 维沃移动通信有限公司 | Electronic device and master-slave switching method and apparatus thereof |
Also Published As
Publication number | Publication date |
---|---|
CN108549612B (en) | 2021-03-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101359316B (en) | Method and apparatus for implementing general-purpose serial bus USB OTG | |
CN109857243B (en) | System-on-chip, universal serial bus master device, system and awakening method | |
JP6936543B2 (en) | USB interface circuits and methods for low power operation | |
WO2011113349A1 (en) | Power management method and apparatus of a network access module | |
CN101943941B (en) | Information processing device and method for controlling power | |
CN102236405A (en) | Information equipment capable of reducing standby power and power control method | |
CN104111850B (en) | A kind of method and system for reducing micro-control unit MCU power consumptions | |
JP2001154763A (en) | Power saving device for local area network board | |
JP2003079067A (en) | Electric device, computer device, charging method in electric device, and charging method in computer device, and program | |
CN106648026A (en) | Head-mounted displaying device and method for lowering power consumption of head-mounted displaying device | |
CN109726059A (en) | A kind of server test system | |
CN107515668B (en) | Control method and device | |
CN105404209B (en) | A kind of system and method by USB transmission control display screen backlight illumination | |
CN103403635B (en) | Control device | |
CN108549612A (en) | A kind of method and USB controller of adjustment operating mode | |
CN105468549A (en) | Chip device and electronic system thereof | |
CN216118573U (en) | Electronic device and electronic system | |
CN116825013A (en) | Control device, control method and related equipment of display screen | |
CN203520299U (en) | Timer-power-on control circuit | |
CN109313561B (en) | System loading method and device | |
CN201335976Y (en) | Device for realizing communication between direct current panel and host computer based on communication manager | |
CN109426479A (en) | A kind of audio control method and audio-frequence player device | |
JP2724211B2 (en) | Computer system | |
CN103049419A (en) | Dual computer system | |
CN107465332B (en) | 8-track power supply controller |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP01 | Change in the name or title of a patent holder | ||
CP01 | Change in the name or title of a patent holder |
Address after: 266071 Shandong city of Qingdao province Jiangxi City Road No. 11 Patentee after: Qingdao Hisense Mobile Communication Technology Co.,Ltd. Address before: 266071 Shandong city of Qingdao province Jiangxi City Road No. 11 Patentee before: HISENSE MOBILE COMMUNICATIONS TECHNOLOGY Co.,Ltd. |