CN108879589A - over-current protection method, device, terminal device and storage medium - Google Patents

over-current protection method, device, terminal device and storage medium Download PDF

Info

Publication number
CN108879589A
CN108879589A CN201810550723.7A CN201810550723A CN108879589A CN 108879589 A CN108879589 A CN 108879589A CN 201810550723 A CN201810550723 A CN 201810550723A CN 108879589 A CN108879589 A CN 108879589A
Authority
CN
China
Prior art keywords
terminal
otg
output
power supply
otg 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.)
Granted
Application number
CN201810550723.7A
Other languages
Chinese (zh)
Other versions
CN108879589B (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.)
Oppo Chongqing Intelligent Technology Co Ltd
Original Assignee
Oppo Chongqing Intelligent 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 Oppo Chongqing Intelligent Technology Co Ltd filed Critical Oppo Chongqing Intelligent Technology Co Ltd
Priority to CN201810550723.7A priority Critical patent/CN108879589B/en
Publication of CN108879589A publication Critical patent/CN108879589A/en
Application granted granted Critical
Publication of CN108879589B publication Critical patent/CN108879589B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02HEMERGENCY PROTECTIVE CIRCUIT ARRANGEMENTS
    • H02H3/00Emergency 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/08Emergency 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/266Arrangements 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • G06F13/4063Device-to-bus coupling
    • G06F13/4068Electrical coupling

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)
  • Power Sources (AREA)
  • Emergency Protection Circuit Devices (AREA)

Abstract

The application proposes a kind of over-current protection method, device, terminal device and storage medium, wherein method includes:The interrupt signal for being used to indicate output overcurrent for obtaining power supply chip output detects the OTG interface of terminal currently whether in use state, however, it is determined that the OTG interface of terminal is currently at use state, then turns off the OTG output of terminal.After this method is used to indicate the interrupt signal of output overcurrent by what is exported in acquisition power supply chip, whether the OTG interface for detecting terminal is currently in use state, to determine output overcurrent whether as caused by the OTG interface of terminal, when the OTG interface for determining terminal is currently at use state, turn off OTG output, to avoid output electric current it is excessive cause terminal generate heat or it is on fire, to realize on the basis of existing hardware circuit, achieve the purpose that overcurrent protection by software control logic, utilize lower cost, improve the safety of terminal, improve user experience.

Description

Over-current protection method, device, terminal device and storage medium
Technical field
This application involves electronic technology fields more particularly to a kind of over-current protection method, device, terminal device and storage to be situated between Matter.
Background technique
With the development of terminal technology, most of terminals all have the function of OTG (On-The-Go) at present, and OTG technology is main Applied to the connection between a variety of different equipment or mobile device, data exchange is carried out.For example, the mobile phone with OTG function can To connect by OTG interface with equipment such as USB flash disk, camera, video cameras, data exchange is carried out.
But when the external OTG equipment of the OTG interface by terminal, in the case where OTG equipment damage or OTG is set When standby insertion terminal, in the case where the no contraposition completely of the OTG interface of terminal, it is possible to will appear the feelings of OTG equipment short circuit Shape leads to terminal overheat or on fire, and making terminal, there is a certain security risk.
Summary of the invention
The application is intended to solve at least some of the technical problems in related technologies.
The application proposes a kind of over-current protection method, to realize on the basis of existing hardware circuit, reaches overcurrent protection Purpose improve the safety of terminal using lower cost.
The application one side embodiment proposes a kind of over-current protection method, including:
Obtain the interrupt signal for being used to indicate output overcurrent of power supply chip output;
Whether the OTG interface for detecting terminal is currently in use state;
If it is determined that the OTG interface of the terminal is currently at use state, then the OTG output of the terminal is turned off.
The over-current protection method of the embodiment of the present application passes through being used to indicate in output overcurrent for acquisition power supply chip output Break signal detects the OTG interface of terminal currently whether in use state, however, it is determined that the OTG interface of terminal is currently at use State then turns off the OTG output of terminal.In the present embodiment, by being used to indicate output overcurrent in acquisition power supply chip output Interrupt signal after, detect the OTG interface of terminal currently whether in use state, to determine output overcurrent whether by terminal Caused by OTG interface, when the OTG interface for determining terminal is currently at use state, shutdown OTG output, to avoid output electricity Flowing through leads to greatly terminal fever or on fire, to realize on the basis of existing hardware circuit, is reached by software control logic The safety of terminal is improved, user experience is improved using lower cost to the purpose of overcurrent protection.
The application another aspect embodiment proposes a kind of overcurrent protective device, including:
Module is obtained, for obtaining the interrupt signal for being used to indicate output overcurrent of power supply chip output;
Detection module, for detecting the OTG interface of terminal currently whether in use state;
Shutdown module turns off the terminal when for being currently at use state in the OTG interface for determining the terminal OTG output.
The overcurrent protective device of the embodiment of the present application passes through being used to indicate in output overcurrent for acquisition power supply chip output Break signal detects the OTG interface of terminal currently whether in use state, however, it is determined that the OTG interface of terminal is currently at use State then turns off the OTG output of terminal.In the present embodiment, in being used to indicate in output overcurrent for acquisition power supply chip output After break signal, whether detect the OTG interface of terminal currently in use state, with determine output overcurrent whether by terminal OTG Caused by interface, when the OTG interface for determining terminal is currently at use state, shutdown OTG output, to avoid output electric current mistake Lead to terminal fever or on fire greatly, to realize on the basis of existing hardware circuit, was reached by software control logic The purpose of stream protection improves the safety of terminal, improves user experience using lower cost.
The application another aspect embodiment proposes a kind of terminal device, including memory, processor and is stored in storage On device and the computer program that can run on a processor, when the processor executes described program, such as above-mentioned one side is realized Over-current protection method described in embodiment.
The application another aspect embodiment proposes a kind of non-transitorycomputer readable storage medium, is stored thereon with meter Calculation machine program realizes the over-current protection method as described in above-mentioned one side embodiment when the computer program is executed by processor.
The additional aspect of the application and advantage will be set forth in part in the description, and will partially become from the following description It obtains obviously, or recognized by the practice of the application.
Detailed description of the invention
The application is above-mentioned and/or additional aspect and advantage will become from the following description of the accompanying drawings of embodiments Obviously and it is readily appreciated that, wherein:
Fig. 1 is a kind of flow diagram of over-current protection method provided by the embodiments of the present application;
Fig. 2 is the flow diagram of another over-current protection method provided by the embodiments of the present application;
Fig. 3 is a kind of structural schematic diagram of overcurrent protective device provided by the embodiments of the present application;
Fig. 4 is the structural schematic diagram of another overcurrent protective device provided by the embodiments of the present application;
Fig. 5 shows the block diagram for being suitable for the exemplary terminal equipment for being used to realize the application embodiment.
Specific embodiment
Embodiments herein is described below in detail, examples of the embodiments are shown in the accompanying drawings, wherein from beginning to end Same or similar label indicates same or similar element or element with the same or similar functions.Below with reference to attached The embodiment of figure description is exemplary, it is intended to for explaining the application, and should not be understood as the limitation to the application.
Below with reference to the accompanying drawings the over-current protection method, device, terminal device and storage medium of the embodiment of the present application are described.
The embodiment of the present application is directed in the related technology, when the external OTG equipment of the OTG interface by terminal, in OTG equipment In the case where damage or when OTG equipment insertion terminal, in the case where the no contraposition completely of the OTG interface of terminal, it is possible to The situation that will appear OTG equipment short circuit leads to terminal overheat or on fire, and making terminal, there is a certain security risk, proposes one kind Over-current protection method.
Over-current protection method provided by the embodiments of the present application, by being exported in being used to indicate for acquisition power supply chip output After the interrupt signal of stream, the OTG interface of terminal is detected currently whether in use state, to determine output overcurrent whether by terminal OTG interface caused by, when the OTG interface for determining terminal is currently at use state, shutdown OTG output, to avoid output Electric current is excessive to lead to terminal fever or on fire, to realize on the basis of existing hardware circuit, passes through software control logic Achieve the purpose that overcurrent protection, using lower cost, improves the safety of terminal, improve user experience.
Fig. 1 is a kind of flow diagram of over-current protection method provided by the embodiments of the present application.
Over-current protection method provided by the embodiments of the present application can be held by overcurrent protective device provided by the embodiments of the present application Row, above-mentioned apparatus are configured in terminal device, carry out overcurrent protection to OTG interface to realize.
Terminal device in the present embodiment, can be arbitrarily has power supply chip and mobile phone, the palm PC of OTG interface etc. Equipment.
As shown in Figure 1, the over-current protection method includes the following steps:
Step 101, the interrupt signal for being used to indicate output overcurrent of power supply chip output is obtained.
In practical applications, when the external OTG equipment of the OTG interface of terminal, such as when external USB flash disk, camera equipment, by Terminal is powered to external OTG equipment.
When the external OTG equipment of the OTG interface by terminal, in the case where OTG equipment damage or OTG equipment is inserted When entering terminal, in the case where the no contraposition completely of the OTG interface of terminal, it is possible to which the situation that will appear OTG equipment short circuit is led Terminal overheat or on fire is caused, making terminal, there is a certain security risk.
In the present embodiment, power supply chip can detect output to the electric current of OTG interface, when detecting that electric current is more than one When determining threshold value, interrupt signal is generated.Overcurrent protective device can the output of real-time detection power supply chip signal, when detecting power supply core When piece output is used to indicate the interrupt signal of output overcurrent, the interrupt signal is obtained.
Step 102, the OTG interface of terminal is detected currently whether in use state.
In practical applications, when the external OTG equipment of the OTG interface of terminal, in the case where OTG equipment damage, or When OTG equipment is inserted into terminal, in the case where the no contraposition completely of the OTG interface of terminal, it is possible to will appear OTG equipment short circuit Situation, that is to say, that during the OTG interface of using terminal it is possible that short circuit situation.Based on this, this implementation In example, obtain power supply chip output be used to indicate the interrupt signal of output overcurrent after, can OTG interface to terminal use State is detected, to determine whether that the OTG interface by terminal causes overcurrent.
Step 103, however, it is determined that the OTG interface of terminal is currently at use state, then turns off the OTG output of terminal.
In the present embodiment, when the OTG interface for determining terminal is currently at use state, it is believed that output overcurrent be by Caused by the OTG interface of terminal, in order to avoid electric current is excessive brings hidden danger to terminal for output, the OTG output of terminal is turned off, is made OTG interface stops working.
In actual use, before and after the OTG interface of terminal is inserted into external OTG equipment, the electricity of pin is preset in OTG interface Level values can change, and for above-mentioned steps 102, level value that can be current according to default pin determines that the OTG interface of terminal is It is no to be in use state, it is described in detail below with reference to Fig. 2.
Fig. 2 is the flow diagram of another over-current protection method provided by the embodiments of the present application.
As shown in Fig. 2, above-mentioned steps 102 may include:
Step 201, it detects and presets the current level value of pin in the OTG interface of terminal.
In practical applications, the OTG interface of terminal presets the level value of pin, phase when being inserted into external OTG device end It can change when than being not inserted into external OTG equipment.Thus, it is possible to which it is current to preset pin in the OTG interface for passing through detection terminal Level value, judge OTG interface currently whether in use state.
Step 202, whether the level value current according to default pin determines OTG interface currently in use state.
In the present embodiment, can based in OTG interface preset pin connection type, to determine under current level value, The use state of corresponding OTG interface.
As an example, if the connection type of pin is preset in the OTG interface of terminal, to be not inserted into external OTG equipment When, the level value for presetting pin is low level, and when being inserted into external OTG equipment, level value is high level.It is so pre- when monitoring If the current level value of pin is high level, it can determine that the OTG interface of terminal is in use state.
As another example, it if presetting the connection type of pin in the OTG interface of terminal, is set to be not inserted into external OTG When standby, the level value for presetting pin is high level, and the level value that pin is preset when being inserted into external OTG equipment is low level.That When monitoring the current level value of default pin is low level, then it can determine that the OTG interface of terminal is in use state.
In the present embodiment, the current level value of pin is preset in the OTG interface by detecting terminal, is determined according to level value Whether the OTG interface of terminal is in use state, simple and convenient.
In practical applications, the OTG of above-mentioned shutdown terminal is exported, can be the OTG function of pause terminal, it can also be with It is off the power supply to OTG interface.
For suspending the OTG function of terminal, for example, when terminal carries out data exchange by OTG interface and external OTG equipment When, it can control terminal and the pause of OTG equipment carry out data exchange.For another example, when terminal passes through OTG interface to external OTG equipment When being charged, terminal pause can control to OTG equipment charge.
It, can also power cutoff core in order to improve the safety of overcurrent protection when determining the OTG interface output overcurrent of terminal Output in piece for the output end for the power supply of OTG interface, cuts off the power supply to OTG.As a kind of possible implementation, when When the external OTG equipment of the OTG interface of terminal, the output end in power supply chip for the power supply of OTG interface is connect with OTG interface, to OTG Interface export electric current, then can by disconnect power supply chip in for OTG interface power supply output end and OTG interface connection, with Pause powers to OTG interface, to turn off the OTG output of terminal.
In actual use, it if power supply chip is connect by switch with OTG interface, disconnects, comes then can control switch Suspend power supply of the power supply chip to OTG interface.
As a kind of possible implementation, can also enable in power supply chip for the power supply branch for the power supply of OTG interface Road break-off.For example, it is broken as the switch in the power supply branch of OTG interface power supply, to suspend the work of power supply branch, thus Power supply chip pause is that OTG interface is powered, and turns off the OTG output of terminal.
On the basis of the above embodiments, in order to improve the accuracy to the detection of OTG interface use state, power supply is being obtained Being used to indicate in the interrupt signal of output overcurrent for chip output may include current value that power supply chip currently exports, detection eventually Whether currently before use state, the current value that can be currently exported according to power supply chip judges power supply core to the OTG interface at end Whether the current value that piece currently exports is greater than threshold value.
After determining that current value that power supply chip currently exports is greater than threshold value, detect the OTG interface of terminal currently whether In use state, to improve the accuracy of the use state of the OTG interface of detection terminal.
It is understood that if it is determined that the current value that power supply chip currently exports is less than or equal to threshold value, it is believed that The connection of OTG interface is normal, at this moment can export OTG interface and connect normal prompt information, for example, voice broadcast OTG interface connects Normal prompt information is connect, or shows that OTG interface connects normal prompt information on the display screen of terminal.
It should be noted that threshold value here, it can be with previous embodiment, power supply chip is detecting output current value Interrupt signal is issued greater than certain threshold value, threshold value used is identical, can also be greater than threshold value used in power supply chip.
The state for understanding OTG interface in time for the ease of user can also be defeated after the OTG output of above-mentioned shutdown terminal The abnormal warning information of OTG interface connection out, such as terminal can be by voice broadcast warning information, or in the display screen of terminal Warning information is shown on curtain, in order to which user takes measures according to warning information, such as extracts external OTG equipment.
In order to realize above-described embodiment, the embodiment of the present application also proposes a kind of overcurrent protective device.Fig. 3 is the application implementation A kind of structural schematic diagram for overcurrent protective device that example provides.
As shown in figure 3, the overcurrent protective device includes:Obtain module 310, detection module 320, shutdown module 330.
Obtain the interrupt signal for being used to indicate output overcurrent that module 310 is used to obtain power supply chip output.
Detection module 320 is used to detect the OTG interface of terminal currently whether in use state.
It turns off module 330 to be used for when the OTG interface for determining terminal is currently at use state, the OTG for turning off terminal is defeated Out.
In a kind of possible implementation of the embodiment of the present application, detection module 320 is also used to:
It detects and presets the current level value of pin in the OTG interface of terminal;
According to the current level value of default pin, determine OTG interface currently whether in use state.
In a kind of possible implementation of the embodiment of the present application, shutdown module 330 is also used to:
Suspend the OTG function of terminal;
Alternatively,
Output in power cutoff chip for the output end for the power supply of OTG interface.
In a kind of possible implementation of the embodiment of the present application, shutdown module 330 is also used to:
Disconnect the connection in power supply chip for output end and OTG interface for the power supply of OTG interface;
Alternatively,
For the power supply branch break-off for the power supply of OTG interface in enabled power supply chip.
In a kind of possible implementation of the embodiment of the present application, the electricity that currently exports in interrupt signal comprising power supply chip Flow valuve;As shown in figure 4, the device may also include:
Determining module 340 determines power supply core before whether the OTG interface for detecting terminal is currently in use state The current value that piece currently exports is greater than threshold value.
In a kind of possible implementation of the embodiment of the present application, which may also include:
Output module, for after the OTG output of shutdown terminal, output OTG interface to connect abnormal warning information.
It should be noted that the aforementioned explanation to over-current protection method embodiment, is also applied for the mistake of the embodiment Protective device is flowed, therefore details are not described herein.
The overcurrent protective device of the embodiment of the present application passes through being used to indicate in output overcurrent for acquisition power supply chip output Break signal detects the OTG interface of terminal currently whether in use state, however, it is determined that the OTG interface of terminal is currently at use State then turns off the OTG output of terminal.In the present embodiment, in being used to indicate in output overcurrent for acquisition power supply chip output After break signal, whether detect the OTG interface of terminal currently in use state, with determine output overcurrent whether by terminal OTG Caused by interface, when the OTG interface for determining terminal is currently at use state, shutdown OTG output, to avoid output electric current mistake Lead to terminal fever or on fire greatly, to realize on the basis of existing hardware circuit, was reached by software control logic The purpose of stream protection improves the safety of terminal, improves user experience using lower cost.
In order to realize above-described embodiment, the embodiment of the present application also proposes a kind of terminal device, including memory, processor and The computer program that can be run on a memory and on a processor is stored, when the processor executes described program, is realized such as Over-current protection method described in above-described embodiment.
Fig. 5 shows the block diagram for being suitable for the exemplary terminal equipment for being used to realize the application embodiment.The end that Fig. 5 is shown End equipment 12 is only an example, should not function to the embodiment of the present application and use scope bring any restrictions.
As shown in figure 5, terminal device 12 is showed in the form of universal computing device.The component of terminal device 12 may include But it is not limited to:One or more processor or processing unit 16, system storage 28, connect different system components (including System storage 28 and processing unit 16) bus 18.
Bus 18 indicates one of a few class bus structures or a variety of, including memory bus or Memory Controller, Peripheral bus, graphics acceleration port, processor or the local bus using any bus structures in a variety of bus structures.It lifts For example, these architectures include but is not limited to industry standard architecture (Industry Standard Architecture;Hereinafter referred to as:ISA) bus, microchannel architecture (Micro Channel Architecture;Below Referred to as:MAC) bus, enhanced isa bus, Video Electronics Standards Association (Video Electronics Standards Association;Hereinafter referred to as:VESA) local bus and peripheral component interconnection (Peripheral Component Interconnection;Hereinafter referred to as:PCI) bus.
Terminal device 12 typically comprises a variety of computer system readable media.These media can be it is any can be by end The usable medium that end equipment 12 accesses, including volatile and non-volatile media, moveable and immovable medium.
Memory 28 may include the computer system readable media of form of volatile memory, such as random access memory Device (Random Access Memory;Hereinafter referred to as:RAM) 30 and/or cache memory 32.Terminal device 12 can be into One step includes other removable/nonremovable, volatile/non-volatile computer system storage mediums.Only as an example, it deposits Storage system 34 can be used for reading and writing immovable, non-volatile magnetic media, and (Fig. 5 do not show, commonly referred to as " hard drive Device ").Although being not shown in Fig. 5, the disk for reading and writing to removable non-volatile magnetic disk (such as " floppy disk ") can be provided and driven Dynamic device, and to removable anonvolatile optical disk (such as:Compact disc read-only memory (Compact Disc Read Only Memory;Hereinafter referred to as:CD-ROM), digital multi CD-ROM (Digital Video Disc Read Only Memory;Hereinafter referred to as:DVD-ROM) or other optical mediums) read-write CD drive.In these cases, each driving Device can be connected by one or more data media interfaces with bus 18.Memory 28 may include that at least one program produces Product, the program product have one group of (for example, at least one) program module, and it is each that these program modules are configured to perform the application The function of embodiment.
Program/utility 40 with one group of (at least one) program module 42 can store in such as memory 28 In, such program module 42 include but is not limited to operating system, one or more application program, other program modules and It may include the realization of network environment in program data, each of these examples or certain combination.Program module 42 is usual Execute the function and/or method in embodiments described herein.
Terminal device 12 can also be with one or more external equipments 14 (such as keyboard, sensing equipment, display 24 etc.) Communication, can also be enabled a user to one or more equipment interact with the terminal device 12 communicate, and/or with make the end Any equipment (such as network interface card, modem etc.) that end equipment 12 can be communicated with one or more of the other calculating equipment Communication.This communication can be carried out by input/output (I/O) interface 22.Also, terminal device 12 can also be suitable by network Orchestration 20 and one or more network (such as local area network (Local Area Network;Hereinafter referred to as:LAN), wide area network (Wide Area Network;Hereinafter referred to as:WAN) and/or public network, for example, internet) communication.As shown, network is suitable Orchestration 20 is communicated by bus 18 with other modules of terminal device 12.It should be understood that although not shown in the drawings, can be in conjunction with eventually End equipment 12 uses other hardware and/or software module, including but not limited to:Microcode, device driver, redundancy processing are single Member, external disk drive array, RAID system, tape drive and data backup storage system etc..
Processing unit 16 by the program that is stored in system storage 28 of operation, thereby executing various function application and Data processing, such as realize the method referred in previous embodiment.
In order to realize above-described embodiment, the application also proposes a kind of non-transitorycomputer readable storage medium, deposits thereon Computer program is contained, can be realized overcurrent protection as in the foregoing embodiment when the computer program is executed by processor Method.
In the description of this specification, reference term " one embodiment ", " some embodiments ", " example ", " specifically show The description of example " or " some examples " etc. means specific features, structure, material or spy described in conjunction with this embodiment or example Point is contained at least one embodiment or example of the application.In the present specification, schematic expression of the above terms are not It must be directed to identical embodiment or example.Moreover, particular features, structures, materials, or characteristics described can be in office It can be combined in any suitable manner in one or more embodiment or examples.In addition, without conflicting with each other, the skill of this field Art personnel can tie the feature of different embodiments or examples described in this specification and different embodiments or examples It closes and combines.
In addition, term " first ", " second " are used for descriptive purposes only and cannot be understood as indicating or suggesting relative importance Or implicitly indicate the quantity of indicated technical characteristic.Define " first " as a result, the feature of " second " can be expressed or Implicitly include at least one this feature.In the description of the present application, the meaning of " plurality " is at least two, such as two, three It is a etc., unless otherwise specifically defined.
Any process described otherwise above or method description are construed as in flow chart or herein, and expression includes It is one or more for realizing custom logic function or process the step of executable instruction code module, segment or portion Point, and the range of the preferred embodiment of the application includes other realization, wherein can not press shown or discussed suitable Sequence, including according to related function by it is basic simultaneously in the way of or in the opposite order, to execute function, this should be by the application Embodiment person of ordinary skill in the field understood.
Expression or logic and/or step described otherwise above herein in flow charts, for example, being considered use In the order list for the executable instruction for realizing logic function, may be embodied in any computer-readable medium, for Instruction execution system, device or equipment (such as computer based system, including the system of processor or other can be held from instruction The instruction fetch of row system, device or equipment and the system executed instruction) it uses, or combine these instruction execution systems, device or set It is standby and use.For the purpose of this specification, " computer-readable medium ", which can be, any may include, stores, communicates, propagates or pass Defeated program is for instruction execution system, device or equipment or the dress used in conjunction with these instruction execution systems, device or equipment It sets.The more specific example (non-exhaustive list) of computer-readable medium includes following:Electricity with one or more wiring Interconnecting piece (electronic device), portable computer diskette box (magnetic device), random access memory (RAM), read-only memory (ROM), erasable edit read-only storage (EPROM or flash memory), fiber device and portable optic disk is read-only deposits Reservoir (CDROM).In addition, computer-readable medium can even is that the paper that can print described program on it or other are suitable Medium, because can then be edited, be interpreted or when necessary with it for example by carrying out optical scanner to paper or other media His suitable method is handled electronically to obtain described program, is then stored in computer storage.
It should be appreciated that each section of the application can be realized with hardware, software, firmware or their combination.Above-mentioned In embodiment, software that multiple steps or method can be executed in memory and by suitable instruction execution system with storage Or firmware is realized.Such as, if realized with hardware in another embodiment, following skill well known in the art can be used Any one of art or their combination are realized:With for data-signal realize logic function logic gates from Logic circuit is dissipated, the specific integrated circuit with suitable combinational logic gate circuit, programmable gate array (PGA), scene can compile Journey gate array (FPGA) etc..
Those skilled in the art are understood that realize all or part of step that above-described embodiment method carries It suddenly is that relevant hardware can be instructed to complete by program, the program can store in a kind of computer-readable storage medium In matter, which when being executed, includes the steps that one or a combination set of embodiment of the method.
It, can also be in addition, can integrate in a processing module in each functional unit in each embodiment of the application It is that each unit physically exists alone, can also be integrated in two or more units in a module.Above-mentioned integrated mould Block both can take the form of hardware realization, can also be realized in the form of software function module.The integrated module is such as Fruit is realized and when sold or used as an independent product in the form of software function module, also can store in a computer In read/write memory medium.
Storage medium mentioned above can be read-only memory, disk or CD etc..Although having been shown and retouching above Embodiments herein is stated, it is to be understood that above-described embodiment is exemplary, and should not be understood as the limit to the application System, those skilled in the art can be changed above-described embodiment, modify, replace and become within the scope of application Type.

Claims (10)

1. a kind of over-current protection method, which is characterized in that including:
Obtain the interrupt signal for being used to indicate output overcurrent of power supply chip output;
Whether the OTG interface for detecting terminal is currently in use state;
If it is determined that the OTG interface of the terminal is currently at use state, then the OTG output of the terminal is turned off.
2. the method as described in claim 1, which is characterized in that whether the OTG interface of the detection terminal is currently in use State, including:
It detects and presets the current level value of pin in the OTG interface of the terminal;
According to the current level value of the default pin, determine the OTG interface currently whether in use state.
3. the method as described in claim 1, which is characterized in that the OTG output of the shutdown terminal, including:
Suspend the OTG function of the terminal;
Alternatively,
Turn off the output in the power supply chip for the output end for OTG interface power supply.
4. method as claimed in claim 3, which is characterized in that for being connect for the OTG in the shutdown power supply chip The output of the output end of confession electricity, including:
Disconnect the connection in the power supply chip for output end and the OTG interface for OTG interface power supply;
Alternatively,
It enables in the power supply chip for the power supply branch break-off for OTG interface power supply.
5. the method as described in claim 1, which is characterized in that currently exported in the interrupt signal comprising the power supply chip Current value;
Whether the OTG interface of the detection terminal is currently in front of use state, further includes:
Determine that the current value that the power supply chip currently exports is greater than threshold value.
6. method a method as claimed in any one of claims 1 to 5, which is characterized in that after the OTG output of the shutdown terminal, also Including:
Export the abnormal warning information of OTG interface connection.
7. a kind of overcurrent protective device, which is characterized in that including:
Module is obtained, for obtaining the interrupt signal for being used to indicate output overcurrent of power supply chip output;
Detection module, for detecting the OTG interface of terminal currently whether in use state;
Shutdown module turns off the OTG of the terminal when for being currently at use state in the OTG interface for determining the terminal Output.
8. device as claimed in claim 7, which is characterized in that detection module is also used to:
It detects and presets the current level value of pin in the OTG interface of the terminal;
According to the current level value of the default pin, determine the OTG interface currently whether in use state.
9. a kind of terminal device, which is characterized in that on a memory and can be on a processor including memory, processor and storage The computer program of operation when the processor executes described program, realizes that overcurrent as claimed in any one of claims 1 to 6 such as is protected Maintaining method.
10. a kind of non-transitorycomputer readable storage medium, is stored thereon with computer program, which is characterized in that the calculating Such as over-current protection method of any of claims 1-6 is realized when machine program is executed by processor.
CN201810550723.7A 2018-05-31 2018-05-31 Overcurrent protection method and device, terminal equipment and storage medium Active CN108879589B (en)

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 true CN108879589A (en) 2018-11-23
CN108879589B 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)

Cited By (1)

* Cited by examiner, † Cited by third party
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 (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102820639A (en) * 2012-08-15 2012-12-12 曙光信息产业(北京)有限公司 Overcurrent protection method for mainboard USB (universal serial bus) interface
CN107547755A (en) * 2017-08-29 2018-01-05 努比亚技术有限公司 USB interface guard method, mobile terminal and computer-readable recording medium
CN107645151A (en) * 2017-09-29 2018-01-30 努比亚技术有限公司 A kind of current foldback circuit, control method and device, terminal

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102820639A (en) * 2012-08-15 2012-12-12 曙光信息产业(北京)有限公司 Overcurrent protection method for mainboard USB (universal serial bus) interface
CN107547755A (en) * 2017-08-29 2018-01-05 努比亚技术有限公司 USB interface guard method, mobile terminal and computer-readable recording medium
CN107645151A (en) * 2017-09-29 2018-01-30 努比亚技术有限公司 A kind of current foldback circuit, control method and device, terminal

Cited By (1)

* Cited by examiner, † Cited by third party
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

Also Published As

Publication number Publication date
CN108879589B (en) 2020-09-18

Similar Documents

Publication Publication Date Title
CN108376077A (en) The upgrade method and device of control unit
US20080122292A1 (en) USB cable device, USB subsystem and USB drive devices
US8321700B2 (en) Using a single terminal for a power enable output signal and detecting an over-current condition
CN101622612A (en) Detecting connection to a USB host or hub without using an extra status input
TWI700498B (en) High contact resistance detection
KR20030087895A (en) Double interface CF flash memory card
CN109960932A (en) File test method, device and terminal device
CN108762715A (en) Electronic equipment audio control method, device and equipment
JP2007220149A (en) Disk housing device
CN103180744A (en) Method, apparatus and circuit for detecting super capacitor
CN108879589A (en) over-current protection method, device, terminal device and storage medium
US7707336B2 (en) Universal serial bus (USB) system with single port and host controller thereof
CN109246423A (en) VR equipment and VR equipment detection method
TWM471621U (en) Computer device and identification device therein
CN109308124A (en) The adaptive KVM switcher of mouse-keyboard
WO2022252973A1 (en) Supercomputing device, in-place detection method for computing power board, and storage medium
CN104035907A (en) Backup method for computer system and computer system
US20130067119A1 (en) Boot up configuration with usb data pins in embedded systems
CN116337276A (en) Battery temperature detection circuit and method
CN106326043A (en) USB based diagnosis device and method
CN205405420U (en) Device of voltage control
US7293710B2 (en) Method of overcurrent protection for multi-slot flash memory card reader
CN107122034A (en) The apparatus and method of voltage monitoring
CN211426669U (en) Device for monitoring power cable aging
CN102681968B (en) Hot-plugging slot identification circuit

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