CN114844180A - Charging method, device and equipment applied to electronic equipment and storage medium - Google Patents

Charging method, device and equipment applied to electronic equipment and storage medium Download PDF

Info

Publication number
CN114844180A
CN114844180A CN202210764816.6A CN202210764816A CN114844180A CN 114844180 A CN114844180 A CN 114844180A CN 202210764816 A CN202210764816 A CN 202210764816A CN 114844180 A CN114844180 A CN 114844180A
Authority
CN
China
Prior art keywords
protocol
charging
matched
electronic device
fast charging
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210764816.6A
Other languages
Chinese (zh)
Other versions
CN114844180B (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.)
Longcheer Electronics Huizhou Co Ltd
Original Assignee
Longcheer Electronics Huizhou 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 Longcheer Electronics Huizhou Co Ltd filed Critical Longcheer Electronics Huizhou Co Ltd
Priority to CN202210764816.6A priority Critical patent/CN114844180B/en
Publication of CN114844180A publication Critical patent/CN114844180A/en
Application granted granted Critical
Publication of CN114844180B publication Critical patent/CN114844180B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/00032Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries characterised by data exchange
    • H02J7/00045Authentication, i.e. circuits for checking compatibility between one component, e.g. a battery or a battery charger, and another component, e.g. a power source
    • HELECTRICITY
    • H01ELECTRIC ELEMENTS
    • H01MPROCESSES OR MEANS, e.g. BATTERIES, FOR THE DIRECT CONVERSION OF CHEMICAL ENERGY INTO ELECTRICAL ENERGY
    • H01M10/00Secondary cells; Manufacture thereof
    • H01M10/42Methods or arrangements for servicing or maintenance of secondary cells or secondary half-cells
    • H01M10/44Methods for charging or discharging
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/00047Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries with provisions for charging different types of batteries
    • 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
    • Y02EREDUCTION OF GREENHOUSE GAS [GHG] EMISSIONS, RELATED TO ENERGY GENERATION, TRANSMISSION OR DISTRIBUTION
    • Y02E60/00Enabling technologies; Technologies with a potential or indirect contribution to GHG emissions mitigation
    • Y02E60/10Energy storage using batteries

Landscapes

  • Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Manufacturing & Machinery (AREA)
  • Chemical & Material Sciences (AREA)
  • Chemical Kinetics & Catalysis (AREA)
  • Electrochemistry (AREA)
  • General Chemical & Material Sciences (AREA)
  • Charge And Discharge Circuits For Batteries Or The Like (AREA)

Abstract

The application provides a charging method, a charging device, equipment and a storage medium applied to electronic equipment, wherein the method is applied to a central processing unit in first electronic equipment, and the method comprises the following steps: responding to a trigger instruction, and acquiring a first identification result of a first protocol chip; according to the first identification result, at least one fast charging protocol to be matched is determined from a plurality of second fast charging protocols supported by the second protocol chip; determining a second identification result of the second protocol chip according to the power level of at least one fast charging protocol to be matched; and controlling the second electronic equipment to charge the first electronic equipment according to the second identification result. The second protocol chip in this embodiment supports multiple second fast charging protocols, and by means of high-low line matching based on the power of the fast charging protocol to be matched, the protocol with the highest power in the protocols supported by both the first electronic device and the second electronic device can be preferentially matched, so that the charging speed of the first electronic device is increased.

Description

Charging method, device and equipment applied to electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of electronic technologies, and in particular, to a charging method, a charging device, and a storage medium for an electronic device.
Background
At present, manufacturers of electronic devices develop respective fast charging protocols in order to meet requirements of users on charging time of the electronic devices, so that the electronic devices can only be charged by using the fast charging protocols supported by hardware of the electronic devices.
For example, when a user desires to quickly charge an electronic device, the user must use a charger consistent with the quick-charge protocol supported by the electronic device to charge the electronic device. When a user uses the charger supporting the other fast charging protocols to connect with the electronic equipment, at the moment, the electronic equipment can only adopt a common charging mode to charge, and the charging time is long.
In order to avoid the problem that the electronic device is limited by a single fast charging protocol, which results in long charging time, it is urgently needed to provide a charging method to improve the charging use experience of the user on the electronic device.
Disclosure of Invention
The application provides a charging method, a charging device, equipment and a storage medium applied to electronic equipment, which are used for solving the problem that the electronic equipment is limited by a single quick charging protocol in the related art to cause longer charging time.
In a first aspect, the present application provides a charging method applied to an electronic device, where the method is applied to a central processing unit of a first electronic device, where the first electronic device includes the central processing unit, a first protocol chip, and at least one second protocol chip, and the method includes:
responding to a trigger instruction, and acquiring a first identification result of the first protocol chip; the trigger instruction is used for indicating to charge the first electronic device, the first protocol chip supports a first fast charging protocol, and the first identification result represents whether a second electronic device connected with the first electronic device supports the first fast charging protocol;
according to the first identification result, at least one fast charging protocol to be matched is determined from a plurality of second fast charging protocols supported by the second protocol chip; the first fast charge protocol is different from each of the second fast charge protocols;
determining a second identification result of the second protocol chip according to the power of the at least one fast charging protocol to be matched; wherein the second identification result represents whether the second electronic device supports a protocol of the at least one fast charging protocol to be matched;
and controlling the second electronic equipment to charge the first electronic equipment according to the second identification result.
In some embodiments, the determining, according to the first recognition result, at least one fast charging protocol to be matched from a plurality of second fast charging protocols supported by the second protocol chip includes:
and if the charging port of the second electronic device is determined to be a special charging port, determining at least one fast charging protocol to be matched from a plurality of second fast charging protocols supported by the second protocol chip according to the first identification result.
In some embodiments, if it is determined that the charging port of the second electronic device is a dedicated charging port, determining, according to the first identification result, at least one fast charging protocol to be matched from a plurality of second fast charging protocols supported by the second protocol chip, includes:
if the charging port of the second electronic device is determined to be a dedicated charging port and the first identification result indicates that the second electronic device supports the first fast charging protocol, determining a second fast charging protocol with power larger than that of the first fast charging protocol as a fast charging protocol to be matched in the plurality of second fast charging protocols;
and if the charging port of the second electronic equipment is determined to be a special charging port and the second electronic equipment is determined not to support the first quick charging protocol, determining the plurality of second quick charging protocols to be matched.
In some embodiments, the method further comprises:
and if the charging port of the second electronic equipment is determined not to be the special charging port, controlling the second electronic equipment to charge the first electronic equipment according to the first identification result.
In some embodiments, the determining a second identification result of the second protocol chip according to the power level of the at least one fast charging protocol to be matched includes:
repeatedly executing the following steps until a preset stop condition is reached: determining a current quick charging protocol to be matched in the quick charging protocols to be matched according to the sequence of the power of the at least one quick charging protocol to be matched from high to low; controlling the second protocol chip to operate based on the current fast charging protocol to be matched, and receiving a third identification result sent by the second protocol chip, wherein the third identification result is used for representing whether the second electronic device is the current fast charging protocol to be matched; the preset stop condition is that any one of the quick charging protocol to be matched is matched and ended or the second electronic equipment supports the quick charging protocol to be matched;
determining a second recognition result of the second protocol chip based on at least one third recognition result.
In some embodiments, the controlling the second electronic device to charge the first electronic device according to the second recognition result includes:
if the second identification result of the second protocol chip represents that the second electronic device supports a protocol in the at least one to-be-matched fast charging protocol, taking the current to-be-matched fast charging protocol supported by the second electronic device and represented by the third identification result as a protocol result, wherein the protocol result is used for indicating a protocol used when the first electronic device is charged;
if the second identification result of the second protocol chip represents that the second electronic device does not support the protocol in the at least one fast charging protocol to be matched, determining the protocol result based on the first identification result;
and determining the charging information of a main charging chip and the charging information of an auxiliary charging chip in the first electronic equipment based on the charging voltage and the charging current corresponding to the protocol result, and controlling the second electronic equipment to charge the first electronic equipment.
In some embodiments, if the second identification result of the second protocol chip indicates that the second electronic device does not support a protocol in the at least one fast charging protocol to be matched, determining the protocol result based on the first identification result includes:
if the second identification result of the second protocol chip represents that the second electronic device does not support the protocol in the at least one fast charging protocol to be matched, and the first identification result indicates that the first electronic device does not support the first fast charging protocol, a common charging protocol is used as the protocol result;
and if the second identification result of the second protocol chip represents that the second electronic device does not support the protocol in the at least one fast charging protocol to be matched, and the first identification result indicates that the first electronic device supports the first fast charging protocol, the first fast charging protocol is used as the protocol result.
In some embodiments, the number of the second protocol chips is one; the second protocol chip comprises two firmware storage areas; the two firmware storage areas are used for respectively storing the first two second quick charging protocols with the maximum charging power values in the plurality of second quick charging protocols.
In some embodiments, after the controlling the second protocol chip to operate based on the current fast charging protocol to be matched, the method further includes:
if it is determined that a next-to-be-matched rapid charging protocol of the current rapid charging protocol to be matched is not stored in the two firmware storage areas in the second protocol chip, writing the next-to-be-matched rapid charging protocol of the current rapid charging protocol to be matched into a first firmware storage area in the second protocol chip, wherein the first firmware storage area is a firmware storage area which is not used for storing the current rapid charging protocol to be matched in the two firmware storage areas.
In a second aspect, the present application provides a charging apparatus applied to an electronic device, where the apparatus is applied to a central processing unit of a first electronic device, the first electronic device includes the central processing unit, a first protocol chip, and at least one second protocol chip, and the apparatus includes:
the acquisition unit is used for responding to a trigger instruction and acquiring a first identification result of the first protocol chip; the trigger instruction is used for indicating to charge the first electronic device, the first protocol chip supports a first fast charging protocol, and the first identification result represents whether a second electronic device connected with the first electronic device supports the first fast charging protocol;
a first determining unit, configured to determine, according to the first identification result, at least one fast charging protocol to be matched from multiple second fast charging protocols supported by the second protocol chip; the first fast charge protocol is different from each of the second fast charge protocols;
the second determining unit is used for determining a second identification result of the second protocol chip according to the power level of the at least one fast charging protocol to be matched; wherein the second identification result characterizes whether the second electronic device supports a protocol of the at least one fast charging protocol to be matched;
and the control unit is used for controlling the second electronic equipment to charge the first electronic equipment according to the second identification result.
In some embodiments, the first determining unit is specifically configured to:
and if the charging port of the second electronic device is determined to be a special charging port, determining at least one fast charging protocol to be matched from a plurality of second fast charging protocols supported by the second protocol chip according to the first identification result.
In some embodiments, the first determining unit is specifically configured to:
if the charging port of the second electronic device is determined to be a dedicated charging port and the first identification result indicates that the second electronic device supports the first fast charging protocol, determining a second fast charging protocol with power larger than that of the first fast charging protocol as a fast charging protocol to be matched in the plurality of second fast charging protocols;
and if the charging port of the second electronic equipment is determined to be a special charging port and the second electronic equipment is determined not to support the first quick charging protocol, determining the plurality of second quick charging protocols to be matched.
In some embodiments, the apparatus further comprises:
and a third determining unit, configured to, if it is determined that the charging port of the second electronic device is not the dedicated charging port, control the second electronic device to charge the first electronic device according to the first identification result.
In some embodiments, the second determining unit includes:
repeating the first determining module, the control module and the receiving module until a preset stop condition is reached:
the first determining module is used for determining the current quick charging protocol to be matched in the quick charging protocols to be matched according to the sequence of the power of the at least one quick charging protocol to be matched from high to low;
the control module is used for controlling the second protocol chip to operate based on the current quick charging protocol to be matched;
the receiving module is configured to receive a third identification result sent by the second protocol chip, where the third identification result is used to characterize whether the second electronic device is the current fast charging protocol to be matched; the preset stop condition is that any one of the quick charging protocol to be matched is matched and ended or the second electronic equipment supports the quick charging protocol to be matched;
a second determining module, configured to determine a second recognition result of the second protocol chip based on at least one third recognition result.
In some embodiments, the control unit comprises:
a third determining module, configured to, if a second identification result of the second protocol chip indicates that the second electronic device supports a protocol in the at least one to-be-matched fast charging protocol, take a current to-be-matched fast charging protocol supported by the second electronic device and represented by the third identification result as a protocol result, where the protocol result is used to indicate a protocol used when the first electronic device is charged;
a fourth determining module, configured to determine a protocol result based on the first identification result if the second identification result of the second protocol chip indicates that the second electronic device does not support a protocol in the at least one to-be-matched fast charging protocol;
and the fifth determining module is used for determining the charging information of the main charging chip and the charging information of the auxiliary charging chip in the first electronic equipment based on the charging voltage and the charging current corresponding to the protocol result, and controlling the second electronic equipment to charge the first electronic equipment.
In some embodiments, the fourth determining module is specifically configured to:
if the second identification result of the second protocol chip represents that the second electronic device does not support the protocol in the at least one fast charging protocol to be matched, and the first identification result indicates that the first electronic device does not support the first fast charging protocol, a common charging protocol is used as the protocol result;
and if the second identification result of the second protocol chip represents that the second electronic device does not support the protocol in the at least one fast charging protocol to be matched, and the first identification result indicates that the first electronic device supports the first fast charging protocol, the first fast charging protocol is used as the protocol result.
In some embodiments, the number of the second protocol chips is one; the second protocol chip comprises two firmware storage areas; the two firmware storage areas are used for respectively storing the first two second quick charging protocols with the maximum charging power values in the plurality of second quick charging protocols.
In some embodiments, the apparatus further comprises:
and the writing module is used for writing the fast charging protocol to be matched after the current fast charging protocol to be matched into a first firmware storage area in the second protocol chip if the control module controls the second protocol chip to operate based on the current fast charging protocol to be matched and the control module determines that the fast charging protocol to be matched after the current fast charging protocol to be matched is not stored in the two firmware storage areas in the second protocol chip, wherein the first firmware storage area is the firmware storage area which is not used for storing the fast charging protocol to be matched in the two firmware storage areas.
In a third aspect, the present application provides an electronic device, comprising: a memory, a processor;
a memory; a memory for storing the processor-executable instructions;
wherein the processor is configured to perform the method according to any one of the first aspect according to the executable instructions.
In a fourth aspect, the present application provides a computer-readable storage medium having stored thereon computer-executable instructions for implementing the method according to any one of the first aspect when executed by a processor.
In a fifth aspect, the present application provides a computer program product comprising a computer program that, when executed by a processor, implements the method of any of the first aspects.
The application provides a charging method, a charging device, equipment and a storage medium applied to electronic equipment, wherein the method is applied to a central processing unit in first electronic equipment, and the method comprises the following steps: responding to a trigger instruction, and acquiring a first identification result of the first protocol chip; the trigger instruction is used for indicating to charge the first electronic device, the first protocol chip supports a first fast charging protocol, and the first identification result represents whether a second electronic device connected with the first electronic device supports the first fast charging protocol; according to the first identification result, at least one fast charging protocol to be matched is determined from a plurality of second fast charging protocols supported by the second protocol chip; the first fast charge protocol is different from each of the second fast charge protocols; determining a second identification result of the second protocol chip according to the power of the at least one fast charging protocol to be matched; wherein the second identification result characterizes whether the second electronic device supports a protocol of the at least one fast charging protocol to be matched; and controlling the second electronic equipment to charge the first electronic equipment according to the second identification result. In this embodiment, the second protocol chip in the first electronic device supports a plurality of second fast charging protocols, so as to expand the number of charging protocols supported by the first electronic device. And when the protocol used for final charging is determined, matching is performed from high to low based on the power of the rapid charging protocol to be matched, so that the protocol with the highest power in the protocols supported by the first electronic device and the second electronic device can be matched preferentially, and the charging speed of the first electronic device is increased.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
Fig. 1 is a schematic view of an application scenario provided in the present application;
fig. 2 is a schematic flowchart of a charging method applied to an electronic device according to an embodiment of the present disclosure;
fig. 3 is a schematic flowchart of another charging method applied to an electronic device according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a first electronic device according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of a charging device applied to an electronic device according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of another charging device applied to an electronic device according to an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of an electronic device provided in an embodiment of the present application.
With the above figures, there are shown specific embodiments of the present application, which will be described in more detail below. These drawings and written description are not intended to limit the scope of the inventive concepts in any manner, but rather to illustrate the inventive concepts 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. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application.
Currently, in order to enable electronic devices to realize fast charging, manufacturers generally configure their own dedicated fast charging protocols in the electronic devices. In practical applications, when a user desires to perform fast charging on an electronic device, at this time, the electronic device and another power supply device (e.g., a charger) are required to support the same fast charging protocol, at this time, power can be supplied to the electronic device through the another power supply device, so that the electronic device can be fast charged. As shown in fig. 1, fig. 1 is a schematic view of an application scenario provided by the present application. The electronic device 1 and the electronic device 2 are included in the figure, and the electronic device 1 and the electronic device 2 can be connected together through a transmission line, so that one of the two electronic devices can be charged to the other electronic device.
However, in the above usage scenario, when the user cannot obtain another power supply device matched with the fast charging protocol of the electronic device, at this time, the electronic device can only charge in a normal charging manner, which further causes the charging speed of the electronic device to be slow, and affects the usage experience of the user.
The application provides a charging method, a charging device, an electronic device and a storage medium, which are applied to electronic equipment and used for solving the technical problems.
The charging method, the charging device, the charging equipment and the storage medium applied to the electronic equipment are applied to a central processing unit in first electronic equipment, and in the method, a second protocol chip can support a plurality of second quick charging protocols. The central processing unit can determine the fast charging protocol to be matched from the plurality of fast charging protocols supported by the second protocol chip through the first identification result of the first protocol chip. Then, in the to-be-matched fast charging protocol, based on the power level of the to-be-matched fast charging protocol, the to-be-matched fast charging protocol may be sequentially identified, so as to determine the charging protocol that can be supported by the second electronic device.
The following describes the technical solutions of the present application and how to solve the above technical problems with specific embodiments. 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. Embodiments of the present application will be described below with reference to the accompanying drawings.
Fig. 2 is a schematic flowchart of a charging method applied to an electronic device according to an embodiment of the present disclosure, and as shown in fig. 2, the method includes the following steps:
s201, responding to a trigger instruction, and acquiring a first identification result of a first protocol chip; the trigger instruction is used for indicating to charge the first electronic device, the first protocol chip supports the first fast charging protocol, and the first identification result represents whether the second electronic device connected with the first electronic device supports the first fast charging protocol.
For example, the method provided in this embodiment is applied to a central processing unit of a first electronic device, where the first electronic device includes the central processing unit, a first protocol chip, and at least one second protocol chip, and the second protocol chip in this embodiment may support a plurality of second fast charging protocols, the first protocol chip supports a first fast charging protocol, and the first fast charging protocol is different from each of the second fast charging protocols.
When the central processing unit in the first electronic device determines that the second electronic device is to charge the first electronic device based on the trigger instruction, the central processing unit may receive a first identification result determined by the first protocol chip in the first electronic device, where the first identification result may be used to indicate whether the second electronic device charging the first electronic device supports the first fast charging protocol supported by the first protocol chip.
In an example, the first protocol chip may be configured to detect whether a second electronic device for charging the first electronic device is inserted into a charging port of the first electronic device, and when it is determined that the second electronic device exists, the first protocol chip may send a trigger instruction to the central processing unit, so that the central processing unit receives a first identification result of the first protocol chip.
In one example, the central processor may detect whether a second electronic device for charging the first electronic device is plugged into a charging port of the first electronic device.
In an example, when the first protocol chip determines the first identification result, the first protocol chip may perform protocol identification with the second electronic device to determine the first identification result, where a protocol identification process may refer to a protocol identification technology in the related art, and details are not described here.
S202, determining at least one fast charging protocol to be matched from a plurality of second fast charging protocols supported by a second protocol chip according to the first identification result; the first fast charge protocol is different from each of the second fast charge protocols.
For example, in this embodiment, after the central processing unit obtains the first identification result, at least one fast charging protocol to be matched may be determined in a plurality of second fast charging protocols supported by the second protocol chip according to the first identification result.
In an example, when the central processing unit determines that the at least one fast charging protocol to be matched is determined, if it is determined that the second electronic device does not support the first fast charging protocol according to the first recognition result, the central processing unit may screen the at least one fast charging protocol to be matched from among the plurality of second fast charging protocols according to a usage frequency of the second fast charging protocol, so as to improve charging protocol determination efficiency of the first electronic device and the second electronic device.
S203, determining a second identification result of a second protocol chip according to the power of at least one fast charging protocol to be matched; and the second identification result represents whether the second electronic equipment supports at least one protocol in the fast charging protocol to be matched.
After the central processor determines at least one fast charging protocol to be matched, it may also be determined whether the second protocol chip supports a protocol of the at least one fast charging protocol to be matched based on the power level of the at least one fast charging protocol to be matched.
In one example, when the number of the fast charging protocols to be matched is one, at this time, it is directly determined whether the second electronic device supports the fast charging protocol to be matched, so as to obtain the second identification result.
In an example, when the number of the fast charging protocols to be matched is multiple, at this time, the matching order of the fast charging protocols to be matched may be determined based on the power level corresponding to each fast charging protocol to be matched. For example, the fast charging protocols to be matched may be sequentially ordered from high to low based on the power of each fast charging protocol to be matched, and whether each fast charging protocol to be matched is supported by the second electronic device may be sequentially determined.
And S204, controlling the second electronic equipment to charge the first electronic equipment according to the second identification result.
For example, after determining the second recognition result, the charging protocol used by the first electronic device for charging may be determined based on the second recognition result, and the second electronic device may be controlled to charge the first electronic device based on the determined charging protocol.
In an example, after the second identification result is determined, if the second identification result indicates whether the second electronic device supports at least one protocol of the to-be-matched fast charging protocols, at this time, a protocol with the highest power may be selected as a protocol used when the first electronic device is charged from the to-be-matched fast charging protocols supported by the second electronic device. If the second identification result indicates that the second electronic device does not support all the fast charging protocols to be matched, a common charging protocol can be adopted for charging.
In this embodiment, the second protocol chip in the first electronic device may support a plurality of second fast charging protocols, thereby widening the range of fast charging protocols supported by the first electronic device. Furthermore, when the charging protocol identification is carried out, at least one fast charging protocol to be matched can be determined initially from the plurality of second fast charging protocols. And when the protocol identification is carried out on the quick charging protocol to be matched, the protocol identification can be carried out in sequence according to the power of the quick charging protocol to be matched, so that when the second electronic equipment supports a plurality of quick charging protocols to be matched, the quick charging protocol to be matched with the highest power can be preferentially determined in the plurality of quick charging protocols to be matched, and the charging speed of the subsequent first electronic equipment is improved.
Fig. 3 is a schematic flowchart of another charging method applied to an electronic device according to an embodiment of the present disclosure, where as shown in fig. 3, the method includes the following steps:
s301, responding to a trigger instruction, and acquiring a first identification result of a first protocol chip; the trigger instruction is used for indicating to charge the first electronic device, the first protocol chip supports the first fast charging protocol, and the first identification result represents whether the second electronic device connected with the first electronic device supports the first fast charging protocol.
For example, the method provided in this embodiment is applied to a central processing unit of a first electronic device, where the first electronic device includes the central processing unit, a first protocol chip, and at least one second protocol chip, and the second protocol chip in this embodiment may support a plurality of second fast charging protocols, the first protocol chip supports a first fast charging protocol, and the first fast charging protocol is different from each of the second fast charging protocols.
This step can be referred to as step S201, and is not described herein again.
And S302, if the charging port of the second electronic device is determined to be the special charging port, determining at least one fast charging protocol to be matched from a plurality of second fast charging protocols supported by the second protocol chip according to the first identification result.
For example, in this embodiment, before the central processing unit determines the fast Charging protocol to be matched, it is further required to determine whether the Charging Port of the second electronic device is a Dedicated Charging Port (DCP).
In an example, when determining whether the charging port of the second electronic device is a dedicated charging port, the BC1.2 protocol may be identified, and specific principles herein may refer to principles in the related art, and are not described herein again.
It can be understood that, before determining the fast charging protocol to be matched, it is determined whether the charging port of the second electronic device is a dedicated charging port, and if the charging port is the dedicated charging port, it is characterized that the charging port can support the device to perform fast charging, and then the central processing unit continues to determine the fast charging protocol to be matched, thereby avoiding that when the charging port of the second electronic device is not the dedicated charging port, the central processing unit needs to perform the step of determining the fast charging protocol to be matched, which causes resource waste of the central processing unit.
In an example, when "determining at least one fast charging protocol to be matched from a plurality of second fast charging protocols supported by the second protocol chip according to the first recognition result" in step S302 is performed, at this time, the following steps may be performed:
if the first identification result indicates that the second electronic device supports the first quick charging protocol, determining a second quick charging protocol with power larger than that of the first quick charging protocol as a quick charging protocol to be matched in the plurality of second quick charging protocols; and if the second electronic equipment does not support the first quick charging protocol, determining the plurality of second quick charging protocols as the quick charging protocols to be matched.
For example, in this embodiment, when determining at least one fast charging protocol to be matched, at this time, the central processing unit may first determine a first identification result of the first protocol chip, and if the first identification result indicates that the second electronic device supports the first fast charging protocol, may obtain power of the first fast charging protocol, and select, as the fast charging protocol to be matched, a second fast charging protocol whose power is greater than the power of the first fast charging protocol, from among the plurality of second fast charging protocols. If the first identification result indicates that the second electronic device does not support the first fast charging protocol, all second fast charging protocols supported by the second protocol chip may be used as fast charging protocols to be matched.
It can be understood that, in this example, when the second electronic device supports the first fast charging protocol, the second electronic device may determine, based on the power of the first fast charging protocol, a second fast charging protocol with a power greater than that of the first fast charging protocol, and then, by the above method, for the second electronic device with a power less than that of the first fast charging protocol, matching is not required. And then the number of times of protocol identification can be reduced, so that the central processing unit can quickly obtain the charging protocol with the highest power supported by the second electronic equipment, and the charging speed is improved.
And S303, if the charging port of the second electronic device is determined not to be the special charging port, controlling the second electronic device to charge the first electronic device according to the first identification result.
For example, if the central processor determines that the charging port of the second electronic device is not the dedicated charging port, the first electronic device may be charged based on the first recognition result. For example, when the first identification result indicates that the second electronic device supports the first fast charging protocol, the second electronic device may be controlled to charge the first electronic device based on the charging current and the charging voltage indicated by the first fast charging protocol. If the first identification result indicates that the second electronic device does not support the first fast charging protocol, the central processing unit may control the second electronic device to charge the first electronic device based on the common charging protocol.
It can be understood that, when it is determined that the charging port of the second electronic device is not the dedicated charging port, the second electronic device may be controlled to charge the first electronic device directly based on the first identification result, so as to avoid the central processing unit from continuing the determination process of the fast charging protocol to be matched, and reduce the required time for determining the charging protocol.
S304, repeatedly executing the following steps until a preset stop condition is reached: determining a current quick charging protocol to be matched in the quick charging protocols to be matched according to the sequence of the power of at least one quick charging protocol to be matched from high to low; controlling the second protocol chip to operate based on the current fast charging protocol to be matched, and receiving a third identification result sent by the second protocol chip, wherein the third identification result is used for representing whether the second electronic device is the current fast charging protocol to be matched or not; the preset stopping condition is that any one of the matching of the rapid charging protocol to be matched is completed or the second electronic device supports the current rapid charging protocol to be matched.
Illustratively, after step S302, when the number of the determined fast charging protocols to be matched is plural after the fast charging protocol to be matched is determined, the following steps may be repeated: and the central processing unit determines the current quick charging protocol to be matched based on the sequence of the power of each quick charging protocol to be matched from high to low. After the fast charging protocol to be matched currently is determined, the central processing unit can control the second protocol chip to operate the fast charging protocol to be matched currently, after the second protocol chip operates the fast charging protocol to be matched currently, the second protocol chip can determine a third identification result used for representing whether the second electronic device supports the fast charging protocol to be matched currently, and if the second electronic device is determined to support the fast charging protocol to be matched currently, a repeated circulation step can be skipped; or when the fast charging protocol to be matched is the last fast charging protocol to be matched in the sequence from high power to low power, at this time, after the third recognition result is determined, the repeated circulation step can be skipped; however, when the third identification result indicates that the second electronic device does not support the current fast charging protocol to be matched and the current fast charging protocol to be matched is not the last fast charging protocol to be matched, at this time, the central processing unit continues to determine the current fast charging protocol to be matched in the multiple fast charging protocols to be matched based on the power level, that is, the above process is continuously repeated until the repeated loop step is skipped.
In an example, a second protocol chip may be disposed in the first electronic device, and a plurality of second fast charging protocols supported by the second protocol chip may be stored in the second protocol chip in advance, so as to avoid that the second protocol chip needs to spend time writing the fast charging protocol to be matched into the second protocol chip when determining the second identification result.
In one example, the number of second protocol chips is one; the second protocol chip comprises two firmware storage areas; the two firmware storage areas are used for respectively storing the first two second quick charging protocols with the maximum charging power values in the plurality of second quick charging protocols.
For example, in this embodiment, in order to avoid a problem that the second protocol chip stores more second fast charging protocols and occupies more memory, in this example, two firmware storage areas may be arranged in the second protocol chip, and the two firmware storage areas are used to respectively store the first two of the protocols with the highest power in the plurality of second fast charging protocols. The other second fast charging protocols can be written into the central processing unit, and when the protocol identification needs to be carried out on the second fast charging protocol in the central processing unit, the central processing unit can write the second fast charging protocol in the central processing unit into the second protocol chip so that the second protocol chip can carry out the protocol identification.
In addition, the plurality of second fast charging protocols stored in the central processing unit can update the charging protocol along with the updating of the first electronic device, so that the second protocol chip can support the plurality of second fast charging protocols
It can be understood that, by storing the two second fast charging protocols, the memory space occupied in the second protocol chip can be reduced, and the two stored fast charging protocols are the first two of the protocols with the highest power in the plurality of second fast charging protocols, so that it can be preferentially determined whether the second electronic device supports the protocol with the highest power written in the second protocol chip.
In one example, the number of second protocol chips is one; the second protocol chip comprises two firmware storage areas; the two firmware storage areas are used for respectively storing the first two second quick charging protocols with the maximum charging power values in the plurality of second quick charging protocols; after controlling the second protocol chip to operate based on the fast charging protocol to be matched currently, the method further includes:
if it is determined that the next to-be-matched fast charging protocol of the current to-be-matched fast charging protocol is not stored in the two firmware storage areas in the second protocol chip, writing the next to-be-matched fast charging protocol of the current to-be-matched fast charging protocol into a first firmware storage area in the second protocol chip, wherein the first firmware storage area is a firmware storage area which is not used for storing the current to-be-matched fast charging protocol in the two firmware storage areas.
Illustratively, the second protocol chip includes a firmware storage area 1 and a firmware storage area 2, the firmware storage area 1 stores the fast charging protocol 1 to be matched, the firmware storage area 2 stores the fast charging protocol 2 to be matched, after performing protocol identification on the fast charging protocol 1 to be matched in the firmware storage area 1, it is determined that the second electronic device does not support the fast charging protocol 1 to be matched, the central processor controls the second protocol chip to run the fast charging protocol 2 to be matched, and since the central processor determines that the latter protocol of the fast charging protocol 2 to be matched (the fast charging protocol 3 to be matched) is not stored in the firmware storage area 1 and the firmware storage area 2, the fast charging protocol 3 to be matched can be stored in the firmware storage area 1 (i.e., the firmware storage area of the two firmware storage areas where the protocol currently running by the second protocol chip is not stored), the latter protocol of the fast charging protocol 2 to be matched is determined based on the sequence of the power of each fast charging protocol to be matched from high to low.
It can be understood that, in this embodiment, when the second protocol chip is controlled to run the current fast charging protocol to be matched, the fast charging protocol to be matched later than the current fast charging protocol to be matched may be written into the firmware storage area where the second protocol chip does not store the current fast charging protocol to be matched, and then the second protocol chip may be conveniently subjected to protocol replacement by setting two firmware partitions, so that time consumed for protocol replacement is saved, and the problem that when only one firmware storage area is included in the second protocol chip, the time consumed for replacing the protocol in the firmware storage area is long, which results in long charging time is also avoided.
In one example, in order to ensure that the protocols stored in the two firmware storage areas in the second protocol chip are the first two second fast charging protocols with the maximum charging power value in the plurality of second fast charging protocols, after the charging of the first electronic device is finished, the first two second fast charging protocols with the maximum charging power value in the plurality of second fast charging protocols are also written into the two firmware storage areas again.
S305, determining a second identification result of the second protocol chip based on at least one third identification result.
For example, after jumping out of the loop step in step S304, the central processor may determine the second recognition result of the second protocol chip based on the received third recognition result.
For example, if the central processing unit determines that the last third identification result received when the loop is skipped indicates that the second electronic device supports the current fast charging protocol to be matched, the second identification result of the second protocol chip is used to indicate that the second electronic device supports at least one protocol of the fast charging protocols to be matched, and the second electronic device supports the current fast charging protocol to be matched indicated in the last third identification result; and if the central processing unit determines that the last third identification result received when the loop is jumped out represents that the second electronic equipment does not support the current rapid charging protocol to be matched, the second identification result of the second protocol chip is used for representing that the second electronic equipment does not support the protocol in at least one rapid charging protocol to be matched.
It can be understood that, in this example, when the second protocol chip determines the second identification result, the central processing unit may switch between the to-be-matched fast charging protocols by controlling the protocol running in the second protocol chip, so as to ensure that the second protocol chip determines whether the second electronic device supports the to-be-matched fast charging protocol by running the to-be-matched fast charging protocol.
S306, if the second identification result of the second protocol chip indicates that the second electronic device supports at least one protocol in the to-be-matched fast charging protocol, taking the current to-be-matched fast charging protocol supported by the second electronic device and represented by the third identification result as a protocol result, wherein the protocol result is used for indicating the protocol used when the first electronic device is charged.
For example, in this embodiment, after the central processing unit obtains the second identification result of the second protocol chip, if the second protocol chip represents that the second electronic device supports a protocol in at least one to-be-matched fast charging protocol, at this time, the current to-be-matched fast charging protocol indicated in the third identification result obtained when the step S304 is skipped may be used as a protocol used when the first electronic device is charged this time, that is, the to-be-matched fast charging protocol indicated in the third identification is used as a protocol result.
S307, if the second identification result of the second protocol chip represents that the second electronic device does not support the protocol in the at least one fast charging protocol to be matched, determining a protocol result based on the first identification result.
For example, in this embodiment, after the central processing unit obtains the second identification result of the second protocol chip, if the second protocol chip indicates that the second electronic device does not support all protocols in the at least one fast charging protocol to be matched, at this time, the protocol result adopted when the first electronic device is charged this time may be determined based on the first identification result obtained by the central processing unit before.
In one example, step S307 includes the steps of:
if the second identification result of the second protocol chip represents that the second electronic equipment does not support the protocol in at least one fast charging protocol to be matched, and the first identification result indicates that the first electronic equipment does not support the first fast charging protocol, the common charging protocol is used as a protocol result;
and if the second identification result of the second protocol chip represents that the second electronic equipment does not support the protocol in at least one fast charging protocol to be matched, and the first identification result indicates that the first electronic equipment supports the first fast charging protocol, the first fast charging protocol is used as a protocol result.
For example, when the central processing unit determines that the second identification result of the second protocol chip indicates that the second electronic device does not support the protocol in the at least one fast charging protocol to be matched, the central processing unit may determine, based on the first identification result, the charging protocol used by the first electronic device for charging this time. At this time, if the first identification result indicates that the second electronic device supports the first fast charging protocol supported by the first protocol chip, the first fast charging protocol may be used as a charging protocol for the first electronic device to be charged at this time. In addition, if the first identification result indicates that the second electronic device does not support the first fast charging protocol, the first electronic device can only select the common charging protocol as the protocol result.
It can be understood that, in this example, when the second electronic device does not support all the fast charging protocols to be matched, the first fast charging protocol with a charging speed faster than that of the normal charging protocol may be preferentially selected, so as to increase the charging speed of the first electronic device, and if the second electronic device does not support the first fast charging protocol, the first electronic device may be charged based on the normal charging protocol, so that it is ensured that the second electronic device can charge the first electronic device.
And S308, determining the charging information of the main charging chip and the charging information of the auxiliary charging chip in the first electronic equipment based on the charging voltage and the charging current corresponding to the protocol result, and controlling the second electronic equipment to charge the first electronic equipment.
For example, in the present embodiment, a main charging chip and an auxiliary charging chip may be provided in the first electronic device. The main charging chip can adjust a charging signal transmitted from the second electronic device to the first electronic device, and then the adjusted signal is used as the charging signal of the first electronic device to charge the first electronic device. In addition, when the power of the protocol used by the first electronic device for charging is greater than the maximum power that can be supported by the main charging chip, the auxiliary charging chip can be turned on, the auxiliary charging chip and the main charging chip jointly adjust the charging signal input into the first electronic device by the second electronic device, and the signals adjusted by the two charging chips are used as the charging signal of the first electronic device, so that the process of charging the first electronic device by the second electronic device is completed.
Therefore, after determining the protocol result, the central processing unit may determine, based on the charging current and the charging voltage set in the protocol indicated by the protocol result, current charging information of the main charging chip and current charging information of the auxiliary charging chip in the first electronic device, where the charging information of the main charging chip is used to indicate a current value and a voltage value allowed to pass through the main charging chip in the current charging process of the first electronic device, and the charging information of the auxiliary charging chip is used to indicate a current value and a voltage value allowed to pass through the auxiliary charging chip in the current charging process of the first electronic device. When the current value and the voltage value in the charging information of the auxiliary charging chip are both 0, the auxiliary charging chip can be used for representing the charging process, and when the power of the protocol used by the first electronic device for charging is smaller than the maximum power which can be supported by the main charging chip, the process of charging the first electronic device is realized by only using the main charging chip.
It can be understood that, in this embodiment, the main charging chip and the auxiliary charging chip may be disposed in the first electronic device, so as to avoid a phenomenon that the main charging chip is burned out when the maximum power supported by the main charging chip is less than the power of the protocol used by the first electronic device this time.
In this embodiment, before determining the fast charging protocol to be matched, it is determined whether the charging port of the second electronic device is a dedicated charging port, and if the charging port is the dedicated charging port, the central processing unit continues to determine the fast charging protocol to be matched, thereby avoiding resource waste of the central processing unit due to the fact that the central processing unit needs to perform the step of determining the fast charging protocol to be matched when the charging port of the second electronic device is not the dedicated charging port. In addition, when the second electronic device supports the first fast charging protocol, the second fast charging protocol with the power larger than that of the first fast charging protocol may be determined in the second electronic device based on the power of the first fast charging protocol, and further, by the above method, matching is not required for the second electronic device with the power smaller than that of the first fast charging protocol. And then the number of times of protocol identification can be reduced, so that the central processing unit can quickly obtain the charging protocol with the highest power supported by the second electronic equipment, and the charging speed is improved.
In some embodiments, the first electronic device may further be configured to charge a third electronic device connected to the first electronic device, and when the first electronic device needs to charge the third electronic device, at this time, the central processing unit in the first electronic device may control the magnitude of the charging signal output by the first electronic device this time based on a charging protocol used by the third electronic device for charging this time, which is determined by the third electronic device, so as to implement a process that the first electronic device charges the third electronic device, specifically, the central processing unit may control the charging signal provided by the first electronic device to the third electronic device by controlling the magnitude of the charging signal output by the battery through the main charging chip.
Fig. 4 is a schematic structural diagram of a first electronic device according to an embodiment of the present application. As shown in fig. 4, the first electronic device includes a first protocol chip, a second protocol chip, a main charging chip, an auxiliary charging chip, a battery, a central processing unit, and a charging interface.
The first protocol chip is connected to a Configuration Channel (CC) port of the charging interface, and may be configured to identify whether a second electronic device inserted into the charging interface supports a first fast charging protocol supported by the first protocol chip, where in practical application, the first fast charging protocol may be a pd (power delivery) fast charging protocol. The first protocol chip is connected with the central processing unit, so that the first protocol chip can send the first identification result to the central processing unit, and the first protocol chip and the central processing unit can realize communication by adopting an I2C bus (Inter-Integrated Circuit).
The second protocol chip may be connected to a USB Data Positive signal line (USB DP for short) and a USB Data negative signal line (USB DM for short) of the charging interface, and the second protocol chip is connected to the central processing unit, so that the second protocol chip may send the second identification result to the central processing unit, and the central processing unit writes the fast charging protocol to be matched into the second protocol chip. In practical application, two data lines may be arranged between the second protocol chip and the central processing unit, that is, one data line is used for the second protocol chip to send the second recognition result to the central processing unit, and the other data line is used for the central processing unit to write the fast charging protocol to be matched into the second protocol chip. It should be noted that, the number of the data lines between the second protocol chip and the central processing unit is only an example and is not specifically limited, and the communication protocol between the second protocol chip and the central processing unit is also not specifically limited.
In addition, the charging interface is also connected with the main charging chip and the auxiliary charging chip. The central processing unit is also connected with the main charging chip and the auxiliary charging chip. The main charging chip and the auxiliary charging chip are respectively connected with the battery. The central processing unit controls respective charging information of the main charging chip and the auxiliary charging chip connected to the central processing unit through the determined charging current and charging voltage corresponding to the protocol used by the first electronic device for charging this time, and the specific process here may refer to the above embodiments and is not described here again.
Fig. 5 is a schematic structural diagram of a charging apparatus applied to an electronic device according to an embodiment of the present disclosure, where the apparatus is applied to a central processing unit of a first electronic device, the first electronic device includes the central processing unit, a first protocol chip, and at least one second protocol chip, and as shown in fig. 5, the apparatus includes:
an obtaining unit 501, configured to obtain a first identification result of a first protocol chip in response to a trigger instruction; the trigger instruction is used for indicating to charge the first electronic device, the first protocol chip supports the first fast charging protocol, and the first identification result represents whether the second electronic device connected with the first electronic device supports the first fast charging protocol.
A first determining unit 502, configured to determine, according to the first identification result, at least one fast charging protocol to be matched from a plurality of second fast charging protocols supported by the second protocol chip; the first fast charge protocol is different from each of the second fast charge protocols.
A second determining unit 503, configured to determine a second identification result of the second protocol chip according to the power level of the at least one fast charging protocol to be matched; and the second identification result represents whether the second electronic equipment supports at least one protocol in the fast charging protocol to be matched.
The control unit 504 is configured to control the second electronic device to charge the first electronic device according to the second identification result.
The apparatus provided in this embodiment is used to implement the technical solution provided by the above method, and the implementation principle and the technical effect are similar and will not be described again.
Fig. 6 is a schematic structural diagram of another charging apparatus applied to an electronic device according to an embodiment of the present application, and based on the structure of the apparatus shown in fig. 5, a first determining unit 502 is specifically configured to:
and if the charging port of the second electronic equipment is determined to be the special charging port, determining at least one fast charging protocol to be matched from a plurality of second fast charging protocols supported by the second protocol chip according to the first identification result.
In some embodiments, the first determining unit 502 is specifically configured to:
and if the charging port of the second electronic equipment is determined to be the special charging port and the first identification result indicates that the second electronic equipment supports the first quick charging protocol, determining a second quick charging protocol with the power larger than that of the first quick charging protocol as the quick charging protocol to be matched in the plurality of second quick charging protocols.
And if the charging port of the second electronic equipment is determined to be the special charging port and the second electronic equipment is determined not to support the first quick charging protocol, determining a plurality of second quick charging protocols to be the quick charging protocols to be matched.
In some embodiments, the apparatus further comprises:
a third determining unit 505, configured to, if it is determined that the charging port of the second electronic device is not the dedicated charging port, control the second electronic device to charge the first electronic device according to the first identification result.
In some embodiments, the second determining unit 503 includes:
the first determining module 5031, the control module 5032 and the receiving module 5033 are repeated until a preset stop condition is reached:
a first determining module 5031, configured to determine, according to an order from high to low of power of at least one fast charging protocol to be matched, a fast charging protocol to be currently matched among the fast charging protocols to be matched;
a control module 5032, configured to control the second protocol chip to operate based on a current fast charging protocol to be matched;
a receiving module 5033, configured to receive a third identification result sent by the second protocol chip, where the third identification result is used to characterize whether the second electronic device is a fast charging protocol to be currently matched; the preset stop condition is that any one of the quick charging protocol to be matched is matched and ended or the second electronic device supports the quick charging protocol to be matched.
A second determining module 5034, configured to determine a second recognition result of the second protocol chip based on the at least one third recognition result.
In some embodiments, the control unit 504 includes:
a third determining module 5041, configured to, if the second identification result of the second protocol chip indicates that the second electronic device supports a protocol in at least one to-be-matched fast charging protocol, take a current to-be-matched fast charging protocol supported by the second electronic device and represented by the third identification result as a protocol result, where the protocol result is used to indicate a protocol used when the first electronic device is charged.
A fourth determining module 5042, configured to determine a protocol result based on the first identification result if the second identification result of the second protocol chip indicates that the second electronic device does not support a protocol in the at least one fast charging protocol to be matched.
A fifth determining module 5043, configured to determine, based on the charging voltage and the charging current corresponding to the protocol result, charging information of the main charging chip and charging information of the auxiliary charging chip in the first electronic device, and control the second electronic device to charge the first electronic device.
In some embodiments, the fourth determining module 5042 is specifically configured to:
and if the second identification result of the second protocol chip represents that the second electronic equipment does not support the protocol in at least one fast charging protocol to be matched, and the first identification result indicates that the first electronic equipment does not support the first fast charging protocol, the common charging protocol is used as a protocol result.
And if the second identification result of the second protocol chip represents that the second electronic equipment does not support the protocol in at least one fast charging protocol to be matched, and the first identification result indicates that the first electronic equipment supports the first fast charging protocol, the first fast charging protocol is used as a protocol result.
In some embodiments, the number of second protocol chips is one; the second protocol chip comprises two firmware storage areas; the two firmware storage areas are used for respectively storing the first two second quick charging protocols with the maximum charging power values in the plurality of second quick charging protocols.
In some embodiments, the apparatus further comprises:
a writing module 5035, configured to, after the control module 5032 controls the second protocol chip to operate based on the current fast charging protocol to be matched, if it is determined that a next fast charging protocol to be matched of the current fast charging protocol to be matched is not stored in two firmware storage areas in the second protocol chip, write the next fast charging protocol to be matched of the current fast charging protocol to be matched into a first firmware storage area in the second protocol chip, where the first firmware storage area is a firmware storage area in the two firmware storage areas that is not used for storing the current fast charging protocol to be matched.
The apparatus provided in this embodiment is used to implement the technical solution provided by the above method, and the implementation principle and the technical effect are similar and will not be described again.
The application provides an electronic device, including: a memory, a processor;
a memory; a memory for storing processor-executable instructions;
the processor is used for executing the method according to the executable instruction.
Fig. 7 is a schematic structural diagram of an electronic device provided in an embodiment of the present application, and as shown in fig. 7, the electronic device includes:
a processor (processor) 291, the electronic device further including a memory (memory) 292; a Communication Interface 293 and bus 294 may also be included. The processor 291, the memory 292, and the communication interface 293 may communicate with each other via the bus 294. Communication interface 293 may be used for the transmission of information. Processor 291 may invoke logic instructions in memory 292 to perform the methods of the embodiments described above.
Further, the logic instructions in the memory 292 may be implemented in software functional units and stored in a computer readable storage medium when sold or used as a stand-alone product.
The memory 292 is a computer-readable storage medium for storing software programs, computer-executable programs, such as program instructions/modules corresponding to the methods in the embodiments of the present application. The processor 291 executes the functional application and data processing by executing the software program, instructions and modules stored in the memory 292, so as to implement the method in the above method embodiments.
The memory 292 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal device, and the like. Further, the memory 292 may include a high speed random access memory and may also include a non-volatile memory.
The present application provides a computer-readable storage medium having stored thereon computer-executable instructions for implementing any of the methods when executed by a processor.
A computer program product comprising a computer program which, when executed by a processor, implements the method of any one of the claims.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It will be understood that the present application is not limited to the precise arrangements that have been 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 application is limited only by the appended claims.

Claims (20)

1. A charging method applied to an electronic device, wherein the method is applied to a central processing unit of a first electronic device, the first electronic device comprises the central processing unit, a first protocol chip and at least one second protocol chip, and the method comprises the following steps:
responding to a trigger instruction, and acquiring a first identification result of the first protocol chip; the trigger instruction is used for indicating to charge the first electronic device, the first protocol chip supports a first fast charging protocol, and the first identification result represents whether a second electronic device connected with the first electronic device supports the first fast charging protocol;
according to the first identification result, at least one fast charging protocol to be matched is determined from a plurality of second fast charging protocols supported by the second protocol chip; the first fast charge protocol is different from each of the second fast charge protocols;
determining a second identification result of the second protocol chip according to the power of the at least one fast charging protocol to be matched; wherein the second identification result characterizes whether the second electronic device supports a protocol of the at least one fast charging protocol to be matched;
and controlling the second electronic equipment to charge the first electronic equipment according to the second identification result.
2. The method according to claim 1, wherein the determining at least one fast charging protocol to be matched from a plurality of second fast charging protocols supported by the second protocol chip according to the first recognition result comprises:
and if the charging port of the second electronic device is determined to be a special charging port, determining at least one fast charging protocol to be matched from a plurality of second fast charging protocols supported by the second protocol chip according to the first identification result.
3. The method of claim 2, wherein if it is determined that the charging port of the second electronic device is a dedicated charging port, determining at least one fast charging protocol to be matched from a plurality of second fast charging protocols supported by the second protocol chip according to the first identification result, includes:
if the charging port of the second electronic device is determined to be a dedicated charging port and the first identification result indicates that the second electronic device supports the first fast charging protocol, determining a second fast charging protocol with power larger than that of the first fast charging protocol as a fast charging protocol to be matched in the plurality of second fast charging protocols;
and if the charging port of the second electronic equipment is determined to be a special charging port and the second electronic equipment is determined not to support the first quick charging protocol, determining the plurality of second quick charging protocols to be matched.
4. The method of claim 2, further comprising:
and if the charging port of the second electronic equipment is determined not to be the special charging port, controlling the second electronic equipment to charge the first electronic equipment according to the first identification result.
5. The method according to any one of claims 1 to 4, wherein the determining the second identification result of the second protocol chip according to the power level of the at least one fast charging protocol to be matched comprises:
repeatedly executing the following steps until a preset stop condition is reached: determining a current quick charging protocol to be matched in the quick charging protocols to be matched according to the sequence of the power of the at least one quick charging protocol to be matched from high to low; controlling the second protocol chip to operate based on the current fast charging protocol to be matched, and receiving a third identification result sent by the second protocol chip, wherein the third identification result is used for representing whether the second electronic device is the current fast charging protocol to be matched; the preset stop condition is that any one of the quick charging protocol to be matched is matched and ended or the second electronic equipment supports the quick charging protocol to be matched;
determining a second recognition result of the second protocol chip based on at least one third recognition result.
6. The method of claim 5, wherein the controlling the second electronic device to charge the first electronic device according to the second recognition result comprises:
if the second identification result of the second protocol chip represents that the second electronic device supports a protocol in the at least one to-be-matched fast charging protocol, taking the current to-be-matched fast charging protocol supported by the second electronic device and represented by the third identification result as a protocol result, wherein the protocol result is used for indicating a protocol used when the first electronic device is charged;
if the second identification result of the second protocol chip represents that the second electronic device does not support the protocol in the at least one fast charging protocol to be matched, determining the protocol result based on the first identification result;
and determining the charging information of a main charging chip and the charging information of an auxiliary charging chip in the first electronic equipment based on the charging voltage and the charging current corresponding to the protocol result, and controlling the second electronic equipment to charge the first electronic equipment.
7. The method according to claim 6, wherein if the second identification result of the second protocol chip indicates that the second electronic device does not support a protocol in the at least one fast charging protocol to be matched, determining the protocol result based on the first identification result comprises:
if the second identification result of the second protocol chip represents that the second electronic device does not support the protocol in the at least one fast charging protocol to be matched, and the first identification result indicates that the first electronic device does not support the first fast charging protocol, a common charging protocol is used as the protocol result;
and if the second identification result of the second protocol chip represents that the second electronic device does not support the protocol in the at least one fast charging protocol to be matched, and the first identification result indicates that the first electronic device supports the first fast charging protocol, the first fast charging protocol is used as the protocol result.
8. The method of claim 5, wherein the number of the second protocol chips is one; the second protocol chip comprises two firmware storage areas; the two firmware storage areas are used for respectively storing the first two second quick charging protocols with the maximum charging power values in the plurality of second quick charging protocols.
9. The method according to claim 8, wherein after the controlling the second protocol chip to operate based on the current fast charging protocol to be matched, the method further comprises:
if it is determined that a next-to-be-matched rapid charging protocol of the current rapid charging protocol to be matched is not stored in the two firmware storage areas in the second protocol chip, writing the next-to-be-matched rapid charging protocol of the current rapid charging protocol to be matched into a first firmware storage area in the second protocol chip, wherein the first firmware storage area is a firmware storage area which is not used for storing the current rapid charging protocol to be matched in the two firmware storage areas.
10. A charging device applied to an electronic device, wherein the charging device is applied to a central processing unit of a first electronic device, the first electronic device comprises the central processing unit, a first protocol chip and at least one second protocol chip, and the charging device comprises:
the acquisition unit is used for responding to a trigger instruction and acquiring a first identification result of the first protocol chip; the trigger instruction is used for indicating to charge the first electronic device, the first protocol chip supports a first fast charging protocol, and the first identification result represents whether a second electronic device connected with the first electronic device supports the first fast charging protocol;
a first determining unit, configured to determine, according to the first identification result, at least one fast charging protocol to be matched from multiple second fast charging protocols supported by the second protocol chip; the first fast charge protocol is different from each of the second fast charge protocols;
the second determining unit is used for determining a second identification result of the second protocol chip according to the power level of the at least one fast charging protocol to be matched; wherein the second identification result characterizes whether the second electronic device supports a protocol of the at least one fast charging protocol to be matched;
and the control unit is used for controlling the second electronic equipment to charge the first electronic equipment according to the second identification result.
11. The apparatus according to claim 10, wherein the first determining unit is specifically configured to:
and if the charging port of the second electronic device is determined to be a special charging port, determining at least one fast charging protocol to be matched from a plurality of second fast charging protocols supported by the second protocol chip according to the first identification result.
12. The apparatus according to claim 11, wherein the first determining unit is specifically configured to:
if the charging port of the second electronic device is determined to be a dedicated charging port and the first identification result indicates that the second electronic device supports the first fast charging protocol, determining a second fast charging protocol with power larger than that of the first fast charging protocol as a fast charging protocol to be matched in the plurality of second fast charging protocols;
and if the charging port of the second electronic equipment is determined to be a special charging port and the second electronic equipment is determined not to support the first quick charging protocol, determining the plurality of second quick charging protocols to be matched.
13. The apparatus of claim 11, further comprising:
and a third determining unit, configured to, if it is determined that the charging port of the second electronic device is not the dedicated charging port, control the second electronic device to charge the first electronic device according to the first identification result.
14. The apparatus according to any one of claims 10-13, wherein the second determining unit comprises:
and repeating the first determining module, the control module and the receiving module until a preset stopping condition is reached:
the first determining module is used for determining the current quick charging protocol to be matched in the quick charging protocols to be matched according to the sequence of the power of the at least one quick charging protocol to be matched from high to low;
the control module is used for controlling the second protocol chip to operate based on the current quick charging protocol to be matched;
the receiving module is configured to receive a third identification result sent by the second protocol chip, where the third identification result is used to characterize whether the second electronic device is the current fast charging protocol to be matched; the preset stop condition is that any one of the quick charging protocol to be matched is matched and ended or the second electronic equipment supports the quick charging protocol to be matched;
a second determining module, configured to determine a second recognition result of the second protocol chip based on at least one third recognition result.
15. The apparatus of claim 14, wherein the control unit comprises:
a third determining module, configured to, if a second identification result of the second protocol chip indicates that the second electronic device supports a protocol in the at least one to-be-matched fast charging protocol, take a current to-be-matched fast charging protocol supported by the second electronic device and represented by the third identification result as a protocol result, where the protocol result is used to indicate a protocol used when the first electronic device is charged;
a fourth determining module, configured to determine a protocol result based on the first identification result if the second identification result of the second protocol chip indicates that the second electronic device does not support a protocol in the at least one to-be-matched fast charging protocol;
and the fifth determining module is used for determining the charging information of the main charging chip and the charging information of the auxiliary charging chip in the first electronic equipment based on the charging voltage and the charging current corresponding to the protocol result, and controlling the second electronic equipment to charge the first electronic equipment.
16. The apparatus of claim 15, wherein the fourth determining module is specifically configured to:
if the second identification result of the second protocol chip represents that the second electronic device does not support the protocol in the at least one fast charging protocol to be matched, and the first identification result indicates that the first electronic device does not support the first fast charging protocol, a common charging protocol is used as the protocol result;
and if the second identification result of the second protocol chip represents that the second electronic device does not support the protocol in the at least one fast charging protocol to be matched, and the first identification result indicates that the first electronic device supports the first fast charging protocol, the first fast charging protocol is used as the protocol result.
17. The apparatus of claim 14, wherein the number of the second protocol chips is one; the second protocol chip comprises two firmware storage areas; the two firmware storage areas are used for respectively storing the first two second quick charging protocols with the maximum charging power values in the plurality of second quick charging protocols.
18. The apparatus of claim 17, further comprising:
and the writing module is used for writing the fast charging protocol to be matched after the current fast charging protocol to be matched into a first firmware storage area in the second protocol chip if the control module controls the second protocol chip to operate based on the current fast charging protocol to be matched and the fast charging protocol to be matched after the current fast charging protocol to be matched is determined not to be stored in the two firmware storage areas in the second protocol chip, wherein the first firmware storage area is the firmware storage area which is not used for storing the current fast charging protocol to be matched in the two firmware storage areas.
19. An electronic device, comprising:
a memory, a processor, and a computer program;
wherein the processor is capable of processing instructions for execution within a computer system; the computer program is stored in the memory and configured to be executed by the processor to implement the method of any one of claims 1-9.
20. A computer-readable storage medium having computer-executable instructions stored therein, which when executed by a processor, are configured to implement the method of any one of claims 1-9.
CN202210764816.6A 2022-07-01 2022-07-01 Charging method, device and equipment applied to electronic equipment and storage medium Active CN114844180B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210764816.6A CN114844180B (en) 2022-07-01 2022-07-01 Charging method, device and equipment applied to electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210764816.6A CN114844180B (en) 2022-07-01 2022-07-01 Charging method, device and equipment applied to electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114844180A true CN114844180A (en) 2022-08-02
CN114844180B CN114844180B (en) 2022-09-27

Family

ID=82573830

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210764816.6A Active CN114844180B (en) 2022-07-01 2022-07-01 Charging method, device and equipment applied to electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114844180B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8237414B1 (en) * 2009-03-06 2012-08-07 Pericom Semiconductor Corporation Multi-mode charger device
CN106130124A (en) * 2016-07-29 2016-11-16 宇龙计算机通信科技(深圳)有限公司 A kind of method, system and terminal realizing multiple fast charge protocol compatibility
CN111817097A (en) * 2020-07-14 2020-10-23 维沃移动通信有限公司 Charging control method and data line
CN112448435A (en) * 2019-09-03 2021-03-05 中兴通讯股份有限公司 Terminal equipment charging method and device and storage medium
CN112448423A (en) * 2019-08-28 2021-03-05 北京小米移动软件有限公司 Charging method and device, electronic equipment and storage medium
CN112803558A (en) * 2021-04-09 2021-05-14 深圳英集芯科技股份有限公司 Multi-quick-charging-protocol control circuit, control method, chip and electronic equipment
CN113690981A (en) * 2021-08-25 2021-11-23 Oppo广东移动通信有限公司 Charging protocol determination method and device, electronic equipment and readable storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8237414B1 (en) * 2009-03-06 2012-08-07 Pericom Semiconductor Corporation Multi-mode charger device
CN106130124A (en) * 2016-07-29 2016-11-16 宇龙计算机通信科技(深圳)有限公司 A kind of method, system and terminal realizing multiple fast charge protocol compatibility
CN112448423A (en) * 2019-08-28 2021-03-05 北京小米移动软件有限公司 Charging method and device, electronic equipment and storage medium
CN112448435A (en) * 2019-09-03 2021-03-05 中兴通讯股份有限公司 Terminal equipment charging method and device and storage medium
CN111817097A (en) * 2020-07-14 2020-10-23 维沃移动通信有限公司 Charging control method and data line
CN112803558A (en) * 2021-04-09 2021-05-14 深圳英集芯科技股份有限公司 Multi-quick-charging-protocol control circuit, control method, chip and electronic equipment
CN113690981A (en) * 2021-08-25 2021-11-23 Oppo广东移动通信有限公司 Charging protocol determination method and device, electronic equipment and readable storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王泽宇: "基于反激式AC_DC变换器的高效率高精度快速充电系统集成芯片关键技术研究", 《中国博士论文全文数据库》 *

Also Published As

Publication number Publication date
CN114844180B (en) 2022-09-27

Similar Documents

Publication Publication Date Title
CN104750510A (en) Chip start method and multi-core processor chip
CN106575169B (en) Method for eliminating interference of charger on touch screen and mobile terminal
CN112732616B (en) BMC starting method, device and equipment based on SPI controller
CN113691722B (en) Control method and device and electronic equipment
CN112448435A (en) Terminal equipment charging method and device and storage medium
EP4155119A1 (en) Method for controlling charging of vehicle, and device, program, medium, and vehicle
CN101876911A (en) Multi-CPU (Central Processing Unit)system starting method and module based on PCI/PCIe (Peripheral Component Interconnect/Peripheral Component Interconnect Express) bus
US8341307B2 (en) Semiconductor storage device, electronic apparatus, and mode setting method
CN104679543A (en) Electronic device and operating method thereof
CN109901664B (en) Method, apparatus, system, device and readable storage medium for providing clock signal
CN114844180B (en) Charging method, device and equipment applied to electronic equipment and storage medium
CN108563468B (en) Bluetooth sound box data processing method and device and Bluetooth sound box
CN111078255B (en) Software upgrading method and software upgrading system
CN116169758B (en) Output power adjusting method and charger
CN114237378A (en) Electronic device
CN112398202A (en) Configuration method and device of chip power supply power, electronic equipment and storage medium
CN114765465A (en) Portable device communicating with charger and method of operating the same
CN103226479B (en) Electronic apparatus system and electronic equipment
EP3891594A1 (en) Memory control system with a sequence processing unit
KR102331547B1 (en) Apparatus and method for supporting multi-function of vehicle
JP2019086727A (en) Imaging apparatus
CN116450555B (en) Method and device for communication through serial peripheral interface
CN106787648B (en) Method and system for protecting startup of mobile terminal
CN113890144A (en) Charging and discharging control method, device, equipment and medium
CN113991810A (en) Charging method, device, equipment and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant