USB3.0 transmission rates method to set up, mobile terminal and storage medium
Technical field
The present invention relates to the USB technical fields of mobile terminal, more particularly to a kind of USB3.0 transmission rates method to set up, shifting
Dynamic terminal and storage medium.
Background technology
Mobile terminal is carried out data transmission using USB port and the equipment such as computer, notebook at present, and in order that transmission speed
Faster, usb protocol has been upgraded to 3.0, USB3.0 and initiated by companies such as intel degree, it is contemplated that the USB2.0 generally used is maximum
Transmission speed is 60MB/s, and USB3.0 maximum transfer speed can then reach 500MB/s, therefore USB3.0 is for hardware
Condition is harsher, to ensure that signal will not distortion when so high speed is transmitted.
On the other hand, when data is transmitted at high speeds, because the data volume of unit interval inner treater processing is doubled and redoubled,
Uprise the processor speed of service, so as to easily make processor generate heat, and chip many in mobile terminal is narrow and small close at one
In the space closed, it is easy to accumulation of heat caused by making the heating of each chip, be transmitted on USB controller and lead, make
USB3.0 distorted signals, make the error in data of transmission cause to retransmit, reduce the efficiency of transmission.
Therefore, prior art has yet to be improved and developed.
The content of the invention
The technical problem to be solved in the present invention is, for the drawbacks described above of prior art, there is provided a kind of USB3.0 transmission
Rate setting method, mobile terminal and storage medium, it is intended to by detect temperature anomaly set USB3.0 transmission rates and
Detection frequency is adjusted according to range of temperature to prevent USB3.0 enables process heat from building up, causes asking for efficiency of transmission reduction
Topic, and the power consumption of temperature testing equipment is reduced, it is user-friendly.
The technical proposal for solving the technical problem of the invention is as follows:
A kind of USB3.0 transmission rates method to set up, wherein, the USB3.0 transmission rates method to set up includes:
When USB3.0 is enabled, one super temporally variable timer is set, for adjusting central processing unit and temperature inductor
The detection frequency of current operating temperature;
Whether temperature inductor judges the current operating temperature of the central processing unit and temperature inductor beyond default normal work
The temperature range of work, if then feeding back interrupt signal to central processing unit;
When central processing unit receives the interrupt signal, controlling USB3.0 transmission rate reduces a step value.
Described USB3.0 transmission rate methods to set up, wherein, described when USB3.0 is enabled, control is one super temporally variable
Timer, for adjust central processing unit and temperature inductor current operating temperature detection frequency before also include:
Default a temperature threshold and time threshold.
Described USB3.0 transmission rate methods to set up, wherein, the timer is provided with the first overtime gear and the second surpassed
When gear, the first overtime gear be 5 seconds;The second overtime gear is 60 seconds.
Described USB3.0 transmission rate methods to set up, wherein, it is described when USB3.0 is enabled, set one super temporally variable
Timer, include for adjusting the detection frequency of current operating temperature of central processing unit and temperature inductor:
When the current operating temperature of central processing unit or temperature inductor differ by more than with the operating temperature before detected it is described
Temperature threshold, control timer are the first overtime gear, obtain present system time and mark;
When the current operating temperature of central processing unit or temperature inductor is differed less than described with the operating temperature detected before
Temperature threshold, by present system time compared with the system time preserved before, time difference is more than the time threshold
When, control timer is the second overtime gear, obtains present system time and marks;
If time difference is less than default time threshold, control timer is the first overtime gear, obtains present system time
And mark.
Described USB3.0 transmission rate methods to set up, wherein, the temperature inductor judge the central processing unit and
Whether the current operating temperature of temperature inductor is beyond the temperature range for presetting normal work, if then being fed back to central processing unit
Interrupt signal includes:
Temperature inductor detects the current operating temperature of the central processing unit and temperature inductor;
Whether the current operating temperature of central processing unit is judged beyond the temperature range for presetting normal work, if then to centre
Manage device and feed back the first interrupt signal;
If the current operating temperature of temperature inductor is otherwise judged again whether beyond the temperature range for presetting normal work, if then
The second interrupt signal is fed back to central processing unit.
Described USB3.0 transmission rate methods to set up, wherein, it is described when central processing unit receives the interrupt signal,
Control USB3.0 transmission rate, which reduces a step value, to be included:
When central processing unit receives first interrupt signal or the second interrupt signal, USB3.0 transmission rate is controlled to drop
A low step value.
Described USB3.0 transmission rate methods to set up, wherein, it is described when central processing unit receives the interrupt signal,
Control USB3.0 transmission rate also includes after reducing a step value:Believe if central processing unit repeatedly receives described interrupt
Number, then USB3.0 transmission rate repeatedly reduces same step value, until temperature inductor or central memory are in just
The temperature range often to work.
Described USB3.0 transmission rate methods to set up, wherein, when the central processing unit does not receive the interrupt signal
When, controlling USB3.0 transmission rate increases a step value, until returning to temperature inductor or central memory is in
The temperature range of normal work.
A kind of mobile terminal, including temperature inductor, processor, and the memory being connected with the processor, it is described
Memory storage has the program that USB3.0 transmission rates are set, and the program that the USB3.0 transmission rates are set is held by the processor
Row is used for the method for realizing that described USB3.0 transmission rates are set.
A kind of storage medium, the storage medium are stored with the program of USB3.0 transmission rates setting, USB3.0 transmission
Speed sets program to be executed by processor the method set for realizing the USB3.0 transmission rates.
The invention discloses USB3.0 transmission rates method to set up, mobile terminal and storage medium, when USB3.0 is enabled,
One super temporally variable timer is set, the detection frequency of the current operating temperature for adjusting central processing unit and temperature inductor
Rate;Whether temperature inductor judges the current operating temperature of the central processing unit and temperature inductor beyond default normal work
Temperature range, if then to central processing unit feed back interrupt signal;When central processing unit receives the interrupt signal, control
USB3.0 transmission rate reduces a step value.The present invention sets USB3.0 transmission rates and temperature extremely by detection temperature
Amplitude of variation regulation detection frequency is spent, can both prevent USB3.0 from enabling process heat accumulation, and cause efficiency of transmission to reduce, again may be used
To reduce the power consumption of temperature testing equipment, it is user-friendly.
Brief description of the drawings
Fig. 1 is the flow chart of the first preferred embodiment of USB3.0 transmission rates method to set up of the present invention.
Fig. 2 is mobile terminal preferred embodiment functional schematic block diagram of the present invention.
Embodiment
To make the objects, technical solutions and advantages of the present invention clearer, clear and definite, develop simultaneously embodiment pair referring to the drawings
The present invention is further described.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and do not have to
It is of the invention in limiting.
Embodiment one
Fig. 1 is referred to, Fig. 1 is the flow chart of the first preferred embodiment of USB3.0 transmission rates method to set up of the present invention.Such as Fig. 1
It is shown, a kind of USB3.0 transmission rates method to set up, wherein, comprise the following steps:
Step S100, when USB3.0 is enabled, one super temporally variable timer is set, for adjusting central processing unit and temperature
The detection frequency of the current operating temperature of inductor.
In the embodiment of the present invention, the time-out time of the timer is provided with two gears, the first overtime gear(The present embodiment
In be 5 seconds)With the second overtime gear(It is 60 seconds in the present embodiment), when USB3.0 starts, mobile terminal starts acquiescence and used
First overtime gear.
The operating temperature of central processing unit is synchronously detected after when the timer times out by temperature inductor, labeled as TnowCentreWith
The operating temperature of self-temperature inductor, labeled as TnowSense.When central processing unit or the current operating temperature of temperature inductor
Operating temperature with detecting before differs by more than default temperature threshold(It is 2 degree in the present embodiment), keep timer to detect for 5 seconds
Temperature, obtain present system time and preserve, correspondence markings tnowCentreAnd tnowSense;
It is less than 2 degree when the current operating temperature of central processing unit or temperature inductor differs with the operating temperature detected before,
By present system time compared with the system time preserved before, time difference is more than default time threshold(This implementation
It is 60 seconds in example)When, the control timer temperature of detection in 60 seconds, obtain present system time and preserve;If time difference is small
In 60 seconds, the timer temperature of detection in 5 seconds is remained in that, present system time is obtained and preserves.
Specifically, the control method of the variable detection frequency of step S100 timer expiries is described in detail as follows:
S101 detects central processing unit current operating temperature, labeled as TnowCentre, perform step S102;
S102 obtains present system time, labeled as tnowCentre;
S103 judges TnowCentreWith TpreCentre(This is the temperature preserved before)Whether the absolute value of difference is less than 2 degree, if it is
Step S104 is performed, otherwise performs step S107;
S104 judges tnowCentreWith tpreCentre(This is the system time preserved before)Whether difference if it is performs more than 60 seconds
Step S105, if otherwise performing step S108;
S105 set the timer expiry time as 60 seconds, performed step S106;
S106 changes thermograph, preserves Current Temperatures:TpreCentre = TnowCentre;
S107 changes system time record, preserves present system time:tpreCentre = tnowCentre, perform step S108;
It is 5 seconds that S108, which sets the timer expiry time, performs step S106.
It should be noted that temperature inductor is equally using the controlling party of the variable detection frequency of above-mentioned timer expiry
Method, do not repeating herein.
Further illustrate, in normal use USB3.0, the temperature of environment will not rise sharply rapid drawdown, therefore basis
This characteristic, when the range of temperature detected in a range when be considered temperature held stationary, then reduce temperature detection
Frequency;But then improve temperature detection frequency when in the range of the range of temperature of detection is more than one.So, temperature detection is reduced
The power consumption of equipment ensures not omit temperature anomaly during temperature detection simultaneously.
Step S200, temperature inductor judge whether the current operating temperature of the central processing unit and temperature inductor surpasses
Go out the temperature range of default normal work, if then feeding back interrupt signal to central processing unit.
It should be noted that the temperature range of central processing unit and temperature inductor normal work, is given birth to by mobile terminal
The environment temperature that business men sells to ground according to the performance and mobile terminal of central processing unit and temperature inductor is set in production
It is fixed, for example, in embodiments of the present invention, the temperature range of central processing unit and temperature inductor normal work be -20 to
60 degrees Celsius.
In the embodiment of the present invention, the temperature inductor is used for detection, the feedback of temperature anomaly for completing temperature, Ji Nengjian
Survey the operating temperature of central processing unit, the and can detection operating temperature of itself.
Whether the temperature inductor judges the current operating temperature of central processing unit beyond the temperature for presetting normal work
Scope, if then feeding back the first interrupt signal to central processing unit;If the current operating temperature of temperature inductor is otherwise judged again
Whether beyond the temperature range for presetting normal work, if then feeding back the second interrupt signal to central processing unit.
Specifically, step S200 is described in detail as follows:
For S201 when mobile terminal-opening, timer time default timeout is 5 seconds;
S202 judges whether timer is overtime, if it is performs step S203, and otherwise timer continues waiting for time-out;
S203 detects central processor temperature, specific to perform above-mentioned steps S100;
S204 judges whether the temperature exceeds central processing unit normal working temperature scope(- 20 to 60 degrees Celsius), if it is
Step S207 is performed, otherwise performs step S205;
S205 detection temperature inductor temperature;
S206 judges whether the temperature exceeds temperature inductor normal working temperature scope(- 20 to 60 degrees Celsius), if it is
Step S208 is performed, otherwise performs step S202;
S207 feeds back the first interrupt signal to central processing unit;
S208 feeds back the second interrupt signal to central processing unit.
Explanation is needed further exist for, when USB3.0 is enabled, electric current enables equipment by USB3.0 and enables line through USB3.0
Temperature inductor to mobile terminal arrives central processing unit again, and what this most possibly generated heat on the way is temperature inductor with
Central processor, and the device on other mobile terminals typically enabled with USB3.0 it is unrelated, therefore only need detection temperature inductor with
The temperature of central processor.
Step S300, when central processing unit receives the interrupt signal, controlling USB3.0 transmission rate reduces by one
Step value.
It is described when central processing unit receives first interrupt signal or the second interrupt signal in the embodiment of the present invention
When, USB3.0 transmission rate is reduced into a step value.Wherein, the step value is also known as " stepping ", is a CPU weight
Parameter is wanted, i.e. classification differentiates product data transition specification." stepping " numbering is used for identifying the design or the manufacturing of CPU a series of
Edition data, the version of stepping can change with a series of improvement of this CPU production technology, BUG solution or the increase of characteristic
Become, that is to say, that stepping numbering is these different " revisions " for identifying CPU.With it is a series of it is asynchronous enter CPU or
Can all there are some differences, such as the instruction even supported in stability, core voltage, power consumption, caloric value, overclocking performance more or less
May difference in terms of collection.So, stepping numbering is represented typically by the way of character and digit, such as A0, B1, C2
Can increase by 10 automatically according to initial value or subtract 10 Deng, step value.
It is preferred that described when central processing unit receives the interrupt signal, controlling USB3.0 transmission rate reduces by one
Also include after individual step value:If central processing unit repeatedly receives the interrupt signal, on USB3.0 transmission rate basis
On repeatedly subtract same step value, but if repeatedly subtracting same step value so that USB3.0 transmission rates are less than normal
USB3.0 transmission rate scope, then using normal USB3.0 transmission rates, do not continue to subtract step value, that is to say, that
The final temperature for causing temperature inductor or central memory is in normal range (NR).
Likewise, if central processing unit is in certain time(Such as 100 seconds)Do not receive the interrupt signal inside, then will be current
USB3.0 transmission rate add a same step value, until returning to the temperature of temperature inductor or central inductor
Degree is in normal range (NR).
Certainly, one of ordinary skill in the art will appreciate that realizing all or part of flow in above-described embodiment method,
It is that by USB3.0 transmission rates program can be set to instruct related hardware(Such as processor, temperature inductor etc.)To complete,
Described program can be stored in a computer-readable storage medium, and the program may include such as above-mentioned each method upon execution
The flow of embodiment.Wherein described storage medium can be memory, magnetic disc, CD etc..
Embodiment two
The embodiment of the present invention additionally provides a kind of mobile terminal, as shown in Fig. 2 the mobile terminal of the embodiment of the present invention can be hand
Machine(Or computer), wherein, the mobile terminal of the present embodiment includes processor 10, temperature inductor 30(Do not indicated in figure), with
And the memory 20 being connected with the processor 10;
The memory 20 is stored with USB3.0 transmission rates and sets program, and the USB3.0 transmission rates set program by the place
Reason device 10 realizes USB3.0 transmission rate methods to set up when performing, as detailed above.
The processor 10 can be a central processing unit in certain embodiments(Central Processing
Unit, CPU), microprocessor or other data processing chips, for run the program code that is stored in the memory 20 or
Processing data, such as perform program that USB3.0 transmission rates are set etc..
The temperature inductor 30 is a kind of temperature-detecting device, can experience the temperature of measured object, and will can examine
Testing temperature information, signal feedback is carried out after being compared with the threshold information of setting, to meet the transmission of information, processing, storage, aobvious
Show, record and control etc. and require.Temperature inductor purposes is very wide, and it is colored aobvious to be widely used in smart mobile phone, computer
Show the fields such as device.It can be in certain embodiments semiconductor thermojunction type temperature inductor in chip, PN junction temperature sense
Answer device and integrated temperature inductor etc..
Embodiment three
A kind of storage medium, the storage medium are stored with USB3.0 transmission rates and set program, and the USB3.0 transmission rates are set
Put and the USB3.0 transmission rates method to set up is realized when program is performed by processor 10;As detailed above.
It should be noted that the realization of function of the present invention can just make after depending on the related hardware devices of installation USB3.0
With the mobile terminal of function related USB3.0.
In summary, the invention discloses a kind of USB3.0 transmission rates method to set up, mobile terminal and storage medium, when
When USB3.0 is enabled, one super temporally variable timer is controlled, for adjusting the current work of central processing unit and temperature inductor
Make the detection frequency of temperature;Temperature inductor judges whether the current operating temperature of the central processing unit and temperature inductor surpasses
Go out the temperature range of default normal work, if then feeding back interrupt signal to central processing unit;When central processing unit receives institute
Interrupt signal is stated, controlling USB3.0 transmission rate reduces a step value.The present invention is set extremely by detection temperature
USB3.0 transmission rates and range of temperature regulation detection frequency, can both prevent USB3.0 from enabling process heat accumulation,
Cause efficiency of transmission to reduce, the power consumption of temperature testing equipment can be reduced again, be user-friendly.
It should be appreciated that the application of the present invention is not limited to above-mentioned citing, for those of ordinary skills, can
To be improved or converted according to the above description, all these modifications and variations should all belong to the guarantor of appended claims of the present invention
Protect scope.