CN104090855A - Method and device for making USB (universal serial bus) mode and MHL (mobile high-definition link) mode of USB interface compatible - Google Patents

Method and device for making USB (universal serial bus) mode and MHL (mobile high-definition link) mode of USB interface compatible Download PDF

Info

Publication number
CN104090855A
CN104090855A CN201410252846.4A CN201410252846A CN104090855A CN 104090855 A CN104090855 A CN 104090855A CN 201410252846 A CN201410252846 A CN 201410252846A CN 104090855 A CN104090855 A CN 104090855A
Authority
CN
China
Prior art keywords
usb interface
mhl
pattern
usb
described usb
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
Application number
CN201410252846.4A
Other languages
Chinese (zh)
Other versions
CN104090855B (en
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.)
Hisense Mobile Communications Technology Co Ltd
Original Assignee
Hisense Mobile Communications Technology 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 Hisense Mobile Communications Technology Co Ltd filed Critical Hisense Mobile Communications Technology Co Ltd
Priority to CN201410252846.4A priority Critical patent/CN104090855B/en
Priority to CN201710432320.8A priority patent/CN107229579A/en
Priority to CN201710434303.8A priority patent/CN107273313A/en
Publication of CN104090855A publication Critical patent/CN104090855A/en
Application granted granted Critical
Publication of CN104090855B publication Critical patent/CN104090855B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/10Program control for peripheral devices
    • G06F13/102Program control for peripheral devices where the programme performs an interfacing function, e.g. device driver

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 invention provides a method and a device for making a USB (universal serial bus) mode and an MHL (mobile high definition link) mode of a USB interface compatible, and aims to solve the problem that requirements on analysis over an abnormal state or a deal halt state cannot be met due to the fact that required data cannot be stored and exported when a terminal is abnormal or halted. The method comprises the following steps: after the terminal is powered on, switching the terminal to the USB mode of the USB interface in the terminal; detecting whether MHL equipment is plugged into the USB interface or not; if the MHL equipment is plugged into the USB interface, switching the terminal to the MHL mode of the USB interface; detecting whether the MHL equipment is unplugged from the USB interface or not; if the MHL equipment is unplugged from the USB interface, switching the terminal to the USB mode of the USB interface. According to the method and the device, the terminal is stably kept in the USB mode of the USB interface when the MHL equipment is not plugged into the USB interface, so that the required data can be smoothly stored and exported when the terminal is abnormal or halted, and the requirements on the analysis over the abnormal state or the dead halt state are met.

Description

The USB pattern of USB interface and compatibility method and the device of MHL pattern
Technical field
The present invention relates to technical field of mobile terminals, particularly relate to a kind of compatibility method and device of USB pattern and MHL pattern of USB interface.
Background technology
MHL (Mobile High-Definition Link, mobile terminal high-definition audio and video standard interface) be a kind of audio-visual standard interface that connects portable electron device, the MHL function that mobile terminal is supported can realize the transmission of video resource, the built-in HDMI of the inner generally meeting of mobile terminal (High Definition Multimedia Interface, HDMI (High Definition Multimedia Interface)), MHL chip can be converted to MHL signal by source HDMI signal, video resource etc. can be presented on display device by HDMI.
In order to reduce the quantity of hardware interface, at present conventionally can be by (the Universal Serial Bus of existing USB on mobile terminal, USB (universal serial bus)) Interface realization MHL function, be USB interface compatible USB pattern and MHL pattern simultaneously, thereby make the structure of mobile terminal simpler.In the time having detected that USB device is inserted, be switched to the USB pattern of USB interface, in the time having detected that MHL equipment inserts, be switched to the MHL pattern of USB interface.
USB pattern basic function for user is charging and communicates by letter, it is the important channel of debug process obtaining information for developer, mobile terminal generally can be realized information under abnormality or deadlock state and preserve and derive under USB pattern, thereby provides foundation for subsequent analysis.
But; if in the time that USB interface is inserted without any equipment; mobile terminal occurs abnormal or crashes; because terminal now has not possessed normal function; USB interface cannot be switched to USB pattern; therefore also cannot preserve and derive desired data, thereby cannot meet the analysis demand for abnormality or deadlock state.
Summary of the invention
The invention provides a kind of compatibility method and device of USB pattern and MHL pattern of USB interface; while there is abnormal or deadlock to solve terminal; desired data cannot be preserved and derive, thereby the problem for the analysis demand of abnormality or deadlock state cannot be met.
In order to address the above problem, the invention discloses a kind of compatibility method of USB pattern and MHL pattern of USB interface, it is characterized in that, comprising:
After terminal powers on, be switched to the USB pattern of general-purpose serial bus USB interface in described terminal;
Whether detect has mobile terminal high-definition audio and video standard interface MHL equipment to insert described USB interface;
If there is MHL equipment to insert described USB interface, be switched to the MHL pattern of described USB interface;
Whether detect has MHL equipment to extract from described USB interface;
If there is MHL equipment to extract from described USB interface, be switched to the USB pattern of described USB interface.
Preferably, described USB interface comprises USB_ID pin;
The step whether described detection has MHL equipment to insert described USB interface comprises:
Detect the level of described USB_ID pin;
If detect that the level of described USB_ID pin is low level, reads the resistance to earth of described USB_ID pin;
If the resistance of the resistance to earth of described USB_ID pin is 1K Ω, defines MHL equipment and insert described USB interface.
Preferably, described USB interface comprises VBUS pin;
The step whether described detection has MHL equipment to extract from described USB interface comprises:
Detect the level of described VBUS pin;
If detect that the level of described VBUS pin is low level, judge whether current be the MHL pattern of described USB interface;
Be the MHL pattern of described USB interface if current, define MHL equipment and extract from described USB interface.
Preferably, described method also comprises:
After having detected that MHL equipment inserts described USB interface, the device identification setting in advance is recorded as to MHL.
Preferably, described USB interface comprises VBUS pin;
The step whether described detection has MHL equipment to extract from described USB interface comprises:
Detect the level of described VBUS pin;
If detect that the level of described VBUS pin is low level, whether the device identification setting in advance described in judging is MHL;
If described device identification is MHL, defines MHL equipment and extract from described USB interface.
Preferably, described terminal comprises switch;
The step of the described USB pattern that is switched to described USB interface comprises:
Control the USB pattern that described switch is switched to described USB interface;
The step of the described MHL pattern that is switched to described USB interface comprises:
Control the MHL pattern that described switch is switched to described USB interface.
Preferably, the step that is switched to the USB pattern of described USB interface described in comprises:
The USB path of USB interface described in gating, by described USB path transmission usb data;
The step of the described MHL pattern that is switched to described USB interface comprises:
The MHL path of USB interface described in gating, by described MHL path transmission MHL data.
According to a further aspect in the invention, also disclose a kind of compatible apparatus of USB pattern and MHL pattern of USB interface, it is characterized in that, having comprised:
The first handover module, after powering in terminal, is switched to the USB pattern of general-purpose serial bus USB interface in described terminal;
Insert detection module, for detection of whether having mobile terminal high-definition audio and video standard interface MHL equipment to insert described USB interface;
The second handover module, in the time that described insertion detection module has detected that MHL equipment inserts described USB interface, is switched to the MHL pattern of described USB interface;
Extract detection module, for detection of whether having MHL equipment to extract from described USB interface;
Described the first handover module, also for when extracting detection module and having detected that MHL equipment is extracted from described USB interface, being switched to the USB pattern of described USB interface described.
Preferably, described USB interface comprises USB_ID pin;
Described insertion detection module comprises:
The first detection sub-module, for detection of the level of described USB_ID pin;
Reading submodule, in the time that described the first detection sub-module detects that the level of described USB_ID pin is low level, reads the resistance to earth of described USB_ID pin;
Insert and determine submodule, while being 1K Ω for read the resistance of the resistance to earth of described USB_ID pin in described reading submodule, defining MHL equipment and insert described USB interface.
Preferably, described USB interface comprises VBUS pin;
The described detection module of extracting comprises:
The second detection sub-module, for detection of the level of described VBUS pin;
Mode decision submodule, in the time that described the second detection sub-module detects that the level of described VBUS pin is low level, judges whether current be the MHL pattern of described USB interface;
First determines submodule, when judge the current MHL pattern for described USB interface at described mode decision submodule, defines MHL equipment and extracts from described USB interface.
Preferably, described device also comprises:
Identification record module, for after described insertion detection module has detected that MHL equipment inserts described USB interface, is recorded as MHL by the device identification setting in advance.
Preferably, described USB interface comprises VBUS pin;
The described detection module of extracting comprises:
The 3rd detection sub-module, for detection of the level of described VBUS pin;
Mark judges submodule, and in the time that described the 3rd detection sub-module detects that the level of described VBUS pin is low level, whether the device identification setting in advance described in judging is MHL;
Second determines submodule, when judging that in described mark submodule is judged described device identification and is MHL, defines MHL equipment and extracts from described USB interface.
Compared with prior art, the present invention includes following advantage:
In the present invention, after terminal powers on, can be directly switch to the USB pattern of USB interface in terminal; Whether have MHL equipment insert described USB interface, if there is MHL equipment to insert described USB interface, can be switched to the MHL pattern of described USB interface if then starting to detect; And detect whether have MHL equipment to extract from described USB interface, if there is MHL equipment to extract from described USB interface, can be switched to the USB pattern of described USB interface.The present invention has ensured in the time that USB interface does not have MHL equipment to insert; can stablize the USB pattern that remains on USB interface; thereby in the time there is abnormal or deadlock in terminal; owing to being switched to the USB pattern of USB interface; therefore can preserve smoothly and derive desired data, to meet the analysis demand for abnormality or deadlock state.
Brief description of the drawings
Fig. 1 is a kind of USB pattern of USB interface of the embodiment of the present invention one and the process flow diagram of the compatibility method of MHL pattern;
Fig. 2 is a kind of USB pattern of USB interface of the embodiment of the present invention two and the process flow diagram of the compatibility method of MHL pattern;
Fig. 3 is the process flow diagram of a kind of concrete disposal route from starting up of terminal to shutdown of the embodiment of the present invention two;
Fig. 4 is a kind of USB pattern of USB interface of the embodiment of the present invention three and the structured flowchart of the compatible apparatus of MHL pattern.
Embodiment
For above-mentioned purpose of the present invention, feature and advantage can be become apparent more, below in conjunction with the drawings and specific embodiments, the present invention is further detailed explanation.
In order to reduce the quantity of hardware interface in terminal, conventionally can be based on existing USB interface compatible USB pattern and MHL pattern simultaneously, thus make the structure of terminal simpler.Insert without any equipment if USB interface is current; now can't be switched to any pattern of USB interface; if but now terminal occurs abnormal or crashes, and cannot preserve smoothly and derive desired data, thereby cannot meet the analysis demand for abnormality or deadlock state.
The present invention is directed to the problems referred to above, proposed a kind of compatibility method and device of USB pattern and MHL pattern of USB interface, can meet the problem for the analysis demand of terminal abnormal state or deadlock state.Below, describe in detail by following each embodiment.
Embodiment mono-:
With reference to Fig. 1, show a kind of USB pattern of USB interface of the embodiment of the present invention one and the process flow diagram of the compatibility method of MHL pattern, the method specifically can comprise the following steps:
Step 101, after terminal powers on, is switched to the USB pattern of USB interface in described terminal.
In the embodiment of the present invention, in described terminal, can comprise USB interface, this USB interface can compatible USB pattern and MHL pattern, both can realize the transmission of usb data by this USB interface, also can realize the transmission of MHL data, thereby can reduce the quantity of hardware interface, simplify the structure of terminal.Power in terminal and can be directly switch to the USB pattern of USB interface in terminal after (start).Wherein, described terminal can be smart mobile phone, panel computer etc.
Whether step 102, detect and have MHL equipment to insert described USB interface.
In the embodiment of the present invention, be switched to the USB pattern of described USB interface in above-mentioned steps 101 after, can detect in real time and whether have MHL equipment to insert described USB interface, can determine whether to switch the pattern of USB interface according to testing result.
Step 103, if there is MHL equipment to insert described USB interface, is switched to the MHL pattern of described USB interface.
Insert described USB interface if be tested with MHL equipment in step 102, explanation now needs to apply the MHL pattern of USB interface, therefore now can be switched to the MHL pattern of described USB interface.
Whether step 104, detect and have MHL equipment to extract from described USB interface.
In the embodiment of the present invention, due to after having MHL equipment insertion USB interface, be switched to the MHL pattern of USB interface.Therefore, whether detection in real time has MHL equipment to extract from described USB interface, can determine whether to switch the pattern of USB interface according to testing result.
Step 105, if there is MHL equipment to extract from described USB interface, is switched to the USB pattern of described USB interface.
Extract from described USB interface if be tested with MHL equipment in step 104, explanation now can be switched to the USB pattern of USB interface, therefore now can be switched to the USB pattern of described USB interface.
The embodiment of the present invention has ensured in the time that USB interface does not have MHL equipment to insert; can stablize the USB pattern that remains on USB interface; in the time having MHL equipment to insert, be switched to MHL pattern; thereby both ensured the smooth transmission of MHL data; also in the time there is abnormal or deadlock in terminal; owing to being switched to the USB pattern of USB interface, therefore can preserve smoothly and derive desired data, to meet the analysis demand for abnormality or deadlock state.
Embodiment bis-:
With reference to Fig. 2, show a kind of USB pattern of USB interface of the embodiment of the present invention two and the process flow diagram of the compatibility method of MHL pattern, the method specifically can comprise the following steps:
Step 201, after terminal powers on, is switched to the USB pattern of USB interface in described terminal.
In the embodiment of the present invention, terminal inner can comprise system master chip, USB interface, MHL chip and switch etc.Wherein, USB interface can compatible USB pattern and MHL pattern, and switch is mainly used in the switching of USB pattern and the MHL pattern of carrying out USB interface, and MHL chip is mainly for the treatment of some MHL data etc., switch can be integrated in MHL chip, also can independently arrange.
Power in terminal after (start) and can directly the pattern of USB interface be switched to USB pattern.In the embodiment of the present invention, by the pattern of USB interface be switched to USB pattern process can by the switch of control terminal inside be switched to described USB interface USB pattern realize.USB pattern and MHL pattern, respectively to there being path separately, are switched to USB pattern by the pattern of USB interface and are, and the USB path of USB interface described in gating, by described USB path transmission usb data.For the course of work under USB pattern, those skilled in the art carry out relevant treatment according to practical experience, and the embodiment of the present invention is discussed no longer in detail at this.
Terminal can also be carried out initialization after powering on, wherein, the initialization of terminal can be the initialization of the each chip of terminal inner, and initialization procedure can comprise the mark resistance that reads chip exterior, confirms that various device detects the precision of resistance, the level of configuring chip external pin, enabled state register, enables the equipment Inspection function of chip, and opens interrupters register makes system have instant response to outside connection, etc., the embodiment of the present invention is discussed no longer in detail at this.Can enabled devices measuring ability in terminal initialization process, whether whether this equipment Inspection function can detect in real time has equipment insert USB interface or have equipment to extract from USB interface, and type that can checkout equipment.
Whether step 202, detect and have MHL equipment to insert described USB interface.
After terminal powers on, USB interface is always stable remains on USB pattern, and whether terminal can detect in real time has MHL equipment to insert described USB interface.In the embodiment of the present invention, described USB interface can comprise that these five pins of USB_ID, VBUS, USB_D+, USB_D-and GND are connected, wherein, the normality of USB_ID pin is that the normality of high level, VBUS pin is low level, whether the level of these two pins changes can trigger interrupt routine, therefore can be detected and be had equipment insert or extract by the variation of its level.
In a preferred embodiment of the present invention, this step 202 can comprise following sub-step:
Sub-step a1, detects the level of described USB_ID pin;
Sub-step a2, if detect that the level of described USB_ID pin is low level, reads the resistance to earth of described USB_ID pin;
If the level of described USB_ID pin is high level, can illustrates and now not have equipment to insert USB interface.If the level of USB_ID pin is low level, can illustrates and now have equipment to insert USB interface, and the action that can trigger software and read the resistance to earth of USB_ID pin, can read the resistance to earth of USB_ID pin by ADC (Analog-to-digital converter, analog-digital converter).MHL interface standard consultation is the resistance value between each devices allocation USB_ID pin and ground, this resistance is connected across on access device, for example, for the intelligent television of supporting MHL, this resistance setting on TV, for the audio frequency apparatus that meets MHL agreement, this resistance is arranged on audio frequency apparatus.
It should be noted that, the normality of VBUS pin is low level, if the level of described VBUS pin is low level, can illustrates and now not have equipment to insert USB interface, if the level of VBUS pin is high level, the equipment that can illustrate inserts USB interface.Therefore whether, in the embodiment of the present invention, can also change to detect by the level of this VBUS pin has equipment to insert USB interface, but the type of the concrete equipment that inserts USB interface also will be determined according to the resistance to earth of USB_ID pin.
Sub-step a3, if the resistance of the resistance to earth of described USB_ID pin is 1K Ω, defines MHL equipment and inserts described USB interface.
Various device is in the time of access USB interface, the resistance of the resistance to earth of USB_ID pin is different, and for example, when USB device access, the resistance of the resistance to earth of USB_ID pin is 0 Ω, when MHL equipment access, the resistance of the resistance to earth of USB_ID pin is 1K Ω, etc.If therefore detecting the resistance of the resistance to earth of described USB_ID pin is 1K Ω, can defines MHL equipment and insert described USB interface.
Step 203, if there is MHL equipment to insert described USB interface, is switched to the MHL pattern of described USB interface.
If detect and do not have MHL equipment to insert described USB interface,, because USB interface is just now USB pattern, therefore do not carry out the switching of USB interface pattern in step 202.If detected that in step 202 MHL equipment inserts described USB interface, the MHL pattern that now needs to use USB interface can be described, therefore can be switched to the MHL pattern of described USB interface.
In the embodiment of the present invention, by the pattern of USB interface be switched to MHL pattern process can by the switch of control terminal inside be switched to described USB interface MHL pattern realize.USB pattern and MHL pattern, respectively to there being path separately, are switched to MHL pattern by the pattern of USB interface and are, and the MHL path of USB interface described in gating, by described USB path transmission MHL data.For the course of work under MHL pattern, those skilled in the art carry out relevant treatment according to practical experience, and the embodiment of the present invention is discussed no longer in detail at this.
Step 204, after having detected that MHL equipment inserts described USB interface, is recorded as MHL by the device identification setting in advance.
In the embodiment of the present invention, can set in advance a device identification, this device identification can be recorded as sky under normal circumstances, for example, after terminal powers on, this device identification can be recorded as to sky.After having detected that in above-mentioned steps 202 MHL equipment inserts USB interface, the device identification that this can also be set in advance is recorded as MHL, and device identification is that MHL can illustrate that MHL equipment inserts USB interface.
Whether step 205, detect and have MHL equipment to extract from described USB interface.
In the embodiment of the present invention, due to after having MHL equipment insertion USB interface, be switched to the MHL pattern of USB interface.Therefore, whether detection in real time has equipment to extract from described USB interface.
In a preferred embodiment of the present invention, this step 205 can comprise following sub-step:
Sub-step b1, detects the level of described VBUS pin;
Sub-step b2, if detect that the level of described VBUS pin is low level, judges whether current be the MHL pattern of described USB interface;
Sub-step b3, is the MHL pattern of described USB interface if current, defines MHL equipment and extracts from described USB interface.
The normality of VBUS pin is low level, if detect that the level of described VBUS pin is high level, can illustrate that now existing device inserts USB interface, if detect that the level of VBUS pin is low level, the equipment that can illustrate is extracted from described USB interface.
It should be noted that, if in the embodiment of the present invention existing device insert USB interface, if equipment be MHL equipment the level of USB_ID pin be low level, MHL equipment successfully shake hands set up communication after USB_ID pin will maintain high level.
In the time that the equipment that detects is extracted (level that described VBUS pin detected is low level) from described USB interface, can further determine whether current extracted equipment is MHL equipment.Owing to having MHL equipment after described USB interface is extracted, should ensure that USB interface is in USB pattern, therefore in the embodiment of the present invention, can judge whether current (when the equipment that detects is extracted from described USB interface) is the MHL pattern of described USB interface.Because the MHL pattern of USB interface is in the pattern that detects that MHL equipment is switched to while inserting USB interface, if therefore judge the current MHL pattern for USB interface, can illustrate that extracted equipment is MHL equipment.
For example, in embodiments of the present invention, can also set in advance one for recording the pattern identification of current USB interface pattern, in the time being switched to the USB pattern of USB interface, this pattern identification can be recorded as to USB, in the time being switched to the MHL pattern of USB interface, this pattern identification can be recorded as to MHL.Therefore, can judge current according to this pattern identification setting in advance and whether be the MHL pattern of described USB interface, be MHL if judge current pattern identification, the current MHL pattern for described USB interface can be described.
It should be noted that, whether there is MHL equipment to extract from described USB interface if adopt the method shown in above-mentioned sub-step b1~sub-step b3 to detect, because the device identification not being applied in step 204 judges, therefore in this kind of situation, above-mentioned steps 204 can be do not carried out, after execution of step 203, this step 205 can be carried out.
In another kind of preferred embodiment of the present invention, this step 205 can comprise following sub-step:
Sub-step c1, detects the level of described VBUS pin;
Sub-step c2, if detect that the level of described VBUS pin is low level, whether the device identification setting in advance described in judging is MHL;
Sub-step c3, if described device identification is MHL, determines the pattern that need to switch described USB interface.
If detect that the level of VBUS pin is low level, the equipment that can illustrate is extracted from described USB interface, then can further determine whether current extracted equipment is MHL equipment.There iing MHL equipment after described USB interface is extracted, should ensure that USB interface is in USB pattern, and in the time having detected that MHL equipment inserts USB interface, can be switched to the MHL pattern of USB interface, in the time having detected that USB device is inserted USB interface, can not be switched to the MHL pattern of USB interface, in the time having USB device to insert USB interface, still remain on the USB pattern of USB interface.Therefore,, in the time that the equipment of extracting from described USB interface is MHL equipment, can determine the pattern that need to switch USB interface.Be MHL if judge device identification, can determine that the equipment of extracting from described USB interface is MHL equipment.
It should be noted that, whether there is MHL equipment to extract from described USB interface if adopt the method shown in above-mentioned sub-step c1~sub-step c3 to detect,, because the device identification being applied in step 204 judges, therefore in this kind of situation, to carry out above-mentioned steps 204.And, in this step 205, detect that MHL equipment is after described USB interface is extracted, this device identification can be recorded as to sky.
Step 206, if there is MHL equipment to extract from described USB interface, is switched to the USB pattern of described USB interface.
Do not have MHL equipment to extract from described USB interface if judged in step 205, do not process.Extract from described USB interface if judged MHL equipment in step 205, the current MHL pattern for USB interface can be described, therefore can be switched to the USB pattern of described USB interface.For the detailed process of USB pattern that is switched to USB interface, with reference to the associated description in above-mentioned steps 201, the embodiment of the present invention is discussed no longer in detail at this.
Finally, it should be noted that, above-mentioned steps 202~step 203, and step 204~step 206 liang group step process is not limited to said sequence, can also first perform step 204~step 206, perform step again 202~step 203, also can perform step 202~step 203 simultaneously, and, these two groups of steps of step 204~step 206, the embodiment of the present invention is not limited this.
Specifically introduce a kind of disposal route from starting up of terminal to shutdown below.With reference to Fig. 3, show the process flow diagram of a kind of concrete disposal route from starting up of terminal to shutdown of the embodiment of the present invention two, the method can comprise following process:
1, start.
In the embodiment of the present invention, two kinds of patterns that terminal can be set are respectively Bypass pattern (communication pattern) and Charge-Detect pattern (charging detecting pattern).
2, enter Bypass pattern, be switched to the USB pattern of USB interface.
3, terminal initialization, enabled devices measuring ability, enters Charge-Detect pattern after initialization completes.
Now can enter the low power consumpting state (D3-HOT state) of terminal.
4, detected that MHL equipment inserts USB interface, is switched to the MHL pattern of USB interface; Detect that MHL equipment extracts from USB interface, be switched to the USB pattern of USB interface.
5, standby.
Now can enter the low power consumpting state (D3-HOT state) of terminal, can pass through the register of I2C (Inter-Integrated Circuit, IC bus) read-write terminal inside, software has the ability of controlling switch.
6, detected that MHL equipment inserts USB interface, is switched to the MHL pattern of USB interface; Detect that MHL equipment extracts from USB interface, be switched to the USB pattern of USB interface.
7, dormancy.
In the time that system enters dormant state, the FW_WAKE pin on MHL chip is low level, meets and enters D3-COLD power consumption mode condition, can not read register by I2C, and actual measurement standby current reduces about 0.7mA when normal.
8, enter super low-power consumption pattern (D3-COLD pattern), forbid equipment Inspection function.
9, wake up.
The low power consumpting state (D3-HOT state) that now can enter terminal, FW_WAKE pin is high level, I2C read-write comes into force.
10, terminal reinitializes, enabled devices measuring ability.
11, detected that MHL equipment inserts USB interface, is switched to the MHL pattern of USB interface; Detect that MHL equipment extracts from USB interface, be switched to the USB pattern of USB interface.
12, shutdown.
13, before shutdown, close MHL pattern, enter Bypass pattern.
Before shutdown, MHL is carried out to shutoff operation, can remove the setting to register simultaneously, enter Bypass pattern, be switched to the USB pattern of USB interface, can transmit and preserve corresponding data, increased the stability of system USB function.
In the embodiment of the present invention, can ensure at starting up of terminal in the whole process of shutdown; in the time that USB interface does not have MHL equipment to insert; can stablize the USB pattern that remains on USB interface; thereby in the time there is abnormal or deadlock in terminal; owing to being switched to the USB pattern of USB interface; can preserve smoothly and derive desired data, to meet the analysis demand for abnormality or deadlock state.
For aforesaid each embodiment of the method, for simple description, therefore it is all expressed as to a series of combination of actions, but those skilled in the art should know, the present invention is not subject to the restriction of described sequence of movement, because according to the present invention, some step can adopt other orders or carry out simultaneously.Secondly, those skilled in the art also should know, the embodiment described in instructions all belongs to preferred embodiment, and related action and module might not be that the present invention is necessary.
Embodiment tri-:
With reference to Fig. 4, show a kind of USB pattern of USB interface of the embodiment of the present invention three and the structured flowchart of the compatible apparatus of MHL pattern, this device specifically can comprise with lower module:
The first handover module 401, after powering in terminal, is switched to the USB pattern of general-purpose serial bus USB interface in described terminal;
Insert detection module 402, for detection of whether having mobile terminal high-definition audio and video standard interface MHL equipment to insert described USB interface;
The second handover module 403, in the time that described insertion detection module has detected that MHL equipment inserts described USB interface, is switched to the MHL pattern of described USB interface;
Extract detection module 404, for detection of whether having MHL equipment to extract from described USB interface;
Wherein, described the first handover module, also for when extracting detection module and having detected that MHL equipment is extracted from described USB interface, being switched to the USB pattern of described USB interface described.
Wherein, described USB interface can comprise that these five pins of USB_ID, VBUS, USB_D+, USB_D-and GND are connected.
Described insertion detection module can comprise following submodule:
The first detection sub-module, for detection of the level of described USB_ID pin;
Reading submodule, in the time that described the first detection sub-module detects that the level of described USB_ID pin is low level, reads the resistance to earth of described USB_ID pin;
Insert and determine submodule, while being 1K Ω for read the resistance of the resistance to earth of described USB_ID pin in described reading submodule, defining MHL equipment and insert described USB interface.
In a preferred embodiment of the present invention, described in extract detection module and can comprise following submodule:
The second detection sub-module, for detection of the level of described VBUS pin;
Mode decision submodule, in the time that described the second detection sub-module detects that the level of described VBUS pin is low level, judges whether current be the MHL pattern of described USB interface;
First determines submodule, when judge the current MHL pattern for described USB interface at described mode decision submodule, defines MHL equipment and extracts from described USB interface.
In another kind of preferred embodiment of the present invention, described device can also comprise identification record module, for after described insertion detection module has detected that MHL equipment inserts described USB interface, the device identification setting in advance is recorded as to MHL.The described detection module of extracting can comprise following submodule: the 3rd detection sub-module, for detection of the level of described VBUS pin; Mark judges submodule, and in the time that described the 3rd detection sub-module detects that the level of described VBUS pin is low level, whether the device identification setting in advance described in judging is MHL; Second determines submodule, when judging that in described mark submodule is judged described device identification and is MHL, defines MHL equipment and extracts from described USB interface.
Described terminal can comprise switch.Described the first handover module, specifically can be switched to for controlling described switch the USB pattern of described USB interface.Described the second handover module, specifically can be switched to for controlling described switch the MHL pattern of described USB interface.
Described the first handover module, specifically can also be used for the USB path of USB interface described in gating, by described USB path transmission usb data; Described the second handover module, specifically can also be used for the MHL path of USB interface described in gating, by described MHL path transmission MHL data.
In the embodiment of the present invention after terminal powers on, can be directly switch to the USB pattern of USB interface in terminal, whether have MHL equipment insert described USB interface, if there is MHL equipment to insert described USB interface, can be switched to the MHL pattern of described USB interface if then starting to detect; And detect whether have MHL equipment to extract from described USB interface, if there is MHL equipment to extract from described USB interface, can be switched to the USB pattern of described USB interface.The embodiment of the present invention has ensured in the time that USB interface does not have MHL equipment to insert; can stablize the USB pattern that remains on USB interface; thereby in the time there is abnormal or deadlock in terminal; owing to being switched to the USB pattern of USB interface; therefore can preserve smoothly and derive desired data, to meet the analysis demand for abnormality or deadlock state.
For device embodiment, because it is substantially similar to embodiment of the method, so description is fairly simple, relevant part is referring to the part explanation of embodiment of the method.
Each embodiment in this instructions all adopts the mode of going forward one by one to describe, and what each embodiment stressed is and the difference of other embodiment, between each embodiment identical similar part mutually referring to.
The present invention can describe in the general context of computer executable instructions, for example program module.Usually, program module comprises and carries out particular task or realize routine, program, object, assembly, data structure of particular abstract data type etc.Also can in distributed computing environment, put into practice the present invention, in these distributed computing environment, be executed the task by the teleprocessing equipment being connected by communication network.In distributed computing environment, program module can be arranged in the local and remote computer-readable storage medium including memory device.
Finally, also it should be noted that, in this article, relational terms such as the first and second grades is only used for an entity or operation to separate with another entity or operational zone, and not necessarily requires or imply and between these entities or operation, have the relation of any this reality or sequentially.And, term " comprises ", " comprising " or its any other variant are intended to contain comprising of nonexcludability, thereby the process, method, commodity or the equipment that make to comprise a series of key elements not only comprise those key elements, but also comprise other key elements of clearly not listing, or be also included as the intrinsic key element of this process, method, commodity or equipment.The in the situation that of more restrictions not, the key element being limited by statement " comprising ... ", and be not precluded within process, method, commodity or the equipment that comprises described key element and also have other identical element.
Compatibility method and the device of the USB pattern to a kind of USB interface provided by the present invention and MHL pattern above, be described in detail, applied specific case herein principle of the present invention and embodiment are set forth, the explanation of above embodiment is just for helping to understand method of the present invention and core concept thereof; , for one of ordinary skill in the art, according to thought of the present invention, all will change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention meanwhile.

Claims (12)

1. the USB pattern of USB interface and a compatibility method for MHL pattern, is characterized in that, comprising:
After terminal powers on, be switched to the USB pattern of general-purpose serial bus USB interface in described terminal;
Whether detect has mobile terminal high-definition audio and video standard interface MHL equipment to insert described USB interface;
If there is MHL equipment to insert described USB interface, be switched to the MHL pattern of described USB interface;
Whether detect has MHL equipment to extract from described USB interface;
If there is MHL equipment to extract from described USB interface, be switched to the USB pattern of described USB interface.
2. method according to claim 1, is characterized in that, described USB interface comprises USB_ID pin;
The step whether described detection has MHL equipment to insert described USB interface comprises:
Detect the level of described USB_ID pin;
If detect that the level of described USB_ID pin is low level, reads the resistance to earth of described USB_ID pin;
If the resistance of the resistance to earth of described USB_ID pin is 1K Ω, defines MHL equipment and insert described USB interface.
3. method according to claim 1, is characterized in that, described USB interface comprises VBUS pin;
The step whether described detection has MHL equipment to extract from described USB interface comprises:
Detect the level of described VBUS pin;
If detect that the level of described VBUS pin is low level, judge whether current be the MHL pattern of described USB interface;
Be the MHL pattern of described USB interface if current, define MHL equipment and extract from described USB interface.
4. method according to claim 1, is characterized in that, also comprises:
After having detected that MHL equipment inserts described USB interface, the device identification setting in advance is recorded as to MHL.
5. method according to claim 4, is characterized in that, described USB interface comprises VBUS pin;
The step whether described detection has MHL equipment to extract from described USB interface comprises:
Detect the level of described VBUS pin;
If detect that the level of described VBUS pin is low level, whether the device identification setting in advance described in judging is MHL;
If described device identification is MHL, defines MHL equipment and extract from described USB interface.
6. according to the method described in claim 1-5 any one, it is characterized in that, described terminal comprises switch;
The step of the described USB pattern that is switched to described USB interface comprises:
Control the USB pattern that described switch is switched to described USB interface;
The step of the described MHL pattern that is switched to described USB interface comprises:
Control the MHL pattern that described switch is switched to described USB interface.
7. according to the method described in claim 1-5 any one, it is characterized in that,
The step of the described USB pattern that is switched to described USB interface comprises:
The USB path of USB interface described in gating, by described USB path transmission usb data;
The step of the described MHL pattern that is switched to described USB interface comprises:
The MHL path of USB interface described in gating, by described MHL path transmission MHL data.
8. the USB pattern of USB interface and a compatible apparatus for MHL pattern, is characterized in that, comprising:
The first handover module, after powering in terminal, is switched to the USB pattern of general-purpose serial bus USB interface in described terminal;
Insert detection module, for detection of whether having mobile terminal high-definition audio and video standard interface MHL equipment to insert described USB interface;
The second handover module, in the time that described insertion detection module has detected that MHL equipment inserts described USB interface, is switched to the MHL pattern of described USB interface;
Extract detection module, for detection of whether having MHL equipment to extract from described USB interface;
Described the first handover module, also for when extracting detection module and having detected that MHL equipment is extracted from described USB interface, being switched to the USB pattern of described USB interface described.
9. device according to claim 8, is characterized in that, described USB interface comprises USB_ID pin;
Described insertion detection module comprises:
The first detection sub-module, for detection of the level of described USB_ID pin;
Reading submodule, in the time that described the first detection sub-module detects that the level of described USB_ID pin is low level, reads the resistance to earth of described USB_ID pin;
Insert and determine submodule, while being 1K Ω for read the resistance of the resistance to earth of described USB_ID pin in described reading submodule, defining MHL equipment and insert described USB interface.
10. device according to claim 8, is characterized in that, described USB interface comprises VBUS pin;
The described detection module of extracting comprises:
The second detection sub-module, for detection of the level of described VBUS pin;
Mode decision submodule, in the time that described the second detection sub-module detects that the level of described VBUS pin is low level, judges whether current be the MHL pattern of described USB interface;
First determines submodule, when judge the current MHL pattern for described USB interface at described mode decision submodule, defines MHL equipment and extracts from described USB interface.
11. devices according to claim 8, is characterized in that, also comprise:
Identification record module, for after described insertion detection module has detected that MHL equipment inserts described USB interface, is recorded as MHL by the device identification setting in advance.
12. devices according to claim 11, is characterized in that, described USB interface comprises VBUS pin;
The described detection module of extracting comprises:
The 3rd detection sub-module, for detection of the level of described VBUS pin;
Mark judges submodule, and in the time that described the 3rd detection sub-module detects that the level of described VBUS pin is low level, whether the device identification setting in advance described in judging is MHL;
Second determines submodule, when judging that in described mark submodule is judged described device identification and is MHL, defines MHL equipment and extracts from described USB interface.
CN201410252846.4A 2014-06-09 2014-06-09 The USB mode of USB interface and the compatibility method and device of MHL patterns Active CN104090855B (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CN201410252846.4A CN104090855B (en) 2014-06-09 2014-06-09 The USB mode of USB interface and the compatibility method and device of MHL patterns
CN201710432320.8A CN107229579A (en) 2014-06-09 2014-06-09 The USB mode of USB interface and the compatibility method and device of MHL patterns
CN201710434303.8A CN107273313A (en) 2014-06-09 2014-06-09 The USB mode of USB interface and the compatibility method and device of MHL patterns

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410252846.4A CN104090855B (en) 2014-06-09 2014-06-09 The USB mode of USB interface and the compatibility method and device of MHL patterns

Related Child Applications (2)

Application Number Title Priority Date Filing Date
CN201710432320.8A Division CN107229579A (en) 2014-06-09 2014-06-09 The USB mode of USB interface and the compatibility method and device of MHL patterns
CN201710434303.8A Division CN107273313A (en) 2014-06-09 2014-06-09 The USB mode of USB interface and the compatibility method and device of MHL patterns

Publications (2)

Publication Number Publication Date
CN104090855A true CN104090855A (en) 2014-10-08
CN104090855B CN104090855B (en) 2017-08-04

Family

ID=51638572

Family Applications (3)

Application Number Title Priority Date Filing Date
CN201710432320.8A Pending CN107229579A (en) 2014-06-09 2014-06-09 The USB mode of USB interface and the compatibility method and device of MHL patterns
CN201410252846.4A Active CN104090855B (en) 2014-06-09 2014-06-09 The USB mode of USB interface and the compatibility method and device of MHL patterns
CN201710434303.8A Pending CN107273313A (en) 2014-06-09 2014-06-09 The USB mode of USB interface and the compatibility method and device of MHL patterns

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN201710432320.8A Pending CN107229579A (en) 2014-06-09 2014-06-09 The USB mode of USB interface and the compatibility method and device of MHL patterns

Family Applications After (1)

Application Number Title Priority Date Filing Date
CN201710434303.8A Pending CN107273313A (en) 2014-06-09 2014-06-09 The USB mode of USB interface and the compatibility method and device of MHL patterns

Country Status (1)

Country Link
CN (3) CN107229579A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104765705A (en) * 2015-04-22 2015-07-08 广东欧珀移动通信有限公司 Method and device for reading data stored by turned-off mobile terminal and mobile terminal
CN104809091A (en) * 2015-04-21 2015-07-29 天津三星电子有限公司 Adapter device
WO2016058471A1 (en) * 2014-10-13 2016-04-21 深圳Tcl新技术有限公司 Display device and method for implementing new-connection notification function for mhl signal source
CN105589823A (en) * 2014-10-22 2016-05-18 乐视移动智能信息技术(北京)有限公司 Method, apparatus and circuit for realizing USB (universal serial bus) interface multiplexing MHL (mobile high-definition link)
CN105791732A (en) * 2014-12-23 2016-07-20 乐视移动智能信息技术(北京)有限公司 Processing method and apparatus for MHL (Mobile High-Definition Link) driver
CN105914547A (en) * 2016-05-25 2016-08-31 广东欧珀移动通信有限公司 Data line, charging device and method of intelligently recognizing and switching OTG thereof
CN105975414A (en) * 2015-10-26 2016-09-28 乐视移动智能信息技术(北京)有限公司 Method and device for controlling mobile terminal
CN106485160A (en) * 2015-08-31 2017-03-08 联芯科技有限公司 A kind of data guard method of terminal unit, system and terminal unit
CN112181880A (en) * 2020-09-09 2021-01-05 深圳拔越软件有限公司 Method and device for controlling switching of USB channel

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6954815B2 (en) * 2000-11-10 2005-10-11 Sanyo Electric Co., Ltd. Microcomputer with universal serial bus interface circuit and method of controlling the same
CN102932683A (en) * 2012-10-26 2013-02-13 深圳Tcl新技术有限公司 Mobile high-definition link (MHL) realizing method and video playing device
CN103237189A (en) * 2013-03-26 2013-08-07 北京小米科技有限责任公司 Electronic equipment, MHL (mobile high-definition link) connector, MHL system and connector detection method

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102572352B (en) * 2011-12-26 2014-12-10 中兴通讯股份有限公司 HDMI multiplexing method, HDMI, and equipped provided with HDMI
CN202475500U (en) * 2011-12-26 2012-10-03 惠州Tcl移动通信有限公司 USB circuit for handset and the handset
TW201329731A (en) * 2012-01-06 2013-07-16 Ite Tech Inc Apparatus and method of identifying a USB or an MHL device
CN102890666B (en) * 2012-07-13 2015-09-30 华为终端有限公司 A kind of devices and methods therefor of shared interface, communication terminal
CN103117465B (en) * 2013-02-26 2015-09-30 周法勇 A kind of multifrnction connector

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6954815B2 (en) * 2000-11-10 2005-10-11 Sanyo Electric Co., Ltd. Microcomputer with universal serial bus interface circuit and method of controlling the same
CN102932683A (en) * 2012-10-26 2013-02-13 深圳Tcl新技术有限公司 Mobile high-definition link (MHL) realizing method and video playing device
CN103237189A (en) * 2013-03-26 2013-08-07 北京小米科技有限责任公司 Electronic equipment, MHL (mobile high-definition link) connector, MHL system and connector detection method

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016058471A1 (en) * 2014-10-13 2016-04-21 深圳Tcl新技术有限公司 Display device and method for implementing new-connection notification function for mhl signal source
US9942378B2 (en) 2014-10-13 2018-04-10 Shenzhen Tcl New Technology Co., Ltd Display device and method for implementing incoming notification function with respect to MHL signal source
CN105589823A (en) * 2014-10-22 2016-05-18 乐视移动智能信息技术(北京)有限公司 Method, apparatus and circuit for realizing USB (universal serial bus) interface multiplexing MHL (mobile high-definition link)
CN105791732A (en) * 2014-12-23 2016-07-20 乐视移动智能信息技术(北京)有限公司 Processing method and apparatus for MHL (Mobile High-Definition Link) driver
CN104809091A (en) * 2015-04-21 2015-07-29 天津三星电子有限公司 Adapter device
CN104809091B (en) * 2015-04-21 2017-11-14 天津三星电子有限公司 A kind of switching device
CN104765705A (en) * 2015-04-22 2015-07-08 广东欧珀移动通信有限公司 Method and device for reading data stored by turned-off mobile terminal and mobile terminal
CN104765705B (en) * 2015-04-22 2017-11-07 广东欧珀移动通信有限公司 Read method, device and a kind of mobile terminal for the mobile terminal stored data do not started shooting
CN106485160A (en) * 2015-08-31 2017-03-08 联芯科技有限公司 A kind of data guard method of terminal unit, system and terminal unit
CN105975414A (en) * 2015-10-26 2016-09-28 乐视移动智能信息技术(北京)有限公司 Method and device for controlling mobile terminal
CN105914547A (en) * 2016-05-25 2016-08-31 广东欧珀移动通信有限公司 Data line, charging device and method of intelligently recognizing and switching OTG thereof
CN112181880A (en) * 2020-09-09 2021-01-05 深圳拔越软件有限公司 Method and device for controlling switching of USB channel

Also Published As

Publication number Publication date
CN104090855B (en) 2017-08-04
CN107229579A (en) 2017-10-03
CN107273313A (en) 2017-10-20

Similar Documents

Publication Publication Date Title
CN104090855A (en) Method and device for making USB (universal serial bus) mode and MHL (mobile high-definition link) mode of USB interface compatible
CN102455886B (en) Method for dynamically identifying and configuring external display
CN203224819U (en) Mainboard
CN102520272B (en) Test system of power down protection function of smart card and method
US9684578B2 (en) Embedded universal serial bus (USB) debug (EUD) for multi-interfaced debugging in electronic systems
CN103563334A (en) Method, apparatus and system for transitioning an audio/video device between a source and a sink mode
CN102945652A (en) Method and system for solving abnormal display of display screen
CN104166610A (en) Mobile terminal detection method and detection system
CN113407393B (en) Chip verification method, terminal device, verification platform and storage medium
CN113077834A (en) Storage device testing method and device, television and storage medium
CN109298266A (en) Test macro, test method, test device and storage medium
CN112799985B (en) USB interface control method, USB control circuit and intelligent networking equipment mainboard
CN104239211A (en) Method and device for enabling mobile terminal to rapidly enter test mode
CN102854417B (en) Master test board and testing method thereof
CN104571942A (en) Data storage system and method analyzing non-signal
US20090083486A1 (en) Testing device of card reading interface and testing method thereof
CN101364198A (en) Testing tool for card reading interface and testing method thereof
CN110008105A (en) A kind of BMC time reservation method, device and electronic equipment and storage medium
CN102833513B (en) High definition player
CN107704417A (en) The method and its communication system to be communicated with equipment under test
US20150370673A1 (en) System and method for providing a communication channel to a power management integrated circuit in a pcd
US20160360568A1 (en) SSIC device and link control method for SSIC device
CN103365735A (en) Transmission interface and method for determining transmission signal
CN106713902A (en) Camera module fault detection method and apparatus, and terminal
CN114461479A (en) Method and device for debugging multimedia processing chip, storage medium and electronic equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address

Address after: 266071 Shandong city of Qingdao province Jiangxi City Road No. 11

Patentee after: Qingdao Hisense Mobile Communication Technology Co.,Ltd.

Country or region after: China

Address before: 266071 Shandong city of Qingdao province Jiangxi City Road No. 11

Patentee before: HISENSE MOBILE COMMUNICATIONS TECHNOLOGY Co.,Ltd.

Country or region before: China

CP03 Change of name, title or address