CN108879589B - Overcurrent protection method and device, terminal equipment and storage medium - Google Patents
Overcurrent protection method and device, terminal equipment and storage medium Download PDFInfo
- Publication number
- CN108879589B CN108879589B CN201810550723.7A CN201810550723A CN108879589B CN 108879589 B CN108879589 B CN 108879589B CN 201810550723 A CN201810550723 A CN 201810550723A CN 108879589 B CN108879589 B CN 108879589B
- Authority
- CN
- China
- Prior art keywords
- terminal
- otg
- output
- otg interface
- interface
- 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.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H02—GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
- H02H—EMERGENCY PROTECTIVE CIRCUIT ARRANGEMENTS
- H02H3/00—Emergency protective circuit arrangements for automatic disconnection directly responsive to an undesired change from normal electric working condition with or without subsequent reconnection ; integrated protection
- H02H3/08—Emergency protective circuit arrangements for automatic disconnection directly responsive to an undesired change from normal electric working condition with or without subsequent reconnection ; integrated protection responsive to excess current
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F1/00—Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
- G06F1/26—Power supply means, e.g. regulation thereof
- G06F1/266—Arrangements to supply power to external peripherals either directly from the computer or under computer control, e.g. supply of power through the communication port, computer controlled power-strips
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/40—Bus structure
- G06F13/4063—Device-to-bus coupling
- G06F13/4068—Electrical coupling
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Emergency Protection Circuit Devices (AREA)
- Power Sources (AREA)
Abstract
The application provides an overcurrent protection method, an overcurrent protection device, terminal equipment and a storage medium, wherein the method comprises the following steps: the method comprises the steps of obtaining an interrupt signal which is output by a power supply chip and used for indicating output overcurrent, detecting whether an OTG interface of a terminal is in a use state currently, and if the OTG interface of the terminal is determined to be in the use state currently, switching off OTG output of the terminal. The method comprises the steps of detecting whether the OTG interface of the terminal is in a use state at present after obtaining an interrupt signal which is output by a power supply chip and used for indicating output overcurrent, so as to determine whether the output overcurrent is caused by the OTG interface of the terminal, and switching off the OTG output when determining that the OTG interface of the terminal is in the use state at present, so as to avoid heating or firing of the terminal due to overlarge output current, thereby achieving the purpose of overcurrent protection through software control logic on the basis of the existing hardware circuit, improving the safety of the terminal by utilizing lower cost, and improving user experience.
Description
Technical Field
The present application relates to the field of electronic technologies, and in particular, to an overcurrent protection method and apparatus, a terminal device, and a storage medium.
Background
With The development of terminal technology, most of The current terminals have an On-The-Go (OTG) function, and The OTG technology is mainly applied to connection between various devices or mobile devices for data exchange. For example, a mobile phone with OTG function may be connected to a device such as a usb disk, a camera, and a video camera through an OTG interface to exchange data.
However, when the OTG device is externally connected to the OTG interface of the terminal, the OTG device may be short-circuited when the OTG device is damaged or the OTG device is not completely aligned with the OTG interface of the terminal when the OTG device is inserted into the terminal, which may cause overheating or fire of the terminal and cause a certain safety risk to the terminal.
Disclosure of Invention
The present application is directed to solving, at least to some extent, one of the technical problems in the related art.
The application provides an overcurrent protection method, which aims to achieve the aim of overcurrent protection on the basis of the existing hardware circuit, and improves the safety of a terminal by using lower cost.
An embodiment of an aspect of the present application provides an overcurrent protection method, including:
acquiring an interrupt signal which is output by a power supply chip and used for indicating output overcurrent;
detecting whether an OTG interface of a terminal is in a use state at present;
and if the OTG interface of the terminal is determined to be in the use state currently, the OTG output of the terminal is turned off.
According to the overcurrent protection method, whether the OTG interface of the terminal is in the use state at present is detected by obtaining the interrupt signal which is output by the power supply chip and used for indicating output overcurrent, and if the OTG interface of the terminal is determined to be in the use state at present, the OTG output of the terminal is turned off. In the embodiment, after the interrupt signal which is output by the power chip and used for indicating the output overcurrent is obtained, whether the OTG interface of the terminal is currently in the use state is detected, whether the output overcurrent is caused by the OTG interface of the terminal is determined, and when the OTG interface of the terminal is determined to be currently in the use state, the OTG output is turned off, so that the terminal is prevented from heating or firing due to the fact that the output current is too large, and therefore the purpose of overcurrent protection is achieved through software control logic on the basis of the existing hardware circuit, the safety of the terminal is improved, and user experience is improved.
An embodiment of another aspect of the present application provides an overcurrent protection apparatus, including:
the acquisition module is used for acquiring an interrupt signal which is output by the power supply chip and used for indicating output overcurrent;
the detection module is used for detecting whether the OTG interface of the terminal is in a use state currently;
and the turn-off module is used for turning off the OTG output of the terminal when the OTG interface of the terminal is determined to be in the use state currently.
The over-current protection device of the embodiment of the application detects whether the OTG interface of the terminal is currently in a use state by acquiring the interrupt signal which is output by the power supply chip and used for indicating the output of the over-current, and turns off the OTG output of the terminal if the OTG interface of the terminal is determined to be currently in the use state. In this embodiment, after obtaining the interrupt signal that is used for instructing output overcurrent and is output by the power chip, whether the OTG interface of the detection terminal is currently in a use state is detected, to determine whether output overcurrent is caused by the OTG interface of the terminal, when it is determined that the OTG interface of the terminal is currently in a use state, the OTG output is turned off, to avoid the terminal from generating heat or firing due to an excessively large output current, thereby achieving the purpose of overcurrent protection through software control logic on the basis of the existing hardware circuit, and using lower cost, improving the security of the terminal, and improving user experience.
An embodiment of another aspect of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where when the processor executes the computer program, the overcurrent protection method according to the embodiment of the one aspect is implemented.
Another embodiment of the present application provides a non-transitory computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the over-current protection method as described in the above one embodiment.
Additional aspects and advantages of the present application will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the present application.
Drawings
The foregoing and/or additional aspects and advantages of the present application will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
fig. 1 is a schematic flowchart of an overcurrent protection method according to an embodiment of the present application;
fig. 2 is a schematic flowchart of another overcurrent protection method according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of an overcurrent protection apparatus according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of another overcurrent protection apparatus according to an embodiment of the present application;
fig. 5 shows a block diagram of an exemplary terminal device suitable for use in implementing embodiments of the present application.
Detailed Description
Reference will now be made in detail to embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are exemplary and intended to be used for explaining the present application and should not be construed as limiting the present application.
An overcurrent protection method, an apparatus, a terminal device, and a storage medium according to embodiments of the present application are described below with reference to the drawings.
The embodiment of the application aims at the related art, when the OTG interface of the terminal is externally connected with OTG equipment, under the condition that the OTG equipment is damaged, or when the OTG equipment is inserted into the terminal, under the condition that the OTG interface of the terminal is not completely aligned, the situation of short circuit of the OTG equipment can possibly occur, the terminal is overheated or is on fire, and the terminal has certain safety risk, so that the overcurrent protection method is provided.
According to the overcurrent protection method provided by the embodiment of the application, after the interrupt signal which is output by the power supply chip and used for indicating output overcurrent is obtained, whether the OTG interface of the terminal is in the use state at present is detected, whether the output overcurrent is caused by the OTG interface of the terminal is determined, when the OTG interface of the terminal is determined to be in the use state at present, the OTG output is turned off, so that the terminal is prevented from heating or firing due to overlarge output current, the purpose of overcurrent protection is achieved through software control logic on the basis of the existing hardware circuit, lower cost is utilized, the safety of the terminal is improved, and user experience is improved.
Fig. 1 is a schematic flow chart of an overcurrent protection method according to an embodiment of the present application.
The overcurrent protection method provided by the embodiment of the application can be executed by the overcurrent protection device provided by the embodiment of the application, and the device can be configured in terminal equipment to realize overcurrent protection on an OTG interface.
The terminal device in this embodiment may be any device such as a mobile phone and a palm computer having a power chip and an OTG interface.
As shown in fig. 1, the overcurrent protection method includes the following steps:
In practical application, when the OTG interface of the terminal is externally connected to the OTG device, such as an external usb disk, a camera, or the like, the terminal supplies power to the external OTG device.
When the OTG interface of the terminal is connected with the external OTG device, the OTG device may be short-circuited when the OTG device is damaged or inserted into the terminal without being completely aligned with the OTG interface of the terminal, which may cause overheating or fire of the terminal and cause the terminal to have a certain safety risk.
In this embodiment, the power supply chip may detect the current output to the OTG interface, and generate an interrupt signal when the detected current exceeds a certain threshold. The overcurrent protection device can detect the signal output by the power supply chip in real time, and when the power supply chip is detected to output an interrupt signal for indicating overcurrent output, the interrupt signal is obtained.
In practical applications, when the OTG interface of the terminal is externally connected to the OTG device, under the condition that the OTG device is damaged, or when the OTG device is inserted into the terminal, and the OTG interface of the terminal is not completely aligned, a short circuit of the OTG device may occur, that is, a short circuit may occur during the process of using the OTG interface of the terminal. Based on this, in this embodiment, after the interrupt signal for indicating the output overcurrent, which is output by the power chip, is obtained, the use state of the OTG interface of the terminal may be detected to determine whether the OTG interface of the terminal causes overcurrent.
And 103, if the OTG interface of the terminal is determined to be in the use state currently, the OTG output of the terminal is cut off.
In this embodiment, when it is determined that the OTG interface of the terminal is currently in the use state, it may be considered that the output overcurrent is caused by the OTG interface of the terminal, and in order to avoid a hidden danger to the terminal due to an excessively large output current, the OTG output of the terminal is turned off, so that the OTG interface stops working.
In actual use, before and after the OTG interface of the terminal is inserted into the external OTG device, the level value of the preset pin in the OTG interface may change, and for step 102, it may be determined whether the OTG interface of the terminal is in a use state according to the current level value of the preset pin, which is described in detail below with reference to fig. 2.
Fig. 2 is a schematic flow chart of another overcurrent protection method according to an embodiment of the present application.
As shown in fig. 2, the step 102 may include:
In practical application, when the OTG interface of the terminal is inserted into the external OTG device terminal, the level value of the pin is preset, and the pin changes compared with the pin which is not inserted into the external OTG device terminal. Therefore, whether the OTG interface is in a use state currently can be judged by detecting the current level value of the preset pin in the OTG interface of the terminal.
In this embodiment, the usage state of the corresponding OTG interface under the current level value may be determined based on a connection manner of the preset pin in the OTG interface.
As an example, if the preset pin in the OTG interface of the terminal is connected in a manner that the external OTG device is not plugged, the level value of the preset pin is a low level, and the level value of the preset pin is a high level when the external OTG device is plugged. When the current level value of the preset pin is monitored to be a high level, the OTG interface of the terminal can be determined to be in a use state.
As another example, if the preset pin in the OTG interface of the terminal is connected in a manner that the pin is not plugged into the external OTG device, the level value of the preset pin is set to be a high level, and the level value of the preset pin is set to be a low level when the external OTG device is plugged into the external OTG device. When the current level value of the preset pin is monitored to be low level, it can be determined that the OTG interface of the terminal is in a use state.
In this embodiment, whether the OTG interface of the terminal is in the use state is determined according to the level value by detecting the current level value of the preset pin in the OTG interface of the terminal, which is simple and convenient.
In practical application, for the OTG output of the above-mentioned shutdown terminal, the OTG function of the terminal may be suspended, or the power supply to the OTG interface may be shut down.
For the OTG function of the suspended terminal, for example, when the terminal performs data exchange with an external OTG device through an OTG interface, the terminal and the OTG device may be controlled to suspend data exchange. For another example, when the terminal charges the external OTG device through the OTG interface, the terminal may be controlled to suspend charging the OTG device.
When it is determined that the OTG interface of the terminal outputs overcurrent, in order to improve the safety of overcurrent protection, the output of the output terminal used for supplying power to the OTG interface in the power supply chip may also be turned off, and the power supply to the OTG is cut off. As a possible implementation manner, when the OTG interface of the terminal is externally connected to the OTG device, the output terminal of the power supply chip for supplying power to the OTG interface is connected to the OTG interface, and current is output to the OTG interface, so that power supply to the OTG interface can be suspended by disconnecting the output terminal of the power supply chip for supplying power to the OTG interface from the OTG interface, and the OTG output of the terminal is turned off.
In practical use, if the power chip is connected with the OTG interface through the switch, the switch may be controlled to be turned off to suspend the power supply of the power chip to the OTG interface.
As a possible implementation manner, the power supply branch in the power chip for supplying power to the OTG interface may also be enabled to suspend operation. For example, the switch in the power supply branch supplying power to the OTG interface is turned off to suspend the operation of the power supply branch, so that the power supply chip suspends the supply of power to the OTG interface, and turns off the OTG output of the terminal.
On the basis of the above embodiment, in order to improve the accuracy of detecting the use state of the OTG interface, the current value currently output by the power chip may be included in the interrupt signal that is output by the power chip and used for indicating the output overcurrent, and before detecting whether the OTG interface of the terminal is currently in the use state, whether the current value currently output by the power chip is greater than the threshold may be determined according to the current value currently output by the power chip.
After the current value output by the power supply chip is determined to be larger than the threshold value, whether the OTG interface of the terminal is in the use state currently is detected, and therefore the accuracy of detecting the use state of the OTG interface of the terminal is improved.
It can be understood that if it is determined that the current value output by the power chip is smaller than or equal to the threshold, the OTG interface connection may be considered to be normal, and at this time, prompt information that the OTG interface connection is normal may be output, for example, prompt information that the OTG interface connection is normal is broadcasted by voice, or prompt information that the OTG interface connection is normal is displayed on a display screen of the terminal.
It should be noted that, the threshold value here may be the same as or larger than the threshold value used by the power supply chip in the foregoing embodiment, where the power supply chip sends the interrupt signal when detecting that the output current value is larger than a certain threshold value.
In order to facilitate users to know the state of the OTG interface in time, after the OTG of the cut-off terminal is output, abnormal early warning information of the OTG interface connection can be output, for example, the terminal can broadcast the early warning information through voice, or the early warning information is displayed on a display screen of the terminal, so that the users can take measures according to the early warning information, such as pulling out external OTG equipment.
In order to implement the above embodiments, an overcurrent protection device is further provided in the embodiments of the present application. Fig. 3 is a schematic structural diagram of an overcurrent protection apparatus according to an embodiment of the present application.
As shown in fig. 3, the overcurrent protection apparatus includes: an acquisition module 310, a detection module 320, and a shutdown module 330.
The obtaining module 310 is configured to obtain an interrupt signal output by the power chip to indicate an output overcurrent.
The detection module 320 is configured to detect whether an OTG interface of the terminal is currently in a use state.
The shutdown module 330 is configured to shut off the OTG output of the terminal when it is determined that the OTG interface of the terminal is currently in a use state.
In a possible implementation manner of the embodiment of the present application, the detecting module 320 is further configured to:
detecting a current level value of a preset pin in an OTG interface of a terminal;
and determining whether the OTG interface is in a use state currently according to the current level value of the preset pin.
In a possible implementation manner of the embodiment of the present application, the shutdown module 330 is further configured to:
suspending the OTG function of the terminal;
alternatively, the first and second electrodes may be,
and turning off the output of the output end used for supplying power for the OTG interface in the power supply chip.
In a possible implementation manner of the embodiment of the present application, the shutdown module 330 is further configured to:
disconnecting the output end of the power chip for supplying power to the OTG interface from the OTG interface;
alternatively, the first and second electrodes may be,
and enabling a power supply branch circuit used for supplying power for the OTG interface in the power supply chip to pause.
In a possible implementation manner of the embodiment of the application, the interrupt signal includes a current value currently output by the power chip; as shown in fig. 4, the apparatus may further include:
the determining module 340 is configured to determine that a current value currently output by the power chip is greater than a threshold before detecting whether an OTG interface of the terminal is currently in a use state.
In a possible implementation manner of the embodiment of the present application, the apparatus may further include:
and the output module is used for outputting the early warning information of the abnormal OTG interface connection after the OTG output of the terminal is turned off.
It should be noted that the above explanation of the embodiment of the overcurrent protection method is also applicable to the overcurrent protection apparatus of the embodiment, and therefore is not repeated herein.
The over-current protection device of the embodiment of the application detects whether the OTG interface of the terminal is currently in a use state by acquiring the interrupt signal which is output by the power supply chip and used for indicating the output of the over-current, and turns off the OTG output of the terminal if the OTG interface of the terminal is determined to be currently in the use state. In this embodiment, after obtaining the interrupt signal that is used for instructing output overcurrent and is output by the power chip, whether the OTG interface of the detection terminal is currently in a use state is detected, to determine whether output overcurrent is caused by the OTG interface of the terminal, when it is determined that the OTG interface of the terminal is currently in a use state, the OTG output is turned off, to avoid the terminal from generating heat or firing due to an excessively large output current, thereby achieving the purpose of overcurrent protection through software control logic on the basis of the existing hardware circuit, and using lower cost, improving the security of the terminal, and improving user experience.
In order to implement the foregoing embodiments, an embodiment of the present application further provides a terminal device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where when the processor executes the computer program, the overcurrent protection method according to the foregoing embodiments is implemented.
Fig. 5 shows a block diagram of an exemplary terminal device suitable for use in implementing embodiments of the present application. The terminal device 12 shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 5, terminal device 12 is embodied in the form of a general purpose computing device. The components of terminal device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that couples various system components including the system memory 28 and the processing unit 16.
A program/utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 42 generally perform the functions and/or methodologies of the embodiments described herein.
The processing unit 16 executes various functional applications and data processing, for example, implementing the methods mentioned in the foregoing embodiments, by executing programs stored in the system memory 28.
In order to implement the above embodiments, the present application also proposes a non-transitory computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, is capable of implementing the over-current protection method as described in the foregoing embodiments.
In the description herein, reference to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present application, "plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing steps of a custom logic function or process, and alternate implementations are included within the scope of the preferred embodiment of the present application in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present application.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. If implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present application may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc. Although embodiments of the present application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present application, and that variations, modifications, substitutions and alterations may be made to the above embodiments by those of ordinary skill in the art within the scope of the present application.
Claims (9)
1. An overcurrent protection method, comprising:
acquiring an interrupt signal which is output by a power supply chip and used for indicating output overcurrent;
detecting whether an OTG interface of a terminal is in a use state currently to determine whether output overcurrent is caused by the OTG interface of the terminal, wherein the use state refers to that the OTG interface of the terminal is inserted into an external OTG device;
if the OTG interface of the terminal is determined to be in the use state currently, the OTG output of the terminal is turned off to stop the OTG interface from working, and the turning off the OTG output of the terminal comprises: suspending the OTG function of the terminal; or the output of the output end of the power supply chip for supplying power to the OTG interface is cut off.
2. The method of claim 1, wherein the detecting whether the OTG interface of the terminal is currently in use comprises:
detecting the current level value of a preset pin in an OTG interface of the terminal;
and determining whether the OTG interface is in a use state currently according to the current level value of the preset pin.
3. The method of claim 1, wherein said turning off an output of the power chip for powering the OTG interface comprises:
disconnecting the output end of the power chip for supplying power to the OTG interface from the OTG interface;
alternatively, the first and second electrodes may be,
enabling a power supply branch circuit in the power supply chip for supplying power to the OTG interface to suspend working.
4. The method of claim 1, wherein the interrupt signal includes a current value currently output by the power chip;
before detecting whether the OTG interface of the terminal is currently in a use state, the method further includes:
and determining that the current value currently output by the power supply chip is greater than a threshold value.
5. The method according to any one of claims 1-4, wherein after the switching off the OTG output of the terminal, further comprising:
and outputting the early warning information of abnormal connection of the OTG interface.
6. An overcurrent protection device, comprising:
the acquisition module is used for acquiring an interrupt signal which is output by the power supply chip and used for indicating output overcurrent;
the system comprises a detection module, a processing module and a processing module, wherein the detection module is used for detecting whether an OTG interface of a terminal is in a use state currently so as to determine whether output overcurrent is caused by the OTG interface of the terminal, and the use state refers to that the OTG interface of the terminal is inserted into an external OTG device;
a shutdown module, configured to, when it is determined that the OTG interface of the terminal is currently in a use state, shutdown the OTG output of the terminal to stop the OTG interface, where the shutdown of the OTG output of the terminal includes: suspending the OTG function of the terminal; or the output of the output end of the power supply chip for supplying power to the OTG interface is cut off.
7. The apparatus of claim 6, wherein the detection module is further to:
detecting the current level value of a preset pin in an OTG interface of the terminal;
and determining whether the OTG interface is in a use state currently according to the current level value of the preset pin.
8. A terminal device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the over-current protection method as claimed in any one of claims 1 to 5 when executing the program.
9. A non-transitory computer-readable storage medium having stored thereon a computer program, wherein the computer program, when executed by a processor, implements the over-current protection method of any one of claims 1-5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810550723.7A CN108879589B (en) | 2018-05-31 | 2018-05-31 | Overcurrent protection method and device, terminal equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810550723.7A CN108879589B (en) | 2018-05-31 | 2018-05-31 | Overcurrent protection method and device, terminal equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108879589A CN108879589A (en) | 2018-11-23 |
CN108879589B true CN108879589B (en) | 2020-09-18 |
Family
ID=64335095
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810550723.7A Active CN108879589B (en) | 2018-05-31 | 2018-05-31 | Overcurrent protection method and device, terminal equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108879589B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109947372A (en) * | 2019-03-28 | 2019-06-28 | 浙江众邦机电科技有限公司 | A kind of speech storage medium guard method, system, equipment and computer media |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107547755A (en) * | 2017-08-29 | 2018-01-05 | 努比亚技术有限公司 | USB interface guard method, mobile terminal and computer-readable recording medium |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102820639B (en) * | 2012-08-15 | 2016-08-03 | 曙光信息产业(北京)有限公司 | A kind of over-current protection method of mainboard USB interface |
CN107645151A (en) * | 2017-09-29 | 2018-01-30 | 努比亚技术有限公司 | A kind of current foldback circuit, control method and device, terminal |
-
2018
- 2018-05-31 CN CN201810550723.7A patent/CN108879589B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107547755A (en) * | 2017-08-29 | 2018-01-05 | 努比亚技术有限公司 | USB interface guard method, mobile terminal and computer-readable recording medium |
Also Published As
Publication number | Publication date |
---|---|
CN108879589A (en) | 2018-11-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11631981B2 (en) | Power adapter, terminal, and method for processing impedance anomalies in charging loop | |
US11621568B2 (en) | Electronic device fast charging method, apparatus, and device | |
US9268381B2 (en) | Terminal device and power supply method for terminal device | |
EP3975378A1 (en) | Charging method and apparatus, charging system, electronic device, storage medium | |
JP7487166B2 (en) | Adapter test apparatus, method and computer storage medium | |
CN103237189B (en) | Electronic equipment, MHL connector, MHL system and connector detection method | |
CN108872762B (en) | Electronic equipment leakage detection method and device, electronic equipment and storage medium | |
CN104954145A (en) | Method for power over Ethernet, power sourcing equipment and system for power over Ethernet | |
EP3674904B1 (en) | Electronic device having type c usb interface, control method for type c usb interface, and storage medium | |
US11809251B2 (en) | Power control device, display device, and power control method | |
CN105071484A (en) | Charging method and apparatus of terminal having data exchange function | |
US11561263B2 (en) | Method and device for testing adaptor, and storage medium | |
US8782444B2 (en) | Circuit protection system and method for a circuit utilizing chip type power supply | |
CN108879589B (en) | Overcurrent protection method and device, terminal equipment and storage medium | |
CN112003346B (en) | Charging method and electronic device | |
US20170093181A1 (en) | Charging control method and apparatus, terminal and computer storage medium | |
WO2017152586A1 (en) | Battery protection method and apparatus, and terminal | |
CN110797968B (en) | Power-off prevention method and system for uninterruptible power supply and terminal equipment | |
JP6537085B2 (en) | Self-loop detection method and apparatus for charging device | |
JP6916629B2 (en) | Electronics and control methods | |
US8823327B2 (en) | Electrical device and battery management method thereof | |
CN106787648B (en) | Method and system for protecting startup of mobile terminal | |
CN117033063B (en) | Server liquid leakage processing method, system, device, electronic equipment and medium | |
CN110958353B (en) | Terminal charging method, electronic device and storage medium | |
WO2016045350A1 (en) | Rechargeable battery, method for using rechargeable battery, and charging system |
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 |