Electronic device and charging control method
By adding an adapter module or switch module to electronic devices, the problem of electronic devices being unable to establish a charging protocol handshake with the charger when there is no power supply is solved. This enables the device to be identified and charged even when the power is off, reducing the risk of power failure and improving the compatibility of the device.
Patent Information
- Application Number
- CN202210079826.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-24
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2042-01-24
AI Technical Summary
Electronic devices cannot establish a charging protocol handshake with the charger when there is no power supply, leading to the risk of power loss.
Adding an adapter module or switch module to electronic devices allows for direct power supply to the target type interface when a charging device is connected, ensuring that the charging module can recognize the charging device and perform charging.
This reduces the risk that electronic devices will not recognize the charging device when the power is off, avoids charging failure or restart, and improves the compatibility and reliability of the device.
Smart Images

Figure CN114498831B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of communication, and particularly relates to an electronic device and a charging control method. BACKGROUND
[0002] Generally, when an electronic device is connected with other devices, the electronic device can be connected by using a type C (C type Universal Serial Bus (USB)) interface. Specifically, a type C port of the electronic device can control data positive (DP) / data minus (DM) signals to communicate externally by using a type C switch, so as to charge the electronic device when the electronic device is connected with a charger.
[0003] However, since the type C switch needs to be powered by a central processing unit (CPU), when there is no power supply, the external DP / DM signals cannot communicate with the CPU across the type C switch, so that the internal charging circuit of the charger cannot perform a charging protocol handshake with the external charger when the charger is charging the over-discharged battery. As a result, the electronic device has a risk of power failure. SUMMARY
[0004] An embodiment of the present application aims to provide an electronic device and a charging control method, which can solve the problem of the risk of power failure of the electronic device.
[0005] In a first aspect, an embodiment of the present application provides an electronic device, which comprises a first interface, a switching module, a target type interface, and a charging module; wherein the first interface is connected with the switching module, the switching module is connected with a first port of the target type interface, and a second port of the target type interface is connected with the charging module; when the electronic device is connected with a charging device and the electronic device is in a power failure state, the first interface is configured to output a charging voltage in a target voltage range to the switching module, the switching module is configured to output the charging voltage to the target type interface, and the target type interface is configured to receive a communication signal output by the charging device when the target type interface receives the charging voltage, and output the communication signal to the charging module.
[0006] In a second aspect, an embodiment of the present application provides a charging control method, which comprises: when an electronic device is connected with a charging device and the electronic device is in a power failure state, outputting a charging voltage in a target voltage range to the electronic device by using a switching module; and based on the charging voltage, controlling a charging module in the electronic device to charge the electronic device.
[0007] In a third aspect, an electronic device is provided, which includes a processor and a memory. The memory stores programs or instructions executable on the processor. The programs or instructions, when executed by the processor, implement the steps of the method according to the second aspect.
[0008] In a fourth aspect, a readable storage medium is provided, which stores programs or instructions. The programs or instructions, when executed by a processor, implement the steps of the method according to the second aspect.
[0009] In a fifth aspect, a chip is provided, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is configured to execute programs or instructions to implement the method according to the second aspect.
[0010] In a sixth aspect, a computer program product is provided, which is stored in a storage medium. The computer program product is executed by at least one processor to implement the method according to the second aspect.
[0011] In the embodiments of the present application, a switching module is added between the first interface and the target type interface in the electronic device, so that the target type interface is directly powered when the electronic device is connected to the charging device, so that the electronic device can identify the charging device and charge. In the present scheme, since the switching module is added in the electronic device, the switching module can directly power the target type interface when the electronic device is connected to the charging device, thereby avoiding the problem that the electronic device cannot identify the charging device or identify incorrectly, resulting in that the charging device cannot power the electronic device, thereby reducing the risk of power failure of the electronic device. BRIEF DESCRIPTION OF DRAWINGS
[0012] Figure 1 FIG. 1 is a structural schematic diagram of an electronic device according to an embodiment of the present application;
[0013] Figure 2 FIG. 2 is another structural schematic diagram of an electronic device according to an embodiment of the present application;
[0014] Figure 3 FIG. 3 is a third structural schematic diagram of an electronic device according to an embodiment of the present application;
[0015] Figure 4 FIG. 4 is a fourth structural schematic diagram of an electronic device according to an embodiment of the present application;
[0016] Figure 5 FIG. 5 is a fifth structural schematic diagram of an electronic device according to an embodiment of the present application;
[0017] Figure 6Fig. 6 is a structural schematic diagram of an electronic device according to an embodiment of the present application;
[0018] Figure 7 Fig. 7 is a structural schematic diagram of an electronic device according to an embodiment of the present application;
[0019] Figure 8 Fig. 8 is a structural schematic diagram of an electronic device according to an embodiment of the present application;
[0020] Figure 9 Fig. 9 is a flowchart of a charging control method according to an embodiment of the present application. DETAILED DESCRIPTION
[0021] The technical solutions in the embodiments of the present application will be clearly and completely described with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of protection of the present application.
[0022] The terms "first", "second", and the like in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be exchanged under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of a kind and do not limit the number of objects, for example, the first object can be one or more. In addition, "and / or" in the specification and claims indicates at least one of the connected objects, and the character " / ", generally indicates that the front and rear associated objects are in an "or" relationship.
[0023] The electronic device and the charging control method provided by the embodiments of the present application will be described in detail below with reference to the drawings and specific embodiments and application scenarios.
[0024] With the richness of the functions of electronic devices, more and more functions need to be communicated through the DP / DM interface in the USB interface, including USB data transmission, charging protocol detection, digital earphone, etc., so a type C switch is needed to transmit the DP / DM signal transmitted from the outside to different chips (such as CPU or charging control chip) at appropriate times, so that the electronic device can realize different functions according to the DP / DM port. Generally, when the electronic device is charging, the electronic device needs to activate the charging circuit through the charging voltage, so that the internal logic circuit of the charging circuit starts to work, and thus the type C switch can control the DP / DM port in the charging circuit to perform charging protocol handshake with the DP / DM port in the charger to charge the electronic device. However, due to over-discharge of the battery, the electronic device is in a power-off state, so the platform (such as CPU) that supplies power to the Type-C switch is also powered off, causing the power loop in the electronic device to not work, and the electronic device is still in a power-off state. In this state, the electronic device can perform the first charging protocol (such as BC1.2) detection through the DP / DM in the charging circuit. Since the Type-C switch is not powered, the CPU will identify the charger as a standard downstream port (Standard Downstream Port, SDP), that is, the CPU will identify the charger as a data transmission interface, so the CPU will automatically set the charging current threshold to the threshold corresponding to the SDP, which is generally 500mA. Since the first charging protocol sets the charging current threshold to 500mA, when the electronic device is charging, the electronic device itself needs to consume a certain amount of current, resulting in insufficient current to power the electronic device. If the charging current is greater than 500mA, the charging circuit will determine that it is overcurrent, and the power loop of the charging circuit will stop supplying power to protect the electronic device from being damaged, so the electronic device enters a power-off state, or the electronic device restarts, that is, the electronic device will not charge even if it is connected to the charger.
[0025] To solve the above problems, in an implementation manner of the embodiment of the present application, a voltage stabilizing module is added between the first interface in the electronic device and the target type interface (i.e. the type C switch), so that the target type interface is directly powered when the electronic device is connected to the charging device, and the electronic device can identify the charging device and charge. In this scheme, since the voltage stabilizing module is added in the electronic device, the type C switch can be directly powered when the electronic device is connected to the charging device, thereby avoiding the situation that the electronic device cannot identify the charging device or identifies it incorrectly, and thus the charging device cannot supply power to the electronic device, thereby reducing the risk of power failure of the electronic device.
[0026] In another implementation manner of the embodiment of the present application, a switch module can be added in the electronic device, wherein the switch module is connected with the first interface and the charging module, and the communication signal can be directly transmitted to the charging module through the switch module, so that the electronic device can identify the charging device and perform charging. In the present scheme, since the switch module is added in the electronic device, when the electronic device is connected with the charging device, the communication signal of the first interface can be directly sent to the charging module through the switch module, thereby avoiding that the electronic device cannot identify the charging device or the identification is incorrect, and the charging device cannot supply power to the electronic device, so as to reduce the power-off risk of the electronic device.
[0027] The embodiment of the present application provides an electronic device, Figure 1 The structure schematic diagram of the electronic device provided by the embodiment of the present application is shown. As shown in the figure, Figure 1 The electronic device provided by the embodiment of the present application can include a first interface 10, a switching module 11, a target type interface 12 and a charging module 13.
[0028] In the embodiment of the present application, the first interface 10 is connected with the switching module 11, the switching module 11 is connected with the first port of the target type interface 12, and the second port of the target type interface 12 is connected with the charging module 13. In the case that the electronic device is connected with the charging device and the electronic device is in power-off, the first interface is used to output the charging voltage in the target voltage range to the switching module, the switching module is used to output the charging voltage to the target type interface, and the target type interface is used to receive the communication signal output by the charging device and output the communication signal to the charging module in the case that the charging voltage is received.
[0029] It should be noted that, in order to facilitate the illustration of each port in the Figure 1 The first port of the target type interface 12 is represented by a VCC port, and the second port of the target type interface is represented by a D1 port.
[0030] Optionally, in the embodiment of the present application, the first interface can be a type C interface or a USB interface, and the first interface is specifically used to be connected with the charging device, that is, the electronic device is connected with the charging device through the first interface. In the case that the first interface is a communication interface, the electronic device can send data to other electronic devices or receive data of other electronic devices through the first interface; in the case that the first interface is a charging interface, the electronic device can be connected with the charging device through the first interface, so that the charging device can charge the electronic device.
[0031] Optionally, in the embodiment of the present application, the target type interface can be a type C switch interface, a USB switch interface or a Lightning switch interface, etc. which has a switching circuit function.
[0032] It is understandable that after the electronic device is connected to the charging device, the target type interface is in working state because it can receive the charging voltage. Therefore, after receiving the communication signal sent by the charging device, the target type interface can send a communication signal to the charging module so that the charging module can detect the communication signal to determine whether to supply power to the electronic device.
[0033] In this embodiment, after receiving the charging voltage, the internal logic circuit of the charging module starts to work. At this time, the power circuit has not yet started to work, and the electronic device is still in a power-off state. In this state, the charging module can perform the first charging protocol detection through the communication signal. Since the target type interface is already in the working state, the charging device can communicate with the charging module through the communication signal so that the electronic device can identify the charging device as a dedicated charging port (DCP) and set a corresponding charging current threshold (e.g., 3.25A) for the DCP. After the electronic device identifies the charging device, the charging module can charge the electronic device according to the charging current.
[0034] Optionally, in the embodiments of this application, combined with Figure 1 ,like Figure 2 As shown, the above-mentioned adapter module includes: voltage regulator module 14 and CPU 15.
[0035] In this embodiment of the application, the first interface 10 is respectively connected to the voltage regulator module 14 ( Figure 2 The input port (represented by LDO in Chinese) Figure 2 (represented by Vin) and the enable port of voltage regulator module 14 ( Figure 2 The voltage regulator module 14 is connected to the CE symbol (in Chinese). Figure 2 (represented by Vout) and the first port of the target type interface 12 ( Figure 2 The first port of CPU15 (represented by VCC) is connected. Figure 2 The second port of CPU 15 (represented by VCC) is connected to the output port of voltage regulator module 14, and the second port of CPU 15 ( Figure 2 (represented by IO in Chinese) is connected to the enable port. The voltage regulator module is used to output charging voltage to the CPU; the CPU, upon receiving the charging voltage, detects whether the charging module is in a charging state, and if the charging module is in a charging state, controls the enable port to enable the voltage regulator module to be in a non-operating state, thereby controlling the voltage regulator module to stop outputting charging voltage to the CPU and the target type interface.
[0036] It is understandable that when an electronic device is connected to a charging device, the enable port of the voltage regulator module is connected to the charging device through the first interface so that the charging voltage output by the charging device can be regulated by the voltage regulator module, and the charging module in the electronic device can charge the electronic device based on the regulated charging voltage.
[0037] In this embodiment, when the electronic device is already charging, the CPU can control the voltage regulator module to stop outputting charging voltage to the target type interface. This allows the electronic device to perform different functions through the target type interface when receiving other communication signals (such as data transmission signals), thereby improving the compatibility of the electronic device.
[0038] Optionally, in this embodiment of the application, when the voltage regulator receives the charging voltage output by the charging device, the voltage regulator can control the voltage drop of the regulating tube in the voltage regulator according to the amplitude change of the charging voltage, thereby outputting a stable voltage.
[0039] Optionally, in this embodiment of the application, the electronic device can enable the voltage regulator module to charge the voltage to reach the operating voltage of the target type interface according to the operating voltage range of the target type interface (i.e., the target voltage range), so that the target type interface can be in a working state.
[0040] In this embodiment, the voltage regulator module can enable the charging voltage through the enable port and output the regulated charging voltage to the target type interface, that is, the charging voltage within the target voltage range (e.g., 5V), so that the target type interface can conduct the communication circuit between the charging device and the charging module, thereby ensuring that the communication signal can be output to the charging circuit through the target type interface, avoiding the electronic device being unable to recognize the charging device and thus preventing the electronic device from being unable to charge, thereby reducing the risk of power loss of the electronic device.
[0041] Optionally, in this embodiment of the application, the above-mentioned electronic device further includes a resistive element 17.
[0042] In this embodiment, one end of the resistor element 17 is connected to the enable port, and the other end of the resistor element 17 is connected to the first interface 10, which is connected to the charging device 18. When the electronic device is connected to the charging device, the enable port enables the charging device to output a charging voltage within the target voltage range to the voltage regulator module through the first interface via the resistor element.
[0043] For example, such as Figure 3 As shown, the electronic device includes a first interface 10, a target type interface 12, a charging module 13, a voltage regulator module 14, a CPU 15, and a resistor element 17. The first interface includes an output port. Specifically, the output port of the first interface 10 ( Figure 3(represented by VBUS) and voltage regulator module 14 ( Figure 3 The input port (represented by LDO in Chinese) Figure 3 (represented by Vin) is connected, and the output port of the first interface 10 is connected to the resistor element 17 ( Figure 3 The first end (represented by R in the text) Figure 3 (represented by R1) is connected, the second end of the resistor element ( Figure 3 (represented by R2) and the enable terminal of voltage regulator module 14 ( Figure 3 (represented by CE in Chinese) connection, CPU15's first port ( Figure 3 (represented by VCC) and the output port of voltage regulator module 14 ( Figure 3 The connection is represented by Vout in the middle, and the second port of CPU15 ( Figure 3 (represented by IO) is connected to the enable port, and the output port of the voltage regulator module 14 is connected to the first port of the target type interface 12 ( Figure 3 (represented by VCC) connection, the second port of target type interface 12 ( Figure 3 (represented by D1) is connected to the charging module 13.
[0044] In this embodiment of the application, when the electronic device is connected to the charging device, the voltage regulator module can pull up to the VBUS of the first interface through a resistor element. Thus, when the charging device outputs a charging voltage to the first interface, the voltage regulator module can adjust the charging voltage through the resistor element so that the charging voltage meets the operating voltage range of the target type interface. In this way, the target type interface can transmit the DP / DM signal output by the charging device to the charging module.
[0045] Optionally, the aforementioned resistive element can be any of the following: a fixed resistor, a variable resistor, or a special resistor, etc.
[0046] Optionally, in the embodiments of this application, combined with Figure 1 ,like Figure 4 As shown, the above-mentioned adapter module includes: switch module 16 and CPU 15.
[0047] In this embodiment of the application, the first interface 10 and the first end of the switch module 16 ( Figure 4 The second terminal of the switch module 16 (represented by T1) is connected. Figure 4 (represented by T2) is connected to the charging module 13; the first port of the CPU 15 ( Figure 4 (represented by IO in the text) and the third terminal of switch module 16 ( Figure 4(Represented by T3 in the diagram) Connection. When the electronic device is connected to the charging device and the switching module is in the ON state, the switching module is used to receive the communication signal output by the charging device and output a communication signal to the charging module; the charging module is used to charge the electronic device when the communication signal is a charging signal; the CPU is used to control the switching module to be in the OFF state when the charging module is in the charging state, so as to control the switching module to stop outputting communication signals to the charging module.
[0048] It is understandable that when an electronic device is connected to a charging device, the communication signal of the charging device can be transmitted to the charging module through the first port and the switch module. That is, the charging module can communicate directly with the charging device to charge the electronic device.
[0049] It should be noted that the descriptions of the first interface 10 and the charging module 13 can be found in the above embodiments, and will not be repeated here.
[0050] Optionally, in the embodiments of this application, the switch module 16 can be a field-effect transistor or a single-pole double-throw switch, or it can be other components with switching functions. The embodiments of this application do not impose any restrictions.
[0051] Optionally, in the embodiments of this application, combined with Figure 3 ,like Figure 5 As shown, the first interface 10 includes a first DP port and a first DM port, the second port of the target type interface 12 includes a second DP port and a second DM port, and the charging module 13 includes a third DP port and a third DM port.
[0052] In this embodiment of the application, the aforementioned first DP port ( Figure 5 (represented by DP1) and the second DP port ( Figure 5 The first DM port (represented by DP2) is connected. Figure 5 (represented by DM1) and the second DM port ( Figure 5 The second DP port (represented by DM2) is connected to the third DP port. Figure 5 The second DM port (represented by DP3) is connected to the third DM port. Figure 5 (Represented by DM3 in Chinese) connection.
[0053] It is understood that when the electronic device is connected to the charging device, the first interface is used to output communication signals to the target type interface through the first DP port and the first DM port; the target type interface is used to receive the communication signals output by the charging device through the second DP port and the second DM port when a charging voltage is received; the charging module is used to receive the communication signals output by the target type interface through the third DP port and the third DM port, and to supply power to the electronic device when the communication signal is a charging signal.
[0054] Optionally, in this embodiment of the application, the switching module is a first field-effect transistor and a second field-effect transistor.
[0055] In this embodiment, the source S of the first field-effect transistor is connected to the first DP port, and the drain D of the first field-effect transistor is connected to the third DP port; the source S of the second field-effect transistor is connected to the first DM port, and the drain D of the second field-effect transistor is connected to the third DM port.
[0056] For example, combined Figure 4 ,like Figure 6 As shown, the electronic device includes: a first interface 10, a first field-effect transistor B1, a second field-effect transistor B2, a target type interface 12, a charging module 13, and a CPU 15; the CPU 15 includes a second target port and a first target port, the first target port including a first port and a second port. The first DP port of the first interface 10 (…) Figure 6 (represented by DP1) is connected to the source (S) terminal of the first field-effect transistor B1 and the second DP port of the target type interface 12, respectively. Figure 6 (represented by DP2) connection, the first DM port of the first interface ( Figure 6 (represented by DM1) is connected to the source (S) terminal of the second field-effect transistor B2 and the second DM port of the target type interface 12, respectively. Figure 6 (represented by DM2) is connected, and the second DP port of the target type interface 12 is connected to the third DP port of the charging module ( Figure 6 (represented by DP3) connection, the second DM port of the target type interface 12 is connected to the third DM port of the charging module ( Figure 6 (represented by DM3) is connected to the first port of CPU15 ( Figure 6 (represented by IO1) is connected to the gate of the first field-effect transistor B1, and the second port of CPU15 ( Figure 6 (represented by IO2) is connected to the gate of the second field-effect transistor B2, and the second target port of CPU15 ( Figure 6 (represented by VCC in Chinese) and the third port of the target type interface ( Figure 6 Connected via VCC.
[0057] It should be noted that both the first and second field-effect transistors mentioned above are depletion-type P-class field-effect transistors. When there is no external voltage, the voltage between the gate and source of a depletion-type P-class field-effect transistor is less than or equal to zero. In this state, the drain and source of the depletion-type P-class field-effect transistor are conductive. When the voltage between the gate and source of the depletion-type P-class field-effect transistor is greater than zero, the drain and source of the depletion-type P-class field-effect transistor are cut off. That is, when the electronic device is in a power-off state, the communication signal can reach the charging module through the drain and source of the depletion-type P-class field-effect transistor, thereby enabling the electronic device to receive the charging signal for charging.
[0058] In this embodiment, since both the first and second field-effect transistors are depletion-type P-class field-effect transistors, the communication signal can be directly transmitted to the charging module through the first interface when the electronic device is in a power-off state. Therefore, even if the target type interface is in a power-off state, the electronic device can correctly identify the charging device, avoiding the electronic device's inability to identify the charging device or the incorrect identification, which would cause the charging device to be unable to supply power to the electronic device, thus reducing the risk of power failure of the electronic device.
[0059] It is understandable that when an electronic device is charging, the CPU can control the switching module to disconnect through the I / O port, so that when the electronic device receives other communication signals, it can still process other communication signals through the target type interface.
[0060] In this embodiment, when the electronic device is detected to be in a charging state, the electronic device can control the switch module to be in a disconnected state. This allows the electronic device to perform different functions through the target type interface when receiving other communication signals (such as data transmission signals), thereby improving the compatibility of the electronic device.
[0061] Optionally, in this embodiment of the application, the charging device includes a DCP.
[0062] In this embodiment of the application, the charging module is specifically used to determine the current value range corresponding to DCP when the communication signal is a charging signal, and to charge the electronic device with a target current, wherein the target current is the current within the current value range corresponding to DCP.
[0063] In this embodiment of the application, when the electronic device is connected to the charging device, the electronic device can perform charging protocol detection through the DP / DM port. Since the target type interface can receive the charging voltage at this time, the target type interface can transmit the communication signal to the charging module so that the electronic device can determine that the communication signal is a charging signal, identify the charging device as the DCP port, and set the current value range (e.g., 2A to 3.25A) for the DCP port. Thus, the charging module can use the charging current threshold value (e.g., 3.25A) corresponding to the DCP port to power the electronic device.
[0064] In this embodiment of the application, after the electronic device determines that the communication signal is a charging signal, the electronic device can identify the charging device as a charger and use the current corresponding to the DCP to power the electronic device, thus avoiding the electronic device failing to start or repeatedly restarting due to insufficient charging current, thereby reducing the risk of power loss of the electronic device.
[0065] Optionally, in the embodiments of this application, combined with Figure 1 to Figure 3 and Figure 5 ,like Figure 7 As shown, the electronic device includes a first interface 10, a target type interface 12, a charging module 13, a voltage regulator module 14, a CPU 15, a resistor element 17, and a charging device 18. The charging device 18 includes a fourth DP port and a fourth DM port. The fourth DP port of the charging device 18 (…) Figure 7 (represented by DP4) and the first DP port of the first interface 10 ( Figure 7 Connected to the fourth DM port of the charging device 18 (represented by DP1). Figure 7 (represented by DM4) and the first DM port of the first interface 10 ( Figure 7 (represented by DM1) is connected, and the VBUS port of the first interface 10 is connected to the input port of the voltage regulator module 14 respectively. Figure 7 (represented by Vin) and resistor 17 ( Figure 7 The first end (represented by R in the text) Figure 7 (represented by R1) is connected, and the other end of resistor element 17 ( Figure 7 (represented by R2) and the enable terminal of voltage regulator module 14 ( Figure 7 (represented by CE) is connected to the output port of voltage regulator module 14 ( Figure 7 (represented by Vout) is respectively connected to the first port of CPU15 ( Figure 7 (represented by VCC in the text) and the first port of the target type interface 12 ( Figure 7 Connected via VCC, the second port of CPU15 ( Figure 7 (represented by IO) is connected to the enable port of the voltage regulator module 14, and the first DP port of the first interface 10 is connected to the second DP port of the target type interface 12 (Figure 7 (represented by DP2) connection, the first DM port of the first interface 10 ( Figure 7 (represented by DM1) and the second DM port of target type interface 12 ( Figure 7 (represented by DM2) is connected, the second DP port of the target type interface 12 is connected to the third DP port of the charging module 13 ( Figure 7 (represented by DP3) is connected, the second DM port of the target type interface 12 is connected to the third DM port of the charging module 13 ( Figure 1 (Represented by DM3 in Chinese) connection.
[0066] Optionally, in the embodiments of this application, combined with Figure 4 , Figure 6 and Figure 8 ,like Figure 8 As shown, the electronic device includes: a first interface 10, a first field-effect transistor B1, a second field-effect transistor B2, a target type interface 12, a charging module 13, a CPU 15, and a charging device 18; the CPU 15 includes a second target port and a first target port, the first target port including a first port and a second port, and the charging device 18 includes a fourth DP port and a fourth DM port. The fourth DP port of the charging device 18 (… Figure 8 (represented by DP4) and the first DP port of the first interface 10 ( Figure 8 Connected to the fourth DM port of the charging device 18 (represented by DP1). Figure 8 (represented by DM4) and the first DM port of the first interface 10 ( Figure 8 (represented by DM1) is connected, and the first DP port of the first interface 10 is connected to the source (S) terminal of the first field-effect transistor B1 and the second DP port of the target type interface 12 respectively. Figure 8 (represented by DP2) connection, the first DM port of the first interface 10 ( Figure 8 (represented by DM1) is connected to the source (S) terminal of the second field-effect transistor B2 and the second DM port of the target type interface 12, respectively. Figure 8 (represented by DM2) is connected, the second DP port of the target type interface 12 is connected to the third DP port of the charging module 13 ( Figure 8 (represented by DM2) is connected, and the second DM port of the target type interface 12 is connected to the third DM port of the charging module ( Figure 8 (represented by DM3) is connected to the first port of CPU15 ( Figure 8 (represented by IO1) is connected to the gate of the first field-effect transistor B1, and the second port of CPU15 ( Figure 8 (represented by IO2) is connected to the gate of the second field-effect transistor B2, and the second target port of CPU15 ( Figure 9 (represented by VCC1 in the text) and the third port of the target type interface 12 ( Figure 9Connect via VCC2.
[0067] This application provides an electronic device that adds an adapter module between a first interface and a target type interface. This allows the electronic device to directly supply power to the target type interface when connected to a charging device, enabling the electronic device to recognize and charge the device. By adding the adapter module, the electronic device can directly supply power to the target type interface when connected to the charging device, preventing situations where the electronic device fails to recognize the charging device or makes a misidentification, thus reducing the risk of power loss.
[0068] This application also provides a charging control method. A flowchart of a charging control method provided in an embodiment of this application is shown. As shown, the charging control method provided in this application embodiment may include the following steps 201 and 202.
[0069] Step 201: When the electronic device is connected to the charging device and the electronic device is powered off, the electronic device outputs a charging voltage within the target voltage range to the electronic device through the adapter module.
[0070] In this embodiment, the charging device can output a charging voltage within the target voltage range to the adapter module through the first interface, so that the adapter module can output a charging voltage (e.g., 5V) to the target type interface, so that the target type interface can control the charging module and the charging device to conduct, so as to charge the electronic device.
[0071] Optionally, in the embodiments of this application, step 201 above can be specifically implemented by step 201a below.
[0072] Step 201a: When the electronic device is connected to the charging device and the electronic device is powered off, the electronic device controls the charging device to output a charging voltage within the target voltage range to the electronic device by enabling the enable port.
[0073] In this embodiment of the application, when the electronic device is connected to the charging device, the voltage regulator module can pull up to the VBUS of the first interface through a resistor element. Thus, when the charging device outputs a charging voltage to the first interface, the voltage regulator module can adjust the charging voltage through the resistor element so that the charging voltage meets the operating voltage range of the target type interface. In this way, the target type interface can transmit the DP / DM signal output by the charging device to the charging module.
[0074] Step 202: The electronic device controls the charging module in the electronic device to charge the electronic device based on the charging voltage.
[0075] In this embodiment, the electronic device can output a charging voltage to the target type interface through the charging voltage received by the adapter module, thereby enabling the electronic device to control the target type interface to be connected to the charging module so that the charging device can charge the electronic device.
[0076] Optionally, in the embodiments of this application, step 202 can be implemented by step 202a or step 202b as described below.
[0077] Step 202a: When the target type interface in the electronic device receives the charging voltage, the electronic device controls the target type interface to output a communication signal to the charging module, and when the communication signal is a charging signal, controls the charging module to charge the electronic device.
[0078] In this embodiment, after the voltage regulator module outputs the charging voltage to the target type interface, the CPU in the electronic device controls the target type interface to connect the DP / DM port of the target type interface with the DP / DM port of the charging module. This allows the charging module to establish a charging protocol handshake with the charging device, enabling the electronic device to control the charging module to charge the electronic device.
[0079] In this embodiment, power is supplied to the target type interface through a voltage regulator module, which avoids the situation where the charging module in the electronic device cannot establish a charging protocol handshake with the external charger when the electronic device is in a power-off state, thus preventing the electronic device from starting up. This reduces the risk of power failure of the electronic device.
[0080] Optionally, in the embodiments of this application, the above step 202a can be specifically implemented by the following step 202a1.
[0081] Step 202a1: When the target type interface in the electronic device receives the charging voltage, the electronic device controls the target type interface to output a communication signal to the charging module. When the communication signal is a charging signal, the current value range corresponding to the dedicated charging port DCP is determined, and the charging module is controlled to charge the electronic device through the target current. The target current is the current value within the current value range corresponding to the DCP.
[0082] In this embodiment, when the DP / DM port of the target type interface and the DP / DM port of the charging module are connected, the electronic device can detect that the communication signal is a charging signal. Thus, when the charging module and the charging device establish a charging handshake protocol, the type of the charging device is identified as DCP, so the electronic device can use the charging current corresponding to DCP to charge the electronic device.
[0083] In this embodiment, when the target type interface in the electronic device receives the charging voltage, the DP / DM port of the charging module can perform charging protocol detection with the DP / DM port of the target type interface, thereby accurately identifying the charging device and determining the charging current threshold. This prevents the electronic device from failing to start or repeatedly restarting due to insufficient current, thus reducing the risk of power failure of the electronic device.
[0084] Step 202b: When the electronic device is connected to the charging device, the electronic device receives the communication signal output by the charging device through the switching module, controls the switching module to output the communication signal to the charging module, and controls the charging module to charge the electronic device when the communication signal is a charging signal.
[0085] In this embodiment of the application, when the electronic device is connected to the charging device, the electronic device can transmit communication signals from the DP / DM port of the charging device to the DP / DM port of the charging module through the switching module. In this way, the electronic device can receive the communication signals of the charging device to perform the charging handshake protocol and charge the electronic device.
[0086] Optionally, in the embodiments of this application, the "controlling the charging module to charge the electronic device when the communication signal is a charging signal" in the above steps 202a or 202b can be specifically implemented through the following step 202a1.
[0087] Step 202a1: When the communication signal is a charging signal, the electronic device determines the current value range corresponding to the DCP and controls the charging module to charge the electronic device with the target current, which is the current value within the current value range corresponding to the DCP.
[0088] In this embodiment of the application, after the communication signal in the charging device is transmitted to the charging module, the electronic device can determine that the communication signal is a charging signal. Thus, the charging module can perform a charging handshake protocol with the charging device, enabling the electronic device to identify the charging device type as DCP. Therefore, the electronic device can use the charging current corresponding to DCP to charge the electronic device.
[0089] This application provides a charging control method. When an electronic device is connected to a charging device, the charging device can output a charging voltage to the electronic device through an adapter module. The electronic device can then control the charging module to charge it based on this voltage. In this solution, because the adapter module can directly output a charging voltage to the electronic device, the electronic device can communicate with the charging device based on this voltage. This allows the electronic device to recognize the charger and begin charging, avoiding the situation where the electronic device is powered off and unable to perform a charging protocol handshake. This prevents the electronic device from accurately recognizing the charging device, which would cause it to fail to start or repeatedly restart when connected to the charging device. Therefore, the risk of power failure for the electronic device is reduced.
[0090] Optionally, in this embodiment of the application, after step 202a1 above, the charging control method provided in this embodiment of the application further includes step 301 or step 302 as described below.
[0091] Step 301: When the charging module is detected to be in a charging state, the electronic device controls the enable port to enable the voltage regulator module in the electronic device to be in a non-working state, so as to control the voltage regulator module to stop outputting charging voltage to the target type interface.
[0092] In this embodiment, the CPU's second port (i.e., the I / O port) controls the enable port of the voltage regulator module, thereby enabling the voltage regulator module to be grounded. This allows the target type interface to conduct other circuits (e.g., data transmission circuits) when the electronic device receives other communication signals, in order to achieve different functions.
[0093] In this embodiment, when the electronic device is detected to be in a charging state, the electronic device can control the voltage regulator module to stop outputting charging voltage to the CPU and the target type interface. In this way, the electronic device can perform different functions through the target type interface when receiving other communication signals (such as data transmission signals), thereby improving the compatibility of the electronic device.
[0094] Step 302: When the charging module is in the charging state, the control switch module is in the open circuit state to control the switch module to stop outputting communication signals to the charging module.
[0095] In this embodiment, when the charging module is in a charging state, the CPU supplies power to the switching module through the first target port to control the switching module to disconnect. Thus, when the electronic device receives other communication signals, the electronic device can connect other circuits (e.g., data transmission circuits) through the target type interface to achieve different functions.
[0096] In this embodiment, when the electronic device is detected to be in a charging state, the electronic device can control the switch module to be in a disconnected state. This allows the electronic device to perform different functions through the target type interface when receiving other communication signals (such as data transmission signals), thereby improving the compatibility of the electronic device.
[0097] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
[0098] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0099] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
Claims
1. An electronic device, characterized in that, The electronic device includes: a first interface, an adapter module, a target type interface, and a charging module; Wherein, the first interface is connected to the adapter module, the adapter module is connected to the first port of the target type interface, and the second port of the target type interface is connected to the charging module; When the electronic device is connected to the charging device and the electronic device is powered off, the first interface is used to output a charging voltage within the target voltage range to the adapter module, the adapter module is used to output the charging voltage to the target type interface, and the target type interface is used to receive the communication signal output by the charging device and output the communication signal to the charging module when the charging voltage is received. The adapter module includes: a voltage regulator module and a central processing unit (CPU); Wherein, the first interface is connected to the input port and the enable port of the voltage regulator module respectively, the output port of the voltage regulator module is connected to the first port of the target type interface, the first port of the CPU is connected to the output port of the voltage regulator module, and the second port of the CPU is connected to the enable port; The voltage regulator module is used to output the charging voltage to the CPU; the CPU is used to detect whether the charging module is in a charging state when it receives the charging voltage, and if the charging module is in a charging state, control the enable port to enable the voltage regulator module to be in a non-working state, so as to control the voltage regulator module to stop outputting the charging voltage to the CPU and the target type interface.
2. The electronic device according to claim 1, characterized in that, The adapter module includes: a switch module and a CPU; Wherein, the first interface is connected to the first end of the switch module, the second end of the switch module is connected to the charging module; the first port of the CPU is connected to the third end of the switch module; When the electronic device is connected to the charging device and the switch module is in the ON state, the switch module is used to receive the communication signal output by the charging device and output the communication signal to the charging module; the charging module is used to charge the electronic device when the communication signal is a charging signal; the CPU is used to control the switch module to be in the OFF state when the charging module is in the charging state, so as to control the switch module to stop outputting the communication signal to the charging module.
3. The electronic device according to claim 1, characterized in that, The electronic device also includes resistive elements; Wherein, one end of the resistive element is connected to the enable port, the other end of the resistive element is connected to the first interface, and the first interface is connected to the charging device; When the electronic device is connected to the charging device, the enable port enables the charging device to output a charging voltage within the target voltage range to the voltage regulator module through the first interface via the resistor element.
4. The electronic device according to claim 2, characterized in that, The first interface includes a first data positive signal DP port and a first data negative signal DM port, the second port of the target type interface includes a second DP port and a second DM port, and the charging module includes a third DP port and a third DM port; Wherein, the first DP port is connected to the second DP port, the first DM port is connected to the second DM port, the second DP port is connected to the third DP port, and the second DM port is connected to the third DM port.
5. The electronic device according to claim 4, characterized in that, The switching module comprises a first field-effect transistor and a second field-effect transistor; In this configuration, the source S of the first field-effect transistor is connected to the first DP port, and the drain D of the first field-effect transistor is connected to the third DP port; the source S of the second field-effect transistor is connected to the first DM port, and the drain D of the second field-effect transistor is connected to the third DM port.
6. The electronic device according to claim 1, characterized in that, The charging device includes a dedicated charging port DCP; The charging module is specifically used to determine the current value range corresponding to the DCP when the communication signal is a charging signal, and to charge the electronic device with a target current, wherein the target current is the current within the current value range corresponding to the DCP.
7. A charging control method, characterized in that, The charging control method, applied to any one of claims 1 to 6, comprises: When the electronic device is connected to the charging device and the electronic device is powered off, the adapter module outputs a charging voltage within the target voltage range to the electronic device. Based on the charging voltage, the charging module in the electronic device is controlled to charge the electronic device; The step of outputting a charging voltage within the target voltage range to the electronic device via the adapter module includes: By enabling the enable port of the voltage regulator module in the adapter module, the charging device is controlled to output a charging voltage within the target voltage range to the electronic device.
8. The method according to claim 7, characterized in that, The step of controlling the charging module in the electronic device to charge the electronic device based on the charging voltage includes: When the target type interface in the electronic device receives the charging voltage, the target type interface is controlled to output a communication signal to the charging module, and when the communication signal is a charging signal, the charging module is controlled to charge the electronic device. or, When the electronic device is connected to the charging device, the switching module receives the communication signal output by the charging device, controls the switching module to output the communication signal to the charging module, and controls the charging module to charge the electronic device when the communication signal is a charging signal.
9. The method according to claim 8, characterized in that, When the communication signal is a charging signal, controlling the charging module to charge the electronic device includes: When the communication signal is a charging signal, the current value range corresponding to the dedicated charging port DCP is determined, and the charging module is controlled to charge the electronic device with a target current, wherein the target current is the current value within the current value range corresponding to the DCP.
10. The method according to any one of claims 7 to 9, characterized in that, After controlling the charging module in the electronic device to charge the electronic device based on the charging voltage, the method further includes: When the charging module is detected to be in a charging state, the enable port is controlled to enable the voltage regulator module in the electronic device to be in a non-working state, so as to control the voltage regulator module to stop outputting charging voltage to the target type interface; or, When the charging module is in a charging state, the control switch module is in an open circuit state to control the switch module to stop outputting the communication signal to the charging module.
Citation Information
Patent Citations
Charging control circuit, charging control method, device and storage medium
CN112956104A