CN111752362B - Method, device and storage medium for preventing interface from being corroded - Google Patents

Method, device and storage medium for preventing interface from being corroded Download PDF

Info

Publication number
CN111752362B
CN111752362B CN201910252476.7A CN201910252476A CN111752362B CN 111752362 B CN111752362 B CN 111752362B CN 201910252476 A CN201910252476 A CN 201910252476A CN 111752362 B CN111752362 B CN 111752362B
Authority
CN
China
Prior art keywords
interface
power
interface chip
notification message
processor
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
Application number
CN201910252476.7A
Other languages
Chinese (zh)
Other versions
CN111752362A (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.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software 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 Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201910252476.7A priority Critical patent/CN111752362B/en
Publication of CN111752362A publication Critical patent/CN111752362A/en
Application granted granted Critical
Publication of CN111752362B publication Critical patent/CN111752362B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • G06F13/4072Drivers or receivers
    • G06F13/4077Precharging or discharging
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The disclosure relates to a method, a device and a storage medium for preventing an interface from being corroded, wherein the interface chip is enabled to detect whether a portable device is inserted into the interface only in a power-on period in a current power supply cycle by periodically supplying power to the interface chip, if the portable device is detected to be inserted into the interface chip, a first notification message is sent to a processor of a terminal, the processor of the terminal is enabled to continuously supply power to the interface chip, and if the portable device is not detected to be inserted into the interface chip, the interface chip enters a dormant state in a power-off period. Compared with a power supply mode of continuously supplying power to the interface chip, the power supply method and the power supply system have the advantages that power is periodically supplied to the interface chip, so that the interface chip only works in the power-on period, and the interface chip enters the dormant state in the power-off period. That is to say, there is not voltage on the interface during the period of powering down, so electrochemical reaction will not occur, and the purpose of preventing the interface from being corroded is achieved.

Description

Method, device and storage medium for preventing interface from being corroded
Technical Field
The present disclosure relates to interface technologies, and in particular, to a method, an apparatus, and a storage medium for preventing an interface from being corroded.
Background
With the development of the technology, a Universal Serial Bus (USB) interface becomes an indispensable part of electronic devices. The traditional USB Type-a interface and USB Type-B interface have been increasingly difficult to meet the requirements of electronic devices for being smaller, thinner, faster, etc. A new generation of USB Type-C interface is produced.
The USB Type-C interface is a forward and reverse pluggable and backward compatible USB interface, the forward and reverse surfaces are also called an A surface and a B surface, and the A surface and the B surface are respectively provided with 12 pins. The 12 pins per plane include two ground pins (i.e., GND pins), two power pins (i.e., VBUS pins), two pairs of differential signal pins, one pair of USB differential signal pins (i.e., D pins), one configuration channel pin (i.e., CC pins), and one sideband use signal pin (i.e., SBU pins). When sweat and other conductive liquids exist at the electronic equipment provided with the USB Type-C interface, an electrochemical reaction loop is easily formed inside the USB Type-C interface, and the electrochemical reaction loop causes corrosion of the USB Type-C interface. Long-time corrosion can cause micro short circuit to appear between the CC pin and the VBUS pin of the USB Type-C interface, and between the CC pin and the D pin.
In order to avoid the phenomenon that the USB Type-C interface is corroded to cause micro short circuit, a manufacturer carries out film coating on the USB Type-C interface in the generating process, and the film coating cost is high. Meanwhile, after the USB Type-C interface is repeatedly plugged and pulled, the coating film is easily wiped off. Therefore, how to avoid the situation that the USB Type-C interface is corroded to cause micro short circuit is a problem to be solved urgently in the industry.
Disclosure of Invention
To overcome the problems in the related art, the present disclosure provides a method, an apparatus, and a storage medium for preventing an interface from being corroded. The technical scheme is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided a method for preventing an interface from being corroded, where a processor, the interface chip, and an interface are disposed on a terminal, and the interface chip is used to control the interface, the method including:
the interface chip detects whether a portable device is inserted into the interface in a power-on period of a current power supply cycle, wherein the power supply cycle comprises: a power-up period and a power-down period;
if the interface chip detects that a portable device is inserted into the interface, sending a first notification message to the processor, wherein the first notification message is used for notifying the processor to continuously supply power to the interface chip in the power-down period;
and if the interface chip does not detect that the portable equipment is inserted into the interface, entering a dormant state in the power-off period.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: the interface chip detects whether the portable equipment is inserted into the interface only in the power-on period in the current power supply period by periodically supplying power to the interface chip, if the portable equipment is detected to be inserted, a first notification message is sent to a processor of the terminal, so that the processor of the terminal continuously supplies power to the interface chip, and if the portable equipment is not detected to be inserted into the interface, the terminal enters a dormant state in the power-off period. Compared with a power supply mode of continuously supplying power to the interface chip, the power supply method and the power supply system have the advantages that power is periodically supplied to the interface chip, so that the interface chip only works in the power-on period, and the interface chip enters the dormant state in the power-off period. That is to say, during the power-off period, no voltage exists on the interface, so that no electrochemical reaction occurs, and the purpose of preventing the interface from being corroded is achieved.
Optionally, before the interface chip detects whether the portable device is inserted into the interface in a power-up period in a current power supply cycle, the method further includes:
the interface chip receives a second notification message sent by the processor, wherein the second notification message is used for indicating the screen state of the terminal device to the interface chip;
and the interface chip adjusts the state of the interface according to the second notification message.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: the processor informs the interface chip of the screen state of the terminal through the second notification message, so that the interface chip can know the screen state of the terminal, and the purpose that the interface chip further reduces the probability of interface corrosion by controlling the state of the interface is further achieved.
Optionally, the adjusting, by the interface chip, the state of the interface according to the second notification message includes:
when the second notification message indicates that the terminal device is in a screen-off state, the interface chip adjusts the interface from a dual-role port DRP to an uplink port UFP;
and when the second notification message indicates that the terminal equipment is in a bright screen state, the interface chip keeps the interface in a dual-role port DRP state.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: the interface chip sets the interface to be in a UFP state according to the screen state of the terminal when the terminal is in a standby screen-off state, and further reduces the effective level of the CC pin in the power-on period, so that the purpose of reducing the corrosion probability of the interface is further realized.
Optionally, the power supply voltage of the interface chip is higher than a preset voltage, and a difference value between the power supply voltage and the preset voltage is smaller than or equal to a first preset difference value.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: through as little as possible with the setting of supply voltage for the voltage effective value of the CC pin of USBType C interface is as little as possible, thereby realizes reducing the mesh of the probability that USBType C interface is corroded.
Optionally, the preset voltage is 2.7 volts.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: through as little as possible with the setting of supply voltage for the voltage effective value of the CC pin of USBType C interface is as little as possible, thereby realizes reducing the mesh of the probability that USBType C interface is corroded.
Optionally, the duty ratio of the square wave output by the power pin of the interface chip is higher than a preset duty ratio, and the difference value between the preset duty ratio and the duty ratio is smaller than or equal to a second preset difference value.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: the duty ratio of the square wave output by the CC pin is set to be as small as possible, so that the effective voltage value of the CC pin of the USB Type C interface is as small as possible, and the purpose of reducing the probability of corroding the USB Type C interface is achieved.
Optionally, the preset duty cycle is 30%.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: the duty ratio of the square wave output by the CC pin is set to be as small as possible, so that the effective voltage value of the CC pin of the USB Type C interface is as small as possible, and the purpose of reducing the corrosion probability of the USB Type C interface is achieved.
Optionally, the interface is a USB Type C interface.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: the purpose of preventing the USB Type C interface from being corroded can be achieved.
According to a second aspect of the embodiments of the present disclosure, there is provided a method for preventing an interface from being corroded, the method being applied to a processor on a terminal, the terminal being provided with the processor, the interface chip and the interface, the interface chip being used for controlling the interface, the method including:
the processor supplies power to the interface chip according to a power supply cycle, wherein the power supply cycle comprises the following steps: a power-up period and a power-down period;
the processor judges whether a first notification message sent by the interface chip is received or not, wherein the first notification message is used for indicating the processor that the interface chip detects the portable equipment in the power-on period of the current cycle;
if the processor receives the first notification message, the processor continues to supply power to the interface chip during the power-off period;
and if the processor does not receive the first notification message, stopping supplying power to the interface chip in a power-down period.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: the interface chip is enabled to detect whether the portable equipment is inserted into the interface only in the power-on period in the current power supply cycle by periodically supplying power to the interface chip, if the portable equipment is detected to be inserted into the interface chip, a first notification message is sent to a processor of the terminal, the processor of the terminal is enabled to continuously supply power to the interface chip, and if the portable equipment is not detected to be inserted into the interface chip, the terminal enters a dormant state in the power-off period. Compared with a power supply mode of continuously supplying power to the interface chip, the power supply method and the power supply system have the advantages that power is periodically supplied to the interface chip, so that the interface chip only works in the power-on period, and the interface chip enters the dormant state in the power-off period. That is to say, there is not voltage on the interface during the period of powering down, so electrochemical reaction will not occur, and the purpose of preventing the interface from being corroded is achieved.
Optionally, after the processor supplies power to the interface chip according to a power supply cycle, the method further includes:
and the processor sends a second notification message to the interface chip, wherein the second notification message carries the screen state of the terminal equipment.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: and informing the screen state of the terminal to the interface chip through the second informing message, so that the interface chip learns the screen state of the terminal, and further achieving the purpose of further reducing the probability of interface corrosion by controlling the state of the interface.
Optionally, the second notification message is used to indicate to the interface chip that the terminal device is in a screen-on state or a screen-off state.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: and informing the interface chip of the screen state of the terminal through the second informing message, so that the interface chip can acquire the screen state of the terminal, and further achieving the purpose of further reducing the interface corrosion probability by controlling the state of the interface.
According to a third aspect of the embodiments of the present disclosure, there is provided an apparatus for preventing an interface from being corroded, the apparatus including:
a detection module configured to detect whether a portable device is plugged into the interface during a power-up period in a current power cycle, the power cycle including: a power-up period and a power-down period;
a sending module configured to send a first notification message to the processor if the detecting module detects that a portable device is inserted into the interface, wherein the first notification message is used for notifying the processor to continue to supply power to the interface chip during the power-off period;
a sleep module configured to enter a sleep state during the power-down period if the detection module does not detect that a portable device is inserted into the interface.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: the interface chip is enabled to detect whether the portable equipment is inserted into the interface only in the power-on period in the current power supply cycle by periodically supplying power to the interface chip, if the portable equipment is detected to be inserted into the interface, a first notification message is sent to a processor of the terminal, the processor of the terminal is enabled to continuously supply power to the interface chip, and if the portable equipment is not detected to be inserted into the interface, the terminal enters a dormant state in the power-off period. Compared with a power supply mode of continuously supplying power to the interface chip, the power supply method and the power supply system have the advantages that power is periodically supplied to the interface chip, so that the interface chip only works in the power-on period, and the interface chip enters the dormant state in the power-off period. That is to say, there is not voltage on the interface during the period of powering down, so electrochemical reaction will not occur, and the purpose of preventing the interface from being corroded is achieved.
Optionally, the above apparatus further comprises: the device comprises a receiving module and a first adjusting module;
the receiving module is configured to receive a second notification message sent by the processor before the detecting module detects whether a portable device is inserted into the interface in a power-on period in a current power supply cycle, wherein the second notification message is used for indicating a screen state of the terminal device to the interface chip;
the first adjusting module is configured to adjust the state of the interface according to the second notification message.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: the processor informs the interface chip of the screen state of the terminal through the second notification message, so that the interface chip can know the screen state of the terminal, and the purpose that the interface chip further reduces the probability of interface corrosion by controlling the state of the interface is further achieved.
Optionally, the above apparatus further comprises:
a second adjusting module, configured to adjust the interface from a dual role port DRP to an uplink port UFP when the second notification message indicates that the terminal device is in an off-screen state;
a maintaining module configured to maintain the interface in a Dual Role Port (DRP) state when the second notification message indicates that the terminal device is in a bright screen state.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: the interface chip sets the interface to be in a UFP state according to the screen state of the terminal when the terminal is in a standby screen-off state, and further reduces the effective level of the CC pin in the power-on period, so that the purpose of reducing the corrosion probability of the interface is further realized.
Optionally, the power supply voltage of the interface chip is higher than a preset voltage, and a difference between the power supply voltage of the interface chip and the preset voltage is smaller than or equal to a first preset difference.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: through the minimum as with the power supply voltage setting for the voltage effective value of the CC pin of USB Type C interface is as little as possible, thereby realizes reducing the mesh of USB Type C interface by the probability of corruption.
Optionally, the preset voltage is 2.7 volts.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: through the minimum as with the power supply voltage setting for the voltage effective value of the CC pin of USB Type C interface is as little as possible, thereby realizes reducing the mesh of USB Type C interface by the probability of corruption.
Optionally, the duty ratio of the square wave output by the power pin of the interface chip is higher than a preset duty ratio, and the difference between the preset duty ratio and the duty ratio is smaller than or equal to a second preset difference.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: the duty ratio of the square wave output by the CC pin is set to be as small as possible, so that the effective voltage value of the CC pin of the USB Type C interface is as small as possible, and the purpose of reducing the probability of corroding the USB Type C interface is achieved.
Optionally, the preset duty cycle is 30%.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: the duty ratio of the square wave output by the CC pin is set to be as small as possible, so that the effective voltage value of the CC pin of the USB Type C interface is as small as possible, and the purpose of reducing the corrosion probability of the USB Type C interface is achieved.
Optionally, the interface is a USB Type C interface.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: the purpose of preventing the USB Type C interface from being corroded can be achieved.
According to a fourth aspect of the embodiments of the present disclosure, there is provided an apparatus for preventing an interface from being corroded, the apparatus being applied to a processor on a terminal, the apparatus including:
the judging module is configured to judge whether a first notification message sent by the interface chip is received, wherein the first notification message is used for indicating the interface chip to the processor that the portable device is detected in the power-on period of the current cycle;
a power module configured to supply power to the interface chip according to a power cycle, the power cycle including: a power-up period and a power-down period; if the judging module judges that the first notification message is received, the interface chip is continuously supplied with power in the power-off period; and if the judging module judges that the first notification message is not received, the power supply to the interface chip is stopped in the power-off period.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: the interface chip is enabled to detect whether the portable equipment is inserted into the interface only in the power-on period in the current power supply cycle by periodically supplying power to the interface chip, if the portable equipment is detected to be inserted into the interface chip, a first notification message is sent to a processor of the terminal, the processor of the terminal is enabled to continuously supply power to the interface chip, and if the portable equipment is not detected to be inserted into the interface chip, the terminal enters a dormant state in the power-off period. Compared with a power supply mode of continuously supplying power to the interface chip, the power supply method and the power supply system have the advantages that power is periodically supplied to the interface chip, so that the interface chip only works in the power-on period, and the interface chip enters the dormant state in the power-off period. That is to say, there is not voltage on the interface during the period of powering down, so electrochemical reaction will not occur, and the purpose of preventing the interface from being corroded is achieved.
Optionally, the above apparatus further comprises:
the sending module is configured to send a second notification message to the interface chip after the power supply supplies power to the interface chip according to a power supply cycle, wherein the second notification message carries the screen state of the terminal device.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: and informing the interface chip of the screen state of the terminal through the second informing message, so that the interface chip can acquire the screen state of the terminal, and further achieving the purpose of further reducing the interface corrosion probability by controlling the state of the interface.
Optionally, the second notification message is used to indicate to the interface chip that the terminal device is in a screen-on state or a screen-off state.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: and informing the interface chip of the screen state of the terminal through the second informing message, so that the interface chip can acquire the screen state of the terminal, and further achieving the purpose of further reducing the interface corrosion probability by controlling the state of the interface.
According to a fifth aspect of the embodiments of the present disclosure, there is provided an interface chip for controlling an interface, the interface chip including:
a processor;
a memory for storing executable instructions of the processor;
wherein the processor is configured to:
detecting whether a portable device is inserted into the interface in a power-on period in a current power cycle, wherein the power cycle comprises: a power-up period and a power-down period;
if the portable equipment is detected to be inserted into the interface, sending a first notification message to a terminal, wherein the first notification message is used for notifying the terminal to continuously supply power to the interface chip in the power-off period;
and if the portable equipment is not detected to be inserted into the interface, entering a dormant state in the power-down period.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: the interface chip is enabled to detect whether the portable equipment is inserted into the interface only in the power-on period in the current power supply cycle by periodically supplying power to the interface chip, if the portable equipment is detected to be inserted into the interface, a first notification message is sent to a processor of the terminal, the processor of the terminal is enabled to continuously supply power to the interface chip, and if the portable equipment is not detected to be inserted into the interface, the terminal enters a dormant state in the power-off period. Compared with a power supply mode of continuously supplying power to the interface chip, the power supply method and the power supply system have the advantages that power is periodically supplied to the interface chip, so that the interface chip only works in the power-on period, and the interface chip enters the dormant state in the power-off period. That is to say, during the power-off period, no voltage exists on the interface, so that no electrochemical reaction occurs, and the purpose of preventing the interface from being corroded is achieved.
According to a sixth aspect of the embodiments of the present disclosure, there is provided a terminal, configured to control an interface chip, where the interface chip is configured to control an interface, the terminal including:
a processor;
a memory for storing executable instructions of the processor;
wherein the processor is configured to:
supplying power to the interface chip according to a power cycle, the power cycle including: a power-up period and a power-down period;
judging whether a first notification message sent by the interface chip is received, wherein the first notification message is used for indicating the processor that the interface chip detects the portable device in the power-on period of the current cycle;
if the first notification message is received, continuing to supply power to the interface chip in the power-off period;
and if the first notification message is not received, stopping supplying power to the interface chip in the power-off period.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: the interface chip detects whether the portable equipment is inserted into the interface only in the power-on period in the current power supply cycle by periodically supplying power to the interface chip, if the portable equipment is detected to be inserted, a first notification message is sent to a processor of the terminal, so that the processor of the terminal continuously supplies power to the interface chip, and if the portable equipment is not detected to be inserted into the interface, the terminal enters a dormant state in the power-off period. Compared with a power supply mode of continuously supplying power to the interface chip, the power supply method and the power supply system have the advantages that power is periodically supplied to the interface chip, so that the interface chip only works in the power-on period, and the interface chip enters the dormant state in the power-off period. That is to say, there is not voltage on the interface during the period of powering down, so electrochemical reaction will not occur, and the purpose of preventing the interface from being corroded is achieved.
According to a seventh aspect of an embodiment of the present disclosure, there is provided an interface chip, the interface chip being configured to control an interface, the interface chip including: memory, a processor and computer instructions, the processor executing the computer instructions to perform the steps of the method according to any one of the first aspect.
According to an eighth aspect of the embodiments of the present disclosure, there is provided a terminal, the terminal being configured to control an interface chip, the interface chip being configured to control an interface, the terminal including: memory, a processor and computer instructions, the processor executing the computer instructions to perform the steps of the method according to any one of the second aspect.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: the interface chip is enabled to detect whether the portable equipment is inserted into the interface only in the power-on period in the current power supply cycle by periodically supplying power to the interface chip, if the portable equipment is detected to be inserted into the interface chip, a first notification message is sent to a processor of the terminal, the processor of the terminal is enabled to continuously supply power to the interface chip, and if the portable equipment is not detected to be inserted into the interface chip, the terminal enters a dormant state in the power-off period. Compared with a power supply mode of continuously supplying power to the interface chip, the power supply method and the power supply system have the advantages that power is periodically supplied to the interface chip, so that the interface chip only works in the power-on period, and the interface chip enters the dormant state in the power-off period. That is to say, there is not voltage on the interface during the period of powering down, so electrochemical reaction will not occur, and the purpose of preventing the interface from being corroded is achieved. .
According to a ninth aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method of any one of the first aspects.
According to a tenth aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method of any one of the second aspects.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: the interface chip is enabled to detect whether the portable equipment is inserted into the interface only in the power-on period in the current power supply cycle by periodically supplying power to the interface chip, if the portable equipment is detected to be inserted into the interface, a first notification message is sent to a processor of the terminal, the processor of the terminal is enabled to continuously supply power to the interface chip, and if the portable equipment is not detected to be inserted into the interface, the terminal enters a dormant state in the power-off period. Compared with a power supply mode of continuously supplying power to the interface chip, the power supply method and the power supply system have the advantages that power is periodically supplied to the interface chip, so that the interface chip only works in the power-on period, and the interface chip enters the dormant state in the power-off period. That is to say, during the power-off period, no voltage exists on the interface, so that no electrochemical reaction occurs, and the purpose of preventing the interface from being corroded is achieved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure.
FIG. 1 is a pin layout diagram of a USB Type C interface;
FIG. 2 is a circuit diagram illustrating a CC pin of a USB Type C interface in accordance with an exemplary embodiment;
FIG. 3 is a diagram illustrating a terminal in accordance with an exemplary embodiment;
FIG. 4 is a flow chart illustrating a method of preventing corrosion of an interface chip in accordance with an exemplary embodiment;
FIG. 5 is a schematic diagram illustrating a power cycle in a method of preventing corrosion of an interface chip in accordance with one illustrative embodiment;
FIG. 6 is a schematic diagram illustrating the duty cycle of the CC pin output square wave in a method for preventing corrosion of the interface chip according to an exemplary embodiment;
FIG. 7 is a flow chart illustrating another method of preventing corrosion of an interface chip in accordance with an exemplary embodiment;
FIG. 8 is a block diagram illustrating an apparatus for preventing corrosion of an interface in accordance with an exemplary embodiment;
FIG. 9 is a block diagram illustrating an apparatus for preventing corrosion of an interface in accordance with another exemplary embodiment;
FIG. 10 is a block diagram illustrating an apparatus for preventing corrosion of an interface in accordance with yet another exemplary embodiment;
FIG. 11 is a block diagram illustrating an apparatus for preventing corrosion of an interface in accordance with an exemplary embodiment;
FIG. 12 is a block diagram illustrating an apparatus for preventing corrosion of an interface in accordance with yet another exemplary embodiment;
FIG. 13 is a block diagram illustrating an entity of an interface chip in accordance with an illustrative embodiment;
FIG. 14 is a block diagram illustrating a terminal in accordance with an exemplary embodiment;
fig. 15 is a block diagram illustrating another terminal according to an example embodiment.
With the foregoing drawings in mind, certain embodiments of the disclosure have been shown and described in more detail below. These drawings and written description are not intended to limit the scope of the disclosed concepts in any way, but rather to illustrate the concepts of the disclosure to those skilled in the art by reference to specific embodiments.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. The following description refers to the accompanying drawings in which the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below do not represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
The technical solution of the present disclosure is explained in detail below with specific examples. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments.
First, the USB Type C interface and the terminal provided with the USB Type C interface in the present disclosure will be described in detail.
Fig. 1 is a pin layout diagram of a USB Type C interface. Referring to fig. 1, since the USB Type C interface supports a "forward and reverse plug" function that can be plugged from both the forward and reverse sides, the a side and the B side have 12 pins, respectively, and 24 pins in total. The 24 pins are 4 each of VBUS and GND, wherein VBUS is a power supply pin, GND is a ground pin, and TX1+, TX1-, RX1+, RX1-, TX2+, TX2-, RX2+ and RX 2-are four pairs of differential signal pins and are used for ultrahigh-speed data transmission. D + and D-are USB differential signal pins. SBU1 and SBU2 use signal pins for sidebands and are adapted to transmit non-USB signals. CC1 and CC2 are configuration channel signal pins for determining direction, distinguishing master and slave devices, and the like.
In general, a device with a USB Type C interface can serve three roles, namely, a downstream port (DFP), an upstream port (UFP), and a Dual Role Port (DRP). The DFP is used for supplying power for main equipment such as a desktop computer, a charger and the like; the UFP is powered for a slave device, such as a usb disk. The DRP may be powered as a device or may be powered as a slave device. Taking DRP as an example, when the terminal is turned on and off in standby, the terminal continuously supplies power to the USB Type C interface, the power supply voltage is, for example, VDD, and the pull-up resistor and the pull-down resistor are alternated at the CC pin, the CC pin outputs a square wave of high-low level conversion, and the voltage of other pins is 0V. For example, see fig. 2.
Fig. 2 is a circuit diagram illustrating a CC pin of a USB Type C interface in accordance with an example embodiment. Referring to fig. 2, taking the portable device as an OTG device as an example, when no portable (on-the-go, OTG) device is connected, the voltage of the CC pin is in a square wave state. When the CC pin is pulled up (80uA, 180uA or 330uA), the device is a DFP device and can charge the accessed device; when the CC pin is pulled down, the device is a UFP device and can be charged.
Fig. 3 is a diagram illustrating a terminal according to an example embodiment. Referring to fig. 3, in the present disclosure, a terminal is a terminal provided with a processor, an interface chip and an interface, the processor and the interface chip communicate based on protocols such as I2C, and the interface chip is used for controlling the interface.
The interface is corroded because the interface has an electrochemical reaction, and two conditions of the electrochemical reaction are: the voltage difference and the electrolyte, namely the electrolyte is the electrolyte which is formed by dissolving carbon dioxide, sulfur dioxide, nitrogen dioxide and the like in a water film formed by adsorbing moisture in the air or sweat of a user on the metal surface of the interface. Since the usage environment of the terminal cannot be controlled, according to the above: for DRP equipment, the probability of interface corrosion can be reduced by controlling the effective value of the voltage of the CC pin.
In this embodiment, the terminal provides an interface, where the interface is a USB interface, such as a USB Type C interface, the terminal includes a mobile phone, a Personal Digital Assistant (PAD), and the like, and the portable device refers to a device that can be inserted into the interface on the terminal, and taking the interface on the terminal as the USB Type C interface as an example, the portable device may be a mobile phone, a PAD, a Digital camera, a video camera, a printer, an OTG device, and the like. The OTG device is a device powered by a terminal, such as a USB disk, a USB fan, a USB headset, and a USB speaker.
Next, a method for preventing corrosion of the interface according to an embodiment of the present disclosure will be described in detail with reference to fig. 1 to 3. For example, see fig. 4.
FIG. 4 is a flowchart illustrating a method of preventing interface chips from corrosion according to an example embodiment. The execution subject of the method may be a device for preventing the interface from being corroded, or an interface chip integrated with the device for preventing the interface from being corroded. As shown in fig. 4, the method may include the steps of:
in step S101, the interface chip detects whether a portable device is inserted into the interface during a power-on period in a current power supply cycle, where the power supply cycle includes: a power-up period and a power-down period;
in the present disclosure, the terminal may include an interface, which may be, for example, a USB Type C interface. The terminal supplies power to the interface chip periodically according to a power supply period in a screen on state and a screen off standby state, wherein the power supply voltage is, for example, VDD. The interface chip periodically detects whether a portable device is inserted into the interface. If the interface chip detects that the portable device is inserted into the interface in the power-on period of the current power supply cycle, executing S102; if the interface chip does not detect that the portable device is inserted into the interface in the power-on period of the current power supply cycle, S103 is executed.
In step S102, the interface chip sends a first notification message to the processor, where the first notification message is used to notify the processor to continue to supply power to the interface chip during the power-off period.
In this disclosure, in each power supply cycle, taking the interface as a USB Type C interface as an example, the interface chip determines whether a portable device is inserted into the interface according to the voltage of the CC pin in the power-on period, if the CC pin outputs a square wave with a high-low level conversion, it indicates that no portable device is inserted, and if the CC pin is pulled down or pulled up, it indicates that a portable device is inserted. And when the interface chip determines that the portable equipment is inserted into the CC pin, sending a first notification message to a processor of the terminal, and continuously supplying power to the interface chip after the processor of the terminal receives the first notification message. That is, even though the terminal should stop supplying power to the interface chip at the end of the power-on period of the current cycle, the terminal continues to supply power to the interface chip during the power-off period since the portable device is inserted into the interface.
In step S103, the interface chip enters a sleep state during the power-down period.
In the disclosure, in each power supply cycle, if the interface chip does not detect that the portable device is inserted into the interface during the power-on period, the terminal stops supplying power to the interface chip during the power-off period; accordingly, the interface chip enters a sleep state during the power-down period.
According to the method for preventing the interface from being corroded, the interface chip is enabled to detect whether the portable equipment is inserted into the interface only in the power-on period in the current power supply cycle through periodically supplying power to the interface chip, if the portable equipment is detected to be inserted into the interface, a first notification message is sent to a processor of the terminal, the processor of the terminal is enabled to continuously supply power to the interface chip, and if the portable equipment is not detected to be inserted into the interface, the interface enters the dormant state in the power-off period. Compared with a power supply mode of continuously supplying power to the interface chip, the power supply method and the power supply system have the advantages that power is periodically supplied to the interface chip, so that the interface chip only works in the power-on period, and the interface chip enters the dormant state in the power-off period. That is to say, there is not voltage on the interface during the period of powering down, so electrochemical reaction will not occur, and the purpose of preventing the interface from being corroded is achieved.
In the following, the power supply cycle is described in detail by taking a portable device as an OTG device as an example. For example, see fig. 5.
FIG. 5 is a schematic diagram illustrating a power cycle in a method of preventing corrosion of an interface chip according to an example embodiment. As can be seen from fig. 5: when the interface is the USB Type C interface, the power supply voltage of the interface chip is a periodic square wave. Each power cycle includes a power-up period and a power-down period. The voltage value of the power-up period is, for example, 3 volts, the voltage of the power-down period is, for example, 0 volts, the duration of the power-up period is, for example, 200 milliseconds (ms), and the duration of the power-down period is, for example, 500 ms. The power-on period in every power supply cycle, when the USB Type C interface does not have the OTG equipment to insert, the square wave of USB Type C interface CC pin output high-low level conversion. When the CC pin is pulled up, the terminal is DFP equipment and can charge the accessed equipment; when the CC pin is pulled down, the terminal is UFP equipment and can be charged. The period of powering down in every power supply cycle, because whole interface chip does not have the electricity, even do not have OTG equipment to insert the USBType C interface, the square wave of the level transform of USBType C interface CC pin can not output yet, but be the low level.
Referring to fig. 5, assuming that the interface chip detects that an OTG device is plugged into the USB type c interface during the power-on period of the fourth power supply cycle, a first notification message is sent to the processor of the terminal, where the first notification message is used to indicate to the processor that the interface chip detects a portable OTG device during the power-on period of the current cycle. And after receiving the first notification message, the processor of the terminal continuously supplies power to the interface chip. That is to say, after the power-on period of the current power supply cycle is over, when the power-off period is reached, the terminal does not stop supplying power to the interface chip in the power-off period according to a scene that no OTG device is inserted, but continues supplying power to the interface chip, and until the OTG device is pulled out and the power-off period is reached, the terminal does not stop supplying power to the interface chip.
In the present disclosure, the size of VDD, the duration of the power-on period, and the duration of the power-off period may be flexibly set, which is not limited in the present disclosure. For example, the power-up period is 200ms, and the power-down period is 1 second or longer; as another example, the power-up period is 300ms and the power-down period is 1500 ms.
In the above embodiment, the interface chip is periodically powered to reduce the probability of corrosion of the interface chip. In another embodiment of the present disclosure, during the power-on period, the interface chip may further reduce the probability that the interface is corroded by controlling the state of the interface in combination with the screen state of the terminal. Next, how the interface chip further reduces the probability of the interface being corroded by controlling the state of the interface will be described in detail.
For example, before detecting whether a portable OTG device is inserted into the interface in a power-up period in a current power supply cycle, the interface chip further receives a second notification message sent by the processor, where the second notification message is used to indicate a screen state of the terminal device to the interface chip; and the interface chip adjusts the state of the interface according to the second notification message.
In this embodiment, the processor notifies the interface chip of the screen state of the terminal through the second notification message, so that the interface chip learns the screen state of the terminal, and further, the purpose of further reducing the probability of interface corrosion by controlling the state of the interface is achieved.
Taking the USB Type C interface as an example, under normal conditions, when the terminal is in the power-on state, no matter the terminal is in the standby screen-off state or the bright screen state, the USB Type C interface is in the DPR state. At this time, the CC pin outputs a square wave of high-low level conversion, and the voltage of the other pins is 0V. In the above embodiment, the interface chip is periodically powered, so that the CC pin outputs the square wave with the high and low level conversion only in the power-on period, and the probability of corrosion of the USBType C interface is reduced by reducing the effective level of the CC pin. In this embodiment, further, when the second notification message indicates that the terminal device is in the off-screen state, the interface chip adjusts the interface from the dual-role port DRP to the uplink port UFP; and when the second notification message indicates that the terminal equipment is in a bright screen state, the interface chip keeps the interface in a dual-role port DRP state.
According to the above, it can be seen that: in the disclosure, a processor of a terminal sends a screen state of the terminal to an interface chip through a second notification message, when the second notification message indicates that the terminal is in a bright screen state, the interface chip keeps a USB Type C interface in a DRP state, at this time, when no OTG device is inserted into the USB Type C interface, a CC pin outputs a square wave in a power-on period, and an output voltage in the power-on period is 0; when the second notification message is in the standby screen-off state, the interface chip adjusts the USB Type C interface from the DRP state to the UFP state, at this moment, the terminal is used as a slave device, and no matter whether an OTG device is inserted into the USB Type C interface or not, the voltage output on the CC pin is 0, so that the effective level of the CC pin can be further reduced in the power-on period, and the reduction of the corrosion probability of the USB Type C interface is realized.
After the USB Type C interface is adjusted to the UFP state, when OTG equipment inserts the USB Type C interface, the user can light the terminal for the terminal is in the bright screen state. And the processor of the terminal sends a second notification message to the interface chip, so that the interface chip sets the USB Type C interface to be in a DRP state. In the power-on period, the interface chip detects that the OTG device is inserted, and sends a first notification message to the processor, so that the processor continuously supplies power to the interface chip. Taking the terminal as a mobile phone and the OTG device as a USB disk as an example, when the mobile phone is in standby mode and the screen is turned off, the USB Type C interface is set to the UFP state by the interface chip. When a USB flash disk is inserted into the mobile phone, the user presses a power key on the mobile phone to light up the mobile phone. After the mobile phone is lighted up, the processor on the mobile phone sends the screen state to the interface chip through the second notification message, and the interface chip adjusts the USB Type C interface from the UFP state to the DRP state. Therefore, during the power-on period, the mobile phone can detect the USB flash disk and continuously supply power to the interface chip, so that data interaction can be performed between the mobile phone and the USB flash disk.
In this embodiment, according to the screen state of the terminal, when the terminal is in a standby screen-off state, the interface chip sets the interface to the UFP state, and further reduces the effective level of the CC pin during the power-on period, thereby further achieving the purpose of reducing the probability of the interface being corroded.
In the above embodiment, the voltage of the CC pin is controlled by controlling the time length of the power supply CC pin outputting the square wave, for example, when the screen state is not considered, the USB Type C interface is periodically powered, so that the CC pin outputs the square wave only in the power-on period; for another example, when considering the screen state, when the terminal is in off-screen standby, the interface is adjusted to the UFP state so that the CC pin is at a low level even during the power-on period. In addition, the effective level of the CC pin can be reduced by controlling the power supply voltage, namely the size of VDD, and the duty ratio of the square wave of the CC pin, so that the corrosion probability of the USB type C interface is reduced. Next, how to reduce the magnitude of VDD and the duty cycle of the square wave at the CC pin will be described in detail.
First, VDD is reduced.
In this disclosure, the power supply voltage of the interface chip is higher than the preset voltage, and a difference value between the power supply voltage of the interface chip and the preset voltage is smaller than or equal to a first preset difference value.
For an example, taking the USB Type C interface as an interface, see table 1, where table 1 is a design rule table of VDD in the USB Type C interface protocol.
TABLE 1
Figure BDA0002012738100000141
From table 1, it can be seen that: the USB Type C interface is regulated by the protocol to have the power supply voltage between 2.7V and 5V. To reduce the voltage at the CC pin. In the present disclosure, the effective voltage value of the CC pin is required to be as small as possible on the premise of meeting the power supply voltage requirement of the interface chip. When the CC pin is pulled up, the effective value of the voltage of the CC pin is VDD. Therefore, it is necessary to set VDD as small as possible so that VDD is greater than the preset voltage and a difference from the preset voltage is smaller than the first preset difference. For example, when VDD is 2.8V or 2.9V, the preset voltage is 2.7V, and when the USB Type C interface chip is overloaded, the negative ripple peak value is greater than 2.7V.
In this embodiment, the voltage effective value of the CC pin of the USB Type C interface is as small as possible by setting the power supply voltage as small as possible, thereby achieving the purpose of reducing the probability that the USB Type C interface is corroded.
Second, the duty cycle of the CC pin is reduced.
In this disclosure, a duty ratio of a square wave output by a power pin of the interface chip is higher than a preset duty ratio, and a difference value from the preset duty ratio is smaller than or equal to a second preset difference value.
Illustratively, taking an interface specifically a USB Type C interface as an example, table 2 shows the requirement of the USB Type C interface protocol on the duty ratio of the CC pin square wave.
TABLE 2
Minimum value Maximum value
Period of square wave 50ms 100ms
Duty cycle 30% 70%
From table 2, it can be seen that: the USB Type C interface protocol requires that the period of the square wave of the CC pin is 50-100 ms, the duty ratio is 30-70%, and the effective voltage value of the CC pin is related to the duty ratio. Therefore, the duty ratio of the square wave at the CC pin needs to be set as small as possible, so that the duty ratio of the square wave output by the CC pin is higher than the preset duty ratio, and the difference value from the preset duty ratio is smaller than or equal to a second preset difference value. Wherein the preset duty cycle is 33%, for example. In addition, when the usb type C interface supports satisfying Power Delivery (PD), PD compatibility needs to be considered, that is, the duty ratio of the CC pin is set as small as possible on the premise of satisfying the PD compatibility test.
Fig. 6 is a schematic diagram illustrating a duty cycle of a CC pin output square wave in a method for preventing an interface chip from being corroded according to an exemplary embodiment. As can be seen from fig. 6: when the period of the square wave is 90ms, the positive pulse may be set to 30ms, at which time the duty cycle is 33%. And a part of allowance is reserved relative to the minimum value of 30% required by the USB Type C interface protocol.
In this embodiment, the duty ratio of the square wave output by the CC pin is set as small as possible, so that the effective voltage value of the CC pin of the USB Type C interface is as small as possible, and the purpose of reducing the probability of corrosion of the USB Type C interface is achieved.
In the above embodiments, the CC pin may be CC1 or CC2, and the disclosure is not limited.
FIG. 7 is a flow chart illustrating another method of preventing corrosion of an interface chip in accordance with an example embodiment. The execution subject of the method may be a device for preventing the interface from being corroded, or may be a processor integrated with the device for preventing the interface from being corroded. As shown in fig. 7, the method may include the steps of:
in step S201, the processor supplies power to the interface chip according to a power supply cycle, where the power supply cycle includes: a power-up period and a power-down period.
In step S202, the processor determines whether a first notification message sent by the interface chip is received, and if the processor receives the first notification message, step S203 is executed; if the processor does not receive the first notification message, step S204 is executed, where the first notification message is used to indicate to the processor that the interface chip detects the portable device in the power-on period of the current cycle.
In step S203, the processor continues to supply power to the interface chip during the power-down period.
In step S204, the processor stops supplying power to the interface chip during the power-down period.
In this embodiment, the method for preventing the interface from being corroded according to the present disclosure is described from the perspective of the processor of the terminal, and for the related description, reference may be made to fig. 4 or the alternative embodiment, which is not described herein again.
According to the method for preventing the interface from being corroded, the processor supplies power to the interface chip periodically, so that the interface chip detects whether the portable equipment is inserted into the interface only in the power-on period in the current power supply period, if the portable equipment is inserted, a first notification message is sent to the processor of the terminal, the processor of the terminal continuously supplies power to the interface chip, and if the portable equipment is not inserted into the interface, the processor enters a dormant state in the power-off period. Compared with a power supply mode of continuously supplying power to the interface chip, the power supply method and the power supply system have the advantages that power is periodically supplied to the interface chip, so that the interface chip only works in the power-on period, and the interface chip enters the dormant state in the power-off period. That is to say, during the power-off period, no voltage exists on the interface, so that no electrochemical reaction occurs, and the purpose of preventing the interface from being corroded is achieved.
Optionally, after the processor supplies power to the interface chip according to a power supply cycle, the method further includes: and the processor sends a second notification message to the interface chip, wherein the second notification message carries the screen state of the terminal equipment. In this embodiment, the processor notifies the interface chip of the screen state of the terminal through the second notification message, so that the interface chip learns the screen state of the terminal, and further, the purpose of further reducing the probability of interface corrosion by controlling the state of the interface is achieved.
Optionally, the second notification message is used to indicate to the interface chip that the terminal device is in a screen-on state or a screen-off state. In this embodiment, the processor notifies the interface chip of the screen state of the terminal through the second notification message, so that the interface chip learns the screen state of the terminal, and further, the purpose of further reducing the probability of interface corrosion by controlling the state of the interface is achieved.
The following are embodiments of the disclosed apparatus that may be used to perform embodiments of the disclosed methods. For details not disclosed in the embodiments of the apparatus of the present disclosure, refer to the embodiments of the method of the present disclosure.
Fig. 8 is a block diagram illustrating an apparatus for preventing an interface from being corroded, which is applied to an interface chip on a terminal, according to an exemplary embodiment. The interface corrosion prevention apparatus may include:
a detecting module 11 configured to detect whether a portable device is plugged into the interface during a power-on period in a current power cycle, the power cycle including: a power-up period and a power-down period;
a sending module 12, configured to send a first notification message to the processor if the detecting module 11 detects that a portable device is inserted into the interface, where the first notification message is used to notify the processor to continue to supply power to the interface chip during the power-down period;
a hibernation module 13 configured to enter a hibernation state during the power-down period if the detection module 11 does not detect that the portable device is inserted into the interface.
According to the device for preventing the interface from being corroded, the interface chip is enabled to detect whether the portable equipment is inserted into the interface only in the power-on period in the current power supply cycle through periodically supplying power to the interface chip, if the portable equipment is detected to be inserted into the interface, a first notification message is sent to the processor of the terminal, the processor of the terminal is enabled to continuously supply power to the interface chip, and if the portable equipment is not detected to be inserted into the interface, the interface enters the dormant state in the power-off period. Compared with a power supply mode of continuously supplying power to the interface chip, the power supply method and the power supply system have the advantages that power is periodically supplied to the interface chip, so that the interface chip only works in the power-on period, and the interface chip enters the dormant state in the power-off period. That is to say, during the power-off period, no voltage exists on the interface, so that no electrochemical reaction occurs, and the purpose of preventing the interface from being corroded is achieved.
Fig. 9 is a block diagram illustrating an apparatus for preventing an interface from being corroded according to another exemplary embodiment. As shown in fig. 9, the apparatus for preventing the interface from being corroded, based on the block diagram shown in fig. 8, may further include: a receiving module 14 and a first adjusting module 15;
the receiving module 14 is configured to receive a second notification message sent by the processor before the detecting module 11 detects whether a portable device is inserted into the interface in the power-on period in the current power supply cycle, where the second notification message is used to indicate the screen status of the terminal device to the interface chip;
the first adjusting module 15 is configured to adjust the state of the interface according to the second notification message.
According to the device for preventing the interface from being corroded, the processor informs the interface chip of the screen state of the terminal through the second notification message, so that the interface chip can know the screen state of the terminal, and the purpose that the interface chip further reduces the probability that the interface is corroded through controlling the state of the interface is achieved.
Fig. 10 is a block diagram illustrating an apparatus for preventing an interface from being corroded according to still another exemplary embodiment. As shown in fig. 10, the apparatus for preventing the interface from being corroded, based on the block diagram shown in fig. 9, may further include:
a second adjusting module 16, configured to adjust the interface from the dual-role port DRP to the upstream port UFP when the second notification message indicates that the terminal device is in the off-screen state;
a maintaining module 17, configured to maintain the interface in a dual role port DRP state when the second notification message indicates that the terminal device is in a bright screen state.
According to the device for preventing the interface from being corroded, the interface chip sets the interface to be in the UFP state when the terminal is in a standby screen-off state according to the screen state of the terminal, and the effective level of the CC pin in the power-on period is further reduced, so that the purpose of reducing the probability of corroding the interface is further achieved.
In a possible implementation manner, the power supply voltage of the interface chip is higher than a preset voltage, and a difference value between the power supply voltage and the preset voltage is smaller than or equal to a first preset difference value.
In one possible implementation, the predetermined voltage is 2.7 volts.
In a feasible implementation manner, a duty ratio of the square wave output by the power pin of the interface chip is higher than a preset duty ratio, and a difference value between the preset duty ratio and the duty ratio is smaller than or equal to a second preset difference value.
In one possible implementation, the preset duty cycle is 30%.
In a possible implementation, the interface is a USB Type C interface.
Fig. 11 is a block diagram illustrating an apparatus for preventing an interface from being corroded, which is applied to a processor on a terminal, according to an example embodiment. The interface corrosion prevention apparatus may include:
a determining module 21, configured to determine whether a first notification message sent by the interface chip is received, where the first notification message is used to indicate to the processor that the interface chip detects a portable device in a power-on period of a current cycle;
a power module 22 configured to supply power to the interface chip according to a power cycle, the power cycle including: a power-up period and a power-down period; if the judging module 21 judges that the first notification message is received, power is continuously supplied to the interface chip in the power-off period; if the determining module 21 determines that the first notification message is not received, the power supply to the interface chip is stopped during the power-off period.
According to the device for preventing the interface from being corroded, the interface chip is enabled to detect whether the portable equipment is inserted into the interface only in the power-on period in the current power supply cycle through supplying power to the interface chip periodically, if the portable equipment is detected to be inserted into the interface chip, a first notification message is sent to the processor of the terminal, the processor of the terminal is enabled to supply power to the interface chip continuously, and if the portable equipment is not detected to be inserted into the interface chip, the interface chip enters the dormant state in the power-off period. Compared with a power supply mode of continuously supplying power to the interface chip, the power supply method and the power supply system have the advantages that power is periodically supplied to the interface chip, so that the interface chip only works in the power-on period, and the interface chip enters the dormant state in the power-off period. That is to say, there is not voltage on the interface during the period of powering down, so electrochemical reaction will not occur, and the purpose of preventing the interface from being corroded is achieved.
Fig. 12 is a block diagram illustrating an apparatus for preventing an interface from being corroded according to still another exemplary embodiment. As shown in fig. 12, the apparatus for preventing the interface from being corroded, based on the block diagram shown in fig. 11, may further include:
the sending module 23 is configured to send a second notification message to the interface chip after the power supply supplies power to the interface chip according to a power supply cycle, where the second notification message carries a screen state of the terminal device.
According to the device for preventing the interface from being corroded, the processor informs the interface chip of the screen state of the terminal through the second notification message, so that the interface chip can know the screen state of the terminal, and the purpose that the interface chip further reduces the probability that the interface is corroded through controlling the state of the interface is achieved.
In a possible implementation manner, the second notification message is used to indicate to the interface chip that the terminal device is in a screen-on state or a screen-off state.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
FIG. 13 is a block diagram illustrating an entity of an interface chip for controlling an interface in accordance with an exemplary embodiment. As shown in fig. 13, the interface chip includes:
a memory 31 and a processor 32.
The memory 31 is used for storing executable instructions of the processor 32.
The processor 32 is configured to:
the interface chip detects whether a portable device is inserted into the interface in a power-on period in a current power supply cycle, wherein the power supply cycle comprises: a power-up period and a power-down period;
if the interface chip detects that the portable equipment is inserted into the interface, a first notification message is sent to the terminal, and the first notification message is used for notifying the terminal to continue to supply power to the interface chip in the power-off period;
and if the interface chip does not detect that the portable equipment is inserted into the interface, entering a dormant state in the power-off period.
In a possible implementation manner, before the interface chip detects whether a portable device is inserted into the interface during a power-up period in a current power cycle, the method further includes:
the interface chip receives a second notification message sent by the terminal, wherein the second notification message is used for indicating the screen state of the terminal equipment to the interface chip;
and the interface chip adjusts the state of the interface according to the second notification message.
In a possible implementation manner, the adjusting, by the interface chip, the state of the interface according to the second notification message includes:
when the second notification message indicates that the terminal device is in a screen-off state, the interface chip adjusts the interface from a dual-role port DRP to an uplink port UFP;
and when the second notification message indicates that the terminal equipment is in a bright screen state, the interface chip keeps the interface in a dual-role port DRP state.
In a possible implementation manner, the power supply voltage of the interface chip is higher than a preset voltage, and a difference value between the power supply voltage and the preset voltage is smaller than or equal to a first preset difference value.
In one possible implementation, the predetermined voltage is 2.7 volts.
In a feasible implementation manner, a duty ratio of the square wave output by the power pin of the interface chip is higher than a preset duty ratio, and a difference value between the preset duty ratio and the duty ratio is smaller than or equal to a second preset difference value.
In one possible implementation, the preset duty cycle is 30%.
In a feasible implementation, the interface is a USB Type C interface.
Fig. 14 is a block diagram illustrating a terminal for controlling an interface chip, the interface chip being for controlling an interface, according to an example embodiment. As shown in fig. 14, the terminal includes:
a memory 41 and a processor 42.
The memory 41 is used to store executable instructions for the processor 42.
The processor 42 is configured to:
supplying power to the interface chip according to a power supply cycle, the power supply cycle comprising: a power-up period and a power-down period;
judging whether a first notification message sent by the interface chip is received, wherein the first notification message is used for indicating the processor that the interface chip detects the portable device in the power-on period of the current cycle;
if the first notification message is received, continuing to supply power to the interface chip in the power-off period;
and if the first notification message is not received, stopping supplying power to the interface chip in a power-down period.
In a possible implementation manner, after the processor supplies power to the interface chip according to a power cycle, the method further includes:
and the processor sends a second notification message to the interface chip, wherein the second notification message carries the screen state of the terminal equipment.
In a possible implementation manner, the second notification message is used to indicate to the interface chip that the terminal device is in a screen-on state or a screen-off state.
In the above embodiments of the interface chip and the terminal, it should be understood that the Processor may be a Central Processing Unit (CPU), other general purpose processors, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), and so on. The general-purpose processor may be a microprocessor, or the processor may be any conventional processor, and the aforementioned memory may be a read-only memory (ROM), a Random Access Memory (RAM), a flash memory, a hard disk, or a solid state disk. Optionally, the device for preventing the interface from being corroded may further include a SIM card. SIM cards, also known as subscriber identity cards, smart cards, must be installed in a digital mobile phone for use. That is, the information of the digital mobile phone client, the encrypted key and the contents of the user's phone book are stored on the computer chip. The steps of a method disclosed in connection with the embodiments of the present disclosure may be embodied directly in a hardware processor, or in a combination of hardware and software modules.
Fig. 15 is a block diagram illustrating another terminal according to an example embodiment. For example, the apparatus 700 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 7, apparatus 700 may include one or more of the following components: a processing component 702, a memory 704, a power component 706, a multimedia component 708, an audio component 710, an input/output (I/O) interface 712, a sensor component 714, and a communication component 716.
The processing component 702 generally controls overall operation of the device 700, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 702 may include one or more processors 720 to execute instructions to perform all or a portion of the steps of the methods described above. Further, processing component 702 may include one or more modules that facilitate interaction between processing component 702 and other components. For example, the processing component 702 may include a multimedia module to facilitate interaction between the multimedia component 708 and the processing component 702.
The memory 704 is configured to store various types of data to support operation at the apparatus 700. Examples of such data include instructions for any application or method operating on device 700, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 704 may be implemented by any type or combination of volatile or non-volatile storage devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The power supply component 706 provides power to the various components of the device 700. The power components 706 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the apparatus 700.
The multimedia component 708 includes a touch-sensitive display screen that provides an output interface between the device 700 and a user. In some embodiments, the touch display screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 708 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the device 700 is in an operation mode, such as a photographing mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 710 is configured to output and/or input audio signals. For example, audio component 710 includes a Microphone (MIC) configured to receive external audio signals when apparatus 700 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal may further be stored in the memory 704 or transmitted via the communication component 716. In some embodiments, audio component 710 also includes a speaker for outputting audio signals.
The I/O interface 712 provides an interface between the processing component 702 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a main bar button, a volume button, a start button, and a lock button.
The sensor assembly 714 includes one or more sensors for providing various aspects of status assessment for the device 700. For example, sensor assembly 714 may detect an open/closed state of device 700, the relative positioning of components, such as a display and keypad of device 700, the change in position of device 700 or a component of device 700, the presence or absence of user contact with device 700, the orientation or acceleration/deceleration of device 700, and the change in temperature of device 700. The sensor assembly 714 may include a proximity sensor configured to detect the presence of nearby objects in the absence of any physical contact. The sensor assembly 714 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 714 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 716 is configured to facilitate communication between the apparatus 700 and other devices in a wired or wireless manner. The apparatus 700 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 716 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 716 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 700 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods applied to an interface chip or for performing the above-described methods applied to a processor of a terminal.
When the above method applied to the interface chip is performed, the method includes:
detecting whether a portable device is inserted into the interface in a power-on period in a current power supply cycle, wherein the power supply cycle comprises: a power-up period and a power-down period;
if the portable equipment is detected to be inserted into the interface, sending a first notification message to a terminal, wherein the first notification message is used for notifying the terminal to continuously supply power to the interface chip in the power-off period;
and if the portable equipment is not detected to be inserted into the interface, entering a dormant state in the power-down period.
In a possible implementation manner, the detecting whether a portable device is inserted into the interface during the power-up period in the current power cycle further includes:
receiving a second notification message sent by the terminal, wherein the second notification message is used for indicating the screen state of the terminal equipment to the interface chip;
and adjusting the state of the interface according to the second notification message.
In a possible implementation manner, the adjusting the state of the interface according to the second notification message includes:
when the second notification message indicates that the terminal device is in a screen-out state, adjusting the interface from a dual-role port DRP to an uplink port UFP;
and when the second notification message indicates that the terminal equipment is in a bright screen state, keeping the interface in a dual-role port DRP state.
In a possible implementation manner, the supply voltage is higher than a preset voltage, and a difference value from the preset voltage is smaller than or equal to a first preset difference value.
In one possible implementation, the predetermined voltage is 2.7 volts.
In a feasible implementation manner, a duty ratio of a square wave output by a power pin of the interface chip is higher than a preset duty ratio, and a difference value between the duty ratio and the preset duty ratio is smaller than or equal to a second preset difference value.
In one possible implementation, the preset duty cycle is 30%.
In a feasible implementation, the interface is a USB Type C interface.
When the method applied to the processor of the terminal is executed, the method includes:
supplying power to the interface chip according to a power cycle, the power cycle including: a power-up period and a power-down period;
judging whether a first notification message sent by the interface chip is received, wherein the first notification message is used for indicating the interface chip to detect the portable equipment in the power-on period of the current cycle to the processor;
if the first notification message is received, continuing to supply power to the interface chip in the power-off period;
and if the first notification message is not received, stopping supplying power to the interface chip in the power-off period.
In a possible implementation manner, after the processor supplies power to the interface chip according to a power cycle, the method further includes:
and the processor sends a second notification message to the interface chip, wherein the second notification message carries the screen state of the terminal equipment.
In a possible implementation manner, the second notification message is used to indicate to the interface chip that the terminal device is in a screen-on state or a screen-off state.
In an exemplary embodiment, a non-transitory computer readable storage medium comprising instructions, such as the memory 704 comprising instructions, executable by the processor 720 of the device 700 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
The present disclosure also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method of preventing an interface from being corroded, the method comprising:
detecting whether a portable device is inserted into the interface in a power-on period in a current power supply cycle, wherein the power supply cycle comprises: a power-up period and a power-down period;
if the portable equipment is inserted into the interface, sending a first notification message to the processor, wherein the first notification message is used for notifying the processor to continuously supply power to the interface chip in the power-down period;
and if the portable equipment is not detected to be inserted into the interface, entering a dormant state in the power-down period.
In a possible implementation manner, before detecting whether a portable device is inserted into the interface during the power-on period in the current power cycle, the method further includes:
receiving a second notification message sent by the processor, wherein the second notification message is used for indicating the screen state of the terminal device to the interface chip;
and adjusting the state of the interface according to the second notification message.
In a possible implementation manner, the adjusting the state of the interface according to the second notification message includes:
when the second notification message indicates that the terminal device is in a screen-out state, adjusting the interface from a dual-role port DRP to an uplink port UFP;
and when the second notification message indicates that the terminal equipment is in a bright screen state, keeping the interface in a dual-role port DRP state.
In a possible implementation manner, the supply voltage is higher than a preset voltage, and a difference between the supply voltage and the preset voltage is smaller than or equal to a first preset difference.
In one possible implementation, the predetermined voltage is 2.7 volts.
In a feasible implementation manner, a duty ratio of the square wave output by the power pin of the interface chip is higher than a preset duty ratio, and a difference value between the preset duty ratio and the duty ratio is smaller than or equal to a second preset difference value.
In one possible implementation, the preset duty cycle is 30%.
In a possible implementation, the interface is a USB Type C interface.
The present disclosure also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method of preventing an interface from being corroded, the method being applied to the processor on a terminal, including:
the processor is applied to a terminal, the terminal is provided with the processor, an interface chip and an interface, the interface chip is used for controlling the interface, and the method comprises the following steps:
supplying power to the interface chip according to a power supply cycle, the power supply cycle comprising: a power-up period and a power-down period;
judging whether a first notification message sent by the interface chip is received, wherein the first notification message is used for indicating the processor that the interface chip detects the portable device in the power-on period of the current cycle;
if the first notification message is received, continuing to supply power to the interface chip in the power-off period;
and if the first notification message is not received, stopping supplying power to the interface chip in the power-off period.
In a possible implementation manner, after the processor supplies power to the interface chip according to a power cycle, the method further includes:
and the processor sends a second notification message to the interface chip, wherein the second notification message carries the screen state of the terminal equipment.
In a possible implementation manner, the second notification message is used to indicate to the interface chip that the terminal device is in a screen-on state or a screen-off state.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice in the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (20)

1. A method for preventing an interface from being corroded, wherein a processor, an interface chip and an interface are arranged on a terminal, and the interface chip is used for controlling the interface, the method comprising:
the interface chip receives a second notification message sent by the processor, wherein the second notification message is used for indicating the screen state of the terminal equipment to the interface chip;
the interface chip adjusts the state of the interface according to the second notification message, including:
when the second notification message indicates that the terminal device is in a screen-off state, the interface chip adjusts the interface from a dual-role port DRP to an uplink port UFP;
when the second notification message indicates that the terminal device is in a bright screen state, the interface chip keeps the interface in a dual-role port DRP state;
the interface chip detects whether a portable device is inserted into the interface in a power-on period of a current power supply cycle, wherein the power supply cycle comprises: a power-up period and a power-down period;
if the interface chip detects that a device is inserted into the interface, sending a first notification message to the processor, wherein the first notification message is used for notifying the processor to continuously supply power to the interface chip in the power-down period;
if the interface chip does not detect that equipment is inserted into the interface, the power supply to the interface chip is stopped in the power-down period, and the power supply to the interface chip enters a dormant state in the power-down period.
2. The method of claim 1, wherein the supply voltage of the interface chip is higher than a predetermined voltage and has a difference from the predetermined voltage smaller than or equal to a first predetermined difference.
3. The method of claim 2, wherein the predetermined voltage is 2.7 volts.
4. The method of claim 1, wherein a duty ratio of the square wave output from the power pin of the interface chip is higher than a preset duty ratio, and a difference value from the preset duty ratio is smaller than or equal to a second preset difference value.
5. The method of claim 4, wherein the preset duty cycle is 30%.
6. The method according to any one of claims 1 to 5, wherein the interface is a USB Type C interface.
7. A method for preventing an interface from being corroded, the method being applied to a processor on a terminal, the processor, an interface chip and an interface being disposed on the terminal, the interface chip being used for controlling the interface, the method comprising:
the processor supplies power to the interface chip according to a power supply cycle, wherein the power supply cycle comprises the following steps: a power-up period and a power-down period;
the processor judges whether a first notification message sent by the interface chip is received or not, wherein the first notification message is used for indicating the processor that the interface chip detects the portable equipment in the power-on period of the current cycle;
if the processor receives the first notification message, the processor continues to supply power to the interface chip in the power-down period;
if the processor does not receive the first notification message, stopping supplying power to the interface chip in the power-down period so as to enable the interface chip to enter a sleep mode in the power-down period;
after the processor supplies power to the interface chip according to the power supply cycle, the method further comprises the following steps:
the processor sends a second notification message to the interface chip, the second notification message carries the screen state of the terminal device, the second notification message is used for indicating to the interface chip the terminal device is in the on-screen state or the off-screen state, so that the interface chip adjusts the interface from the dual-role port DRP to the uplink port UFP when the terminal device is in the off-screen state, and when the terminal device is in the on-screen state, the interface chip keeps the interface in the dual-role port DRP state.
8. An apparatus for preventing an interface from being corroded, the apparatus being used for a terminal, the terminal being provided with a processor, the interface chip and the interface, the interface chip being used for controlling the interface, the apparatus comprising:
a detection module configured to detect whether a portable device is plugged into the interface during a power-up period in a current power cycle, the power cycle including: a power-up period and a power-down period;
a sending module configured to send a first notification message to the processor if the detection module detects that a portable device is inserted into the interface, wherein the first notification message is used for notifying the processor to continue to supply power to the interface chip during the power-down period;
a sleep module configured to stop supplying power to the interface chip during the power-down period if the detection module does not detect that a portable device is inserted into the interface, and the interface chip enters a sleep state during the power-down period;
the receiving module is configured to receive a second notification message sent by the processor before the detecting module detects whether a portable device is inserted into the interface in a power-on period in a current power supply cycle, wherein the second notification message is used for indicating a screen state of the terminal device to the interface chip;
the first adjusting module is configured to adjust the state of the interface according to the second notification message;
a second adjusting module, configured to adjust the interface from a dual-role port DRP to an uplink port UFP when the second notification message indicates that the terminal device is in a shutdown state;
a maintaining module configured to maintain the interface in a Dual Role Port (DRP) state when the second notification message indicates that the terminal device is in a bright screen state.
9. The apparatus of claim 8, wherein the supply voltage of the interface chip is higher than a predetermined voltage and has a difference from the predetermined voltage smaller than or equal to a first predetermined difference.
10. The apparatus of claim 9, wherein the predetermined voltage is 2.7 volts.
11. The apparatus of claim 8, wherein a duty ratio of the square wave output from the power pin of the interface chip is higher than a preset duty ratio, and a difference value from the preset duty ratio is smaller than or equal to a second preset difference value.
12. The apparatus of claim 11, wherein the preset duty cycle is 30%.
13. The apparatus of any one of claims 8-12, wherein the interface is a USB Type C interface.
14. An apparatus for preventing an interface from being corroded, wherein the apparatus is applied to a processor on a terminal, the processor, an interface chip and the interface are arranged on the terminal, the interface chip is used for controlling the interface, and the apparatus comprises:
the judging module is configured to judge whether a first notification message sent by the interface chip is received, wherein the first notification message is used for indicating the interface chip to the processor that the portable device is detected in the power-on period of the current cycle;
a power module configured to supply power to the interface chip according to a power cycle, the power cycle including: a power-up period and a power-down period; if the judging module judges that the first notification message is received, the interface chip is continuously supplied with power in the power-off period; if the judging module judges that the first notification message is not received, stopping supplying power to the interface chip in the power-off period so as to enable the interface chip to enter a sleep mode in the power-off period;
the device further comprises:
the sending module is configured to send a second notification message to the interface chip after the power supply supplies power to the interface chip according to a power supply period, the second notification message carries a screen state of the terminal device, the second notification message is used for indicating the terminal device to be in a screen-on state or a screen-off state to the interface chip, so that when the terminal device is in the screen-off state, the interface chip adjusts the interface from the dual-role port DRP to the uplink port UFP, and when the terminal device is in the screen-on state, the interface chip keeps the interface in the dual-role port DRP state.
15. An interface chip, wherein the interface chip is used for controlling an interface, the interface chip comprising:
a processor;
a memory for storing executable instructions of the processor;
wherein the processor is configured to:
receiving a second notification message sent by the processor, wherein the second notification message is used for indicating the screen state of the terminal equipment;
adjusting the state of the interface according to the second notification message, including:
when the second notification message indicates that the terminal device is in a screen-out state, the interface chip adjusts the interface from a dual-role port DRP to an uplink port UFP;
when the second notification message indicates that the terminal device is in a bright screen state, the interface chip keeps the interface in a dual-role port DRP state;
detecting whether a portable device is inserted into the interface in a power-on period in a current power cycle, wherein the power cycle comprises: a power-up period and a power-down period;
if the portable equipment is detected to be inserted into the interface, sending a first notification message to a terminal, wherein the first notification message is used for notifying the terminal to continuously supply power to the interface chip in the power-off period;
if the portable equipment is not detected to be inserted into the interface, the power supply to the interface chip is stopped in the power-down period, and the interface chip enters a dormant state in the power-down period.
16. An interface chip, wherein the interface chip is used for controlling an interface, the interface chip comprising: memory, a processor and computer instructions, the processor executing the computer instructions to perform the steps of the method of any one of claims 1-6.
17. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 6.
18. A terminal, characterized in that the terminal is adapted to control an interface chip, said interface chip being adapted to control an interface, the terminal comprising:
a processor;
a memory for storing executable instructions of the processor;
wherein the processor is configured to:
supplying power to the interface chip according to a power cycle, the power cycle including: a power-up period and a power-down period;
judging whether a first notification message sent by the interface chip is received, wherein the first notification message is used for indicating the interface chip to detect the portable equipment in the power-on period of the current cycle to the processor;
if the first notification message is received, continuing to supply power to the interface chip in the power-down period;
if the first notification message is not received, stopping supplying power to the interface chip in the power-down period so as to enable the interface chip to enter a sleep mode in the power-down period;
after the processor is configured to supply power to the interface chip according to a power cycle, the processor further comprises:
and sending a second notification message to the interface chip, wherein the second notification message carries the screen state of the terminal device, the second notification message is used for indicating to the interface chip that the terminal device is in a screen-on state or a screen-off state, so that the interface chip adjusts the interface from the dual-role port DRP to the uplink port UFP when the terminal device is in the screen-off state, and the interface chip keeps the interface in the dual-role port DRP state when the terminal device is in the screen-on state.
19. A terminal, characterized in that the terminal is adapted to control an interface chip, said interface chip being adapted to control an interface, the terminal comprising: memory, a processor and computer instructions, the processor executing the computer instructions to perform the steps of the method of claim 7.
20. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method as claimed in claim 7.
CN201910252476.7A 2019-03-29 2019-03-29 Method, device and storage medium for preventing interface from being corroded Active CN111752362B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910252476.7A CN111752362B (en) 2019-03-29 2019-03-29 Method, device and storage medium for preventing interface from being corroded

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910252476.7A CN111752362B (en) 2019-03-29 2019-03-29 Method, device and storage medium for preventing interface from being corroded

Publications (2)

Publication Number Publication Date
CN111752362A CN111752362A (en) 2020-10-09
CN111752362B true CN111752362B (en) 2022-08-19

Family

ID=72672686

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910252476.7A Active CN111752362B (en) 2019-03-29 2019-03-29 Method, device and storage medium for preventing interface from being corroded

Country Status (1)

Country Link
CN (1) CN111752362B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113030794B (en) * 2021-03-02 2022-07-15 Oppo广东移动通信有限公司 Device detection method and device, computer readable medium and electronic device
CN114510444A (en) * 2022-01-12 2022-05-17 青岛海信移动通信技术股份有限公司 Control method and control device of OTG interface and terminal equipment
CN116069697B (en) * 2023-03-06 2023-08-22 荣耀终端有限公司 Type-C interface level control method and related device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101056180A (en) * 2007-05-25 2007-10-17 杭州华三通信技术有限公司 Power management method, system, main control board and intelligent interface board
CN102339122A (en) * 2010-07-23 2012-02-01 杭州华三通信技术有限公司 Digital communication device capable of saving electricity, and electricity-saving control device and method thereof
CN104268110A (en) * 2014-09-15 2015-01-07 联想(北京)有限公司 Device identification method, processor and device identification system
CN108268389A (en) * 2016-12-30 2018-07-10 维沃移动通信有限公司 The insertion detection method and mobile terminal of a kind of equipment
CN208257029U (en) * 2018-06-04 2018-12-18 敏华家具制造(惠州)有限公司 A kind of USB socket
CN109189617A (en) * 2018-07-27 2019-01-11 维沃移动通信有限公司 A kind of universal serial bus c-type interface detection method and terminal

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201262743Y (en) * 2008-05-06 2009-06-24 鸿富锦精密工业(深圳)有限公司 Creepage detection and alarm device for computer power supply

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101056180A (en) * 2007-05-25 2007-10-17 杭州华三通信技术有限公司 Power management method, system, main control board and intelligent interface board
CN102339122A (en) * 2010-07-23 2012-02-01 杭州华三通信技术有限公司 Digital communication device capable of saving electricity, and electricity-saving control device and method thereof
CN104268110A (en) * 2014-09-15 2015-01-07 联想(北京)有限公司 Device identification method, processor and device identification system
CN108268389A (en) * 2016-12-30 2018-07-10 维沃移动通信有限公司 The insertion detection method and mobile terminal of a kind of equipment
CN208257029U (en) * 2018-06-04 2018-12-18 敏华家具制造(惠州)有限公司 A kind of USB socket
CN109189617A (en) * 2018-07-27 2019-01-11 维沃移动通信有限公司 A kind of universal serial bus c-type interface detection method and terminal

Also Published As

Publication number Publication date
CN111752362A (en) 2020-10-09

Similar Documents

Publication Publication Date Title
JP7121865B2 (en) Reverse charging device, method and device for adjusting reverse charging current
CN111752362B (en) Method, device and storage medium for preventing interface from being corroded
EP3112980B1 (en) Circuit, method and device for waking up master mcu
CN108631401B (en) Charging circuit, method, electronic device, and storage medium
US11411422B2 (en) Battery charging method, battery charging apparatus and storage medium
KR20100072857A (en) Controlling method of interrupt and potable device using the same
EP3832841A1 (en) Charging circuit, electronic device, charging control method and device
CN111949107B (en) Method and device for controlling electronic equipment comprising USB Type-C interface and electronic equipment
CN210983385U (en) USBType-C interface module and electronic equipment
CN107329520B (en) USB interface connection method, device and system of mobile terminal
CN107681727B (en) Control method and device of electronic equipment
CN107124012B (en) Charging method, device, charger, terminal and system
CN111433756B (en) Terminal and Type C interface anti-corrosion method
CN111026684B (en) Interface control method, interface control device and storage medium
CN109586125B (en) Type-C adapter, terminal and electronic equipment
CN113572210A (en) Charging method, device, equipment and storage medium
CN113114188B (en) USB (Universal Serial bus) plug-in triggering starting circuit and electronic equipment
CN112019681B (en) Control method of mobile terminal, mobile terminal and storage medium
CN106329256B (en) USB connecting line, operation method based on USB connecting line and mobile terminal
CN106997326B (en) Control method and device of intelligent socket and computer readable storage medium
KR101595390B1 (en) Mobile terminal and control method thereof
CN116799885A (en) Charging method, terminal equipment and device

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