Electronic device

By designing an electronic device that contains the reverse output function of the battery charging controller, the problem of insufficient power of the existing reverse charging solution is solved, the high -power reverse fast charging is realized, and the design complexity and cost are reduced.

CN119362633APending Publication Date: 2025-01-24HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411331344.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2022-06-24
Filing Date
2023-05-06
Publication Date
2025-01-24

AI Technical Summary

Technical Problem

The existing reverse charging solution has a small external charging power and cannot meet the users' high-power fast charging needs.

Method used

Design an electronic device, including a battery, charging interface, PD controller, reverse charging link and controller, to achieve greater power output through the reverse output function of the battery charging controller to meet the demand for high-power reverse fast charging.

Benefits of technology

A larger power output is achieved to meet the user's high -power fast charge demand, while reducing the complexity of the hardware circuit design and the cost of R & D input.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119362633A_ABST
    Figure CN119362633A_ABST
Patent Text Reader

Abstract

The invention provides electronic equipment. The electronic equipment comprises a battery, at least one charging interface, a PD controller, a battery charging controller, a first reverse charging link, at least one second reverse charging link and a controller. The first reverse charging link is coupled with the battery charging controller; the battery charging controller comprises a positive charging state and a negative charging state. The charging interface is coupled to the battery through a first reverse charging link and is also coupled to the power supply output end of the PD controller through a second reverse charging link. The PD controller is used for acquiring connection information of the charging interface; the connection information is used for indicating the connection state of the charging interface and indicating the device type of the external device and / or the electronic device. And the controller is used for controlling the battery charging controller to be switched to a reverse charging state and controlling a second reverse charging link corresponding to the charging interface connected with the receiving equipment to be switched off when determining that the electronic equipment is not in a forward charging state and any one or more charging interfaces are connected with the receiving equipment according to the connection information of the at least one charging interface.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application. The application number of the original application is 2023800244802, and the original application date is May 6, 2023. The entire contents of the original application are incorporated into this application by reference. Technical Field

[0002] The present application relates to the field of fast charging technology, and in particular to an electronic device. Background Art

[0003] With the development of portable terminal devices, the demand for battery life of portable terminal devices has received unprecedented attention. At present, most portable terminal devices support reverse charging function, and using the reverse charging function of portable terminal devices to charge portable terminal devices that need to be charged has become a popular charging solution.

[0004] However, the existing reverse charging solutions have the problem of low external charging power and cannot meet the high-power fast charging requirements expected by users. Summary of the invention

[0005] The present application provides an electronic device for realizing high-power reverse charging and meeting the user's demand for high-power reverse fast charging.

[0006] To achieve the above objectives, the embodiments of the present application adopt the following technical solutions:

[0007] An electronic device includes a battery, at least one charging interface, a PD controller, a first reverse charging link, at least one second reverse charging link, and a controller. The charging interface is used to connect an external device. The PD controller is coupled to the charging interface and is used to obtain connection information of the charging interface; the connection information is used to indicate the connection state of the charging interface, which is a connected state or a non-connected state; the connection information is also used to indicate the device type of the external device and / or the electronic device when the charging interface is in a connected state, and the device type is an output device or a receiving device; the PD controller has at least one power output terminal. The first reverse charging link includes a battery charging controller; the battery charging controller includes a positive charging state and a reverse charging state. The charging interface is coupled to the battery through the first reverse charging link. A charging interface is also connected to a power output terminal through a second reverse charging link. The controller is coupled to the PD controller, the battery charging controller, and the second reverse charging link. The controller is used to control the battery charging controller to switch to the reverse charging state and control the target link to be shut down when it is determined that the electronic device meets the first preset condition based on the connection information of at least one charging interface. Among them, the first preset condition includes that the electronic device is not in a forward charging state, and any one or more charging interfaces are connected to a receiving device; the target link includes a second reverse charging link corresponding to the charging interface connected to the receiving device.

[0008] In this electronic device, when the electronic device is not in a forward charging state, the reverse output function (i.e., reverse charging state) of the battery charging controller is utilized to allow the battery to provide power output to the receiving device connected to the charging interface via the target link through the battery charging controller, thereby realizing the reverse charging function. Since the electronic device realizes reverse charging through a battery with a larger capacity, it can achieve a greater power output, thus meeting the user's high-power fast charging needs.

[0009] In some design schemes of the present application, the controller is also used to: when it is determined that the electronic device meets a second preset condition, control the battery charging controller to switch to a positive charging state and control the target link to be turned on; wherein the second preset condition includes that the electronic device is in a positive charging state.

[0010] It should be noted that the battery charging controller has a forward output function (i.e., positive charging state) and a reverse output function (i.e., reverse charging state). Since only the forward output function of the battery charging controller is currently used, there is only one path in the hardware design, so it is impossible to support the existence of two functions at the same time. Based on this, in order to give priority to ensuring the normal operation of the electronic device itself, this embodiment controls the battery charging controller to switch to the positive charging state when the electronic device is in the forward charging state to ensure the forward charging function of the electronic device. At the same time, the target link is controlled to be turned on so that the PD controller can provide power output. In this way, when there are more than two charging interfaces, the power output provided by the PD controller can be used to achieve reverse charging, thereby meeting the user's need to use the electronic device to reverse charge the external device.

[0011] In some other design schemes of the present application, the controller is also used to: when it is determined that the electronic device meets the second preset condition, control the battery charging controller to switch to the positive charging state, and control the target link to be turned on; wherein the second preset condition includes one of the following situations: the electronic device is in the forward charging state; the second preset condition also includes that the electronic device is not in the forward charging state, and no receiving device is connected to any charging interface.

[0012] In this design, not only when the electronic device is in the forward charging state, the reverse output function of the battery charging controller is turned off, and the external output function of the PD controller is turned on to ensure the forward charging function of the electronic device, but also when the first interface and the second interface are both in a non-connected non-forward charging state (that is, the electronic device is not in the forward charging state), the forward charging function of the electronic device is ensured. In other words, when the electronic device is not charged (neither forward charging nor reverse charging), this design adjusts the electronic device to a ready state for providing the forward charging function by default, and can achieve forward charging without link switching when forward charging is required, thereby facilitating the user experience of the forward charging function of the electronic device, which is a common function.

[0013] In some embodiments of the present application, the target link also includes other links in at least one second reverse charging link except the second reverse charging link corresponding to the charging interface connected to the receiving device.

[0014] It should be noted that when the electronic device meets the first preset condition, the first reverse charging link is used for reverse charging, and all the second reverse charging links are not used. Therefore, all the second reverse charging links except the second reverse charging link corresponding to the charging interface connected to the receiving device can be turned off at the same time. When the electronic device meets the second preset condition, the second reverse charging link is used for reverse charging, thereby controlling all the second reverse charging links to be turned on. Compared with the embodiment in which the target link only includes the second reverse charging link corresponding to the charging interface connected to the receiving device, in this embodiment, when the electronic device meets the first preset condition, all the second reverse charging links are controlled to be turned off, and when the second preset condition is met, all the second reverse charging links are controlled to be turned on. There is no need to identify the charging interface connected to the receiving device and control the corresponding second reverse charging link to be turned off or turned on. Obviously, this embodiment is conducive to reducing the control complexity.

[0015] Exemplarily, at least one charging interface includes a first interface and a second interface; at least one second reverse charging link includes a first sub-link and a second sub-link; at least one power output terminal includes a first power output terminal and a second power output terminal. The first interface is connected to the first power output terminal through the first sub-link, and the second interface is connected to the second power output terminal through the second sub-link.

[0016] In some embodiments of the present application, when the first interface and / or the second interface is connected to an output device, the electronic device is in a forward charging state. When neither the first interface nor the second interface is connected to an output device, the electronic device is not in a forward charging state.

[0017] Specifically, the first interface and / or the second interface is connected to an output device, including one of the following situations:

[0018] The first interface is connected to the output device, and the second interface is connected to the output device;

[0019] The first interface is connected to an output device, and the second interface is connected to a receiving device;

[0020] The first interface is connected to the output device, and the second interface is in a disconnected state;

[0021] The first interface is connected to a receiving device, and the second interface is connected to an output device;

[0022] The first interface is in a non-connected state, and the second interface is connected to an output device.

[0023] Specifically, the first interface and the second interface are not connected to an output device, including one of the following situations:

[0024] The first interface is connected to the receiving device, and the second interface is in a non-connected state;

[0025] The first interface is connected to the receiving device, and the second interface is connected to the receiving device;

[0026] The first interface is in a non-connected state, and the second interface is connected to a receiving device;

[0027] The first interface is in a disconnected state, and the second interface is in a disconnected state.

[0028] In some embodiments of the present application, the first sub-link includes a first switch element. The second sub-link includes a second switch element. The first end of the first switch element is coupled to the first interface, and the second end of the first switch element is coupled to the first power supply output end. The first end of the second switch element is coupled to the second interface, and the second end of the second switch element is coupled to the second power supply output end. The third end of the first switch element and the third end of the second switch element are both coupled to the controller; the controller is used to output a first control instruction and a second control instruction, the first control instruction is used to instruct the first switch element to switch to a closed state or an open state, and the second control instruction is used to instruct the second switch element to switch to a closed state or an open state; wherein, when the first switch element and the second switch element are switched to a closed state, the first sub-link and the second sub-link are turned off; when the first switch element and the second switch element are switched to an open state, the first sub-link and the second sub-link are turned on.

[0029] In this embodiment, by respectively setting the first switch element and the second switch element on the first sub-link and the second sub-link, the on-off of the first switch element and the second switch element can be controlled, so that the switching of the reverse charging link of the electronic device can be realized.

[0030] In some embodiments of the present application, the electronic device further includes a third switch element. The first end of the third switch element is coupled to the battery charging controller, the second end of the third switch element is coupled to the reference ground, and the third end of the third switch element is coupled to the controller. The controller is also used to output a third control instruction. The third control instruction is used to instruct the third switch element to switch between a closed state and an open state; when the third switch element is switched to a closed state, the battery charging controller switches to a reverse charging state; when the third switch element is switched to an open state, the battery charging controller switches to a positive charging state.

[0031] In this embodiment, the state switching of the battery charging controller is achieved by setting a third switch element and controlling the on and off of the third switch element, thereby achieving the switching of the reverse charging link of the electronic device.

[0032] In some embodiments of the present application, the connection information is also used to indicate the current parameters and voltage parameters required by the external device when the external device is a receiving device. The controller is coupled to the battery charging controller, and the controller is also used to control the current and voltage when the battery charging controller switches to the reverse charging state for reverse charging according to the current parameters and voltage parameters.

[0033] In some designs, the controller is further used to: before reverse charging, determine whether the output power of the electronic device is greater than a preset threshold. When the output power of the electronic device is greater than the preset threshold, control the battery charging controller to switch to the reverse charging state for reverse charging.

[0034] In this embodiment, the electronic device provides power output only when the output power is greater than a preset threshold (ie, the power of the electronic device is sufficient), which is conducive to ensuring the normal operation of the electronic device itself.

[0035] Optionally, the electronic device is a personal computer (PC). The battery of the PC has a large capacity and is suitable for providing a reverse charging function. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 A circuit diagram of a possible reverse charging scheme for an electronic device;

[0037] Figure 2 for Figure 1 The flowchart of the electronic device shown is reverse charging;

[0038] Figure 3 Schematic diagram of the structure of the electronic device provided in some embodiments of the present application Figure 1 ;

[0039] Figure 4 Schematic diagram of the structure of the electronic device provided in some embodiments of the present application Figure 2 ;

[0040] Figure 5 A flow chart of a charging control method provided in an embodiment of the present application. DETAILED DESCRIPTION

[0041] In the embodiments of the present application, the words "exemplarily" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplarily" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplarily" or "for example" is intended to present related concepts in a specific way.

[0042] In the embodiments of the present application, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features.

[0043] It should be understood that the terms used in the description of the various examples herein are only for describing specific examples and are not intended to be limiting. As used in the description of the various examples, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.

[0044] In this application, "at least one" means one or more, and "more than one" means two or more. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can be represented by: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.

[0045] It should also be understood that the term "and / or" used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items. The term "and / or" is a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this application generally indicates that the associated objects before and after are in an "or" relationship.

[0046] It should also be understood that in this application, the term "coupling" refers to an electrical connection mode that can transmit electrical signals and should be understood in a broad sense, for example, "coupling" can be a direct connection or an indirect connection through an intermediate medium.

[0047] It should also be understood that the term “comprise” (also known as “includes,” “including,” “comprises” and / or “comprising”) when used in this specification specifies the presence of stated features, integers, steps, operations, elements, and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.

[0048] It should be understood that the "one embodiment", "another embodiment", "a possible design" mentioned throughout the specification means that the specific features, structures or characteristics related to the embodiment or implementation are included in at least one embodiment of the present application. Therefore, "in one embodiment of the present application" or "in another embodiment of the present application", "a possible design" appearing in various places throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner.

[0049] In order to better understand the solution of the present application, the technical terms involved in the embodiments of the present application are first explained.

[0050] With the development of portable terminal devices, the demand for battery life of portable terminal devices has received unprecedented attention. At present, most portable terminal devices support reverse charging function. Using the reverse charging function of portable terminal devices to charge portable terminal devices that need to be charged has become a popular charging solution. The following takes a personal computer (PC) as an example to explain the reverse charging solution of portable terminal devices.

[0051] Please refer to Figure 1 , Figure 1 The circuit diagram of a possible reverse charging scheme for an electronic device is shown in FIG. The electronic device is a PC, including a power delivery (PD) controller, a battery charging controller (also called a charger), a battery, and two Type-C interfaces, interface C1 and interface C2. Interface C1 and interface C2 are used to connect external devices to realize certain functions between the external device and the electronic device, such as a forward charging function (charging the electronic device from the external device) or a reverse charging function (charging the external device from the electronic device); the PD controller is used to perform interactive communication of the charging protocol with the external device; the battery charging controller is used to convert the voltage input by the external device through interface C1 or interface C2 into a suitable voltage, and give it to the devices and batteries of the PC that need to be powered, thereby realizing forward charging.

[0052] Among them, the PD controller has a power input terminal Vin, a first power output terminal Vout1, and a second power output terminal Vout2. The power input terminal Vin is used to receive the power supply voltage (such as 5V) input by the buck conversion (BUCK) circuit to ensure the normal operation of the PD controller. At the same time, the power input terminal Vin is also connected to the first power output terminal Vout1 and the second power output terminal Vout2 through the switch K1 and the switch K2 located inside the PD controller. It should be understood that by controlling the switch K1 and the switch K2 to be closed, the power input terminal Vin can be connected to the first power output terminal Vout1 and the second power output terminal Vout2, so that the power supply voltage input by the power input terminal Vin is output to the first power output terminal Vout1 and the second power output terminal Vout2, so that the PD controller has the ability to supply power to the outside. Figure 1 In the electronic device shown, the first power output terminal Vout1 is connected to the interface C1, and the second power output terminal Vout2 is connected to the interface C2. In this way, the PD controller can provide voltage output to the interface C1 and the interface C2 respectively through the first power output terminal Vout1 and the second power output terminal Vout2 to realize the reverse charging function.

[0053] Combine the following Figure 2 , taking interface C1 as an example, the process of performing reverse charging of an electronic device is described in detail.

[0054] Please refer to Figure 2 , Figure 2 for Figure 1 The flowchart of reverse charging of the electronic device shown includes the following steps:

[0055] S201, the electronic device recognizes the access of an external device, and performs CC handshake communication with the external device.

[0056] In the specific implementation process, when the interface C1 is connected to an external device, the interface C1 sends an interrupt to the PD controller. The PD controller recognizes the access of the external device based on the interrupt signal, and then performs handshake communication with the external device in the channel configuration (configuration channel, CC) channel to determine the type of the electronic device and the external device. Among them, if the type of the electronic device is an output device (also called a source device) and the external device is a receiving device (also called a sink device), it means that the electronic device is reversely charging the external device; if the electronic device is a sink device and the external device is an output device, it means that the external device is forwardly charging the electronic device. In this example, the electronic device is a source device and the external device is a sink device.

[0057] S202: If it is determined that the electronic device is an output device and the external device is a receiving device, the electronic device turns on the switch K1 and starts to reverse charge the external device.

[0058] It should be noted that in the above reverse charging process, according to the PD protocol, the maximum current is 3A. Affected by specification restrictions, the current output by the electronic device may be further limited. Figure 1 The electronic devices in the system can only provide a maximum of 15W (5V / 3A) charging power, which cannot meet the high-power fast charging needs expected by users. Figure 1 and Figure 2 Taking two interfaces as an example, the problem that electronic devices cannot meet the high-power fast charging requirements expected by users is explained, but in other embodiments, electronic devices including more or fewer interfaces still have the above problems. The principles that cause the above problems are similar and will not be repeated here.

[0059] In order to solve the above technical problems, the present application provides an electronic device. Exemplarily, the electronic device can be a power bank, a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, or other device that supports a reverse charging function. The embodiments of the present application do not impose any special restrictions on the specific form of the device.

[0060] It should be noted that Figure 1 In the reverse charging scheme shown, the function of the battery charging controller is to convert the power of the external device to the battery, but some battery charging controllers also have a reverse output function, which allows the battery to power the input end of the battery charging controller, so that the output end of the battery charging controller can provide power output. Currently, only the forward output function of the battery charging controller is used, so there is only one path in the hardware, and it is impossible to support the existence of two functions at the same time. Based on this, the embodiments of the present application are Figure 1 On the basis of the reverse output function of the battery charging controller, when the electronic device is not in the forward charging state, the battery provides power output through the battery charging controller to realize the reverse charging function. Since the electronic device realizes reverse charging through a battery with a larger capacity, it can achieve greater power output to meet the user's high-power fast charging needs.

[0061] The implementation of the embodiments of the present application will be described in detail below with reference to the accompanying drawings.

[0062] Please refer to Figure 3 , Figure 3 Schematic diagram of the structure of the electronic device provided in some embodiments of the present application Figure 1 .like Figure 3 As shown, the electronic device 300 may include a processor 310, an external memory interface 320, an internal memory 321, a universal serial bus (USB) interface 330, a charging management module 340, a power management module 341, a battery 342, an antenna 1, an antenna 2, a mobile communication module 350, a wireless communication module 360, an audio module 370, a speaker 370A, a receiver 370B, a microphone 370C, an earphone interface 370D, a sensor module 380, a button 390, a motor 391, an indicator 392, a camera 393, a display screen 394, and a subscriber identification module (SIM) card interface 396, etc.

[0063] It is to be understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device 300. In other embodiments, the electronic device 300 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0064] The processor 310 may include one or more processing units, for example, the processor 310 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0065] The controller may be the nerve center and command center of the electronic device 300. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.

[0066] The processor 310 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 310 is a cache memory. The memory may store instructions or data that the processor 310 has just used or cyclically used. If the processor 310 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 310, and thus improves the efficiency of the system.

[0067] In some embodiments, the processor 310 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0068] It should be noted that although Figure 3 Only one USB interface and the connection relationship of the USB interface are shown. However, it should be understood that in the embodiment of the present application, the electronic device 300 includes one or more USB interfaces 330. In the specific implementation process, the USB interface 330 can be a Type-C interface, etc.

[0069] It is understandable that the interface connection relationship between the modules shown in this embodiment is only a schematic illustration and does not constitute a structural limitation on the electronic device 300. In other embodiments, the electronic device 300 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0070] The charging management module 340 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 340 may receive charging input from a wired charger through the USB interface 330. In some wireless charging embodiments, the charging management module 340 may receive wireless charging input through a wireless charging coil of the electronic device 300. While the charging management module 340 is charging the battery 342, it may also power the electronic device through the power management module 341.

[0071] The PD module 343 is used to perform charging protocol communication with an external device coupled to the electronic device 300 via the USB interface 330 .

[0072] The power management module 341 is used to connect the battery 342, the charging management module 340 and the processor 310. The power management module 341 receives input from the battery 342 and / or the charging management module 340, and supplies power to the processor 310, the internal memory 321, the external memory, the display screen 394, the camera 393, and the wireless communication module 360. The power management module 341 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 341 can also be set in the processor 310. In other embodiments, the power management module 341 and the charging management module 340 can also be set in the same device.

[0073] The wireless communication function of the electronic device 300 can be implemented through the antenna 1, the antenna 2, the mobile communication module 350, the wireless communication module 360, the modem processor and the baseband processor.

[0074] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device 300 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0075] The mobile communication module 350 can provide solutions for wireless communications including 2G / 3G / 4G / 3G, etc., applied to the electronic device 300. The mobile communication module 350 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 350 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 350 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 350 can be set in the processor 310. In some embodiments, at least some of the functional modules of the mobile communication module 350 can be set in the same device as at least some of the modules of the processor 310.

[0076] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 370A, a receiver 370B, etc.), or displays an image or video through a display screen 394. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 310 and be set in the same device as the mobile communication module 350 or other functional modules.

[0077] The wireless communication module 360 ​​can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 300. The wireless communication module 360 ​​can be one or more devices integrating at least one communication processing module. The wireless communication module 360 ​​receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 310. The wireless communication module 360 ​​can also receive the signal to be sent from the processor 310, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0078] In some embodiments, the antenna 1 of the electronic device 300 is coupled to the mobile communication module 350, and the antenna 2 is coupled to the wireless communication module 360, so that the electronic device 300 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology, etc. GNSS may include the global positioning system (GPS), the global navigation satellite system (GLONASS), the Beidou navigation satellite system (BDS), the quasi-zenith satellite system (QZSS) and / or the satellite based augmentation system (SBAS).

[0079] The electronic device 300 implements the display function through a GPU, a display screen 394, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 394 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 310 may include one or more GPUs, which execute program instructions to generate or change display information.

[0080] The display screen 394 is used to display images, videos, etc. The display screen 394 is sometimes also referred to as a display module, which generally includes a display panel and a driving circuit for driving the display panel for display. Among them, the display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light emitting diode or an active-matrix organic light emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light emitting diode (QLED), etc. The driving module includes a display driver integrated circuit (DDIC) and an array composed of TFT devices, etc.

[0081] The electronic device 300 can realize the shooting function through ISP, camera 393, video codec, GPU, display screen 394 and application processor.

[0082] The ISP is used to process the data fed back by the camera 393. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converts it into an image visible to the naked eye. The ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. The ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP can be set in the camera 393.

[0083] The camera 393 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 300 may include 1 or N cameras 393, where N is a positive integer greater than 1.

[0084] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 300 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

[0085] Video codecs are used to compress or decompress digital videos. The electronic device 300 may support one or more video codecs. Thus, the electronic device 300 may play or record videos in a variety of coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.

[0086] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of electronic device 300 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.

[0087] The external memory interface 320 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 300. The external memory card communicates with the processor 310 through the external memory interface 320 to implement a data storage function, such as storing music, video and other files in the external memory card.

[0088] The internal memory 321 can be used to store computer executable program codes, and the executable program codes include instructions. The processor 310 executes various functional applications and data processing of the electronic device 300 by running the instructions stored in the internal memory 321. For example, in an embodiment of the present application, the processor 310 can detect the folding angle (i.e., the angle between adjacent screens) of the display screen 394 (i.e., the folding screen) by executing the instructions stored in the internal memory 321, and display the display content (i.e., the image) corresponding to the angle in response to the change of the angle. The internal memory 321 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data (such as audio data, a phone book, etc.) created during the use of the electronic device 300, etc. In addition, the internal memory 321 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0089] The electronic device 300 can implement audio functions such as music playing and recording through the audio module 370, the speaker 370A, the receiver 370B, the microphone 370C, the headphone jack 370D, and the application processor.

[0090] The audio module 370 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signal. The audio module 370 can also be used to encode and decode audio signals. In some embodiments, the audio module 370 can be set in the processor 310, or some functional modules of the audio module 370 are set in the processor 310. The speaker 370A, also known as the "speaker", is used to convert audio electrical signals into sound signals. The electronic device 300 can listen to music or listen to hands-free calls through the speaker 370A. The receiver 370B, also known as the "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 300 answers a call or voice message, the voice can be answered by placing the receiver 370B close to the human ear. The microphone 370C, also known as the "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message or when the electronic device 300 needs to be triggered to perform certain functions through a voice assistant, the user can speak near the microphone 370C with the human mouth to input the sound signal into the microphone 370C. The electronic device 300 may be provided with at least one microphone 370C. In other embodiments, the electronic device 300 may be provided with two microphones 370C, which may not only collect sound signals but also realize noise reduction. In other embodiments, the electronic device 300 may be provided with three, four or more microphones 370C, which may collect sound signals, reduce noise, identify sound sources, realize directional recording functions, etc.

[0091] The earphone interface 370D is used to connect a wired earphone and can be a USB interface 330 or a 3.3 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.

[0092] The key 390 includes a power key, a volume key, etc. The key 390 may be a mechanical key or a touch key. The electronic device 300 may receive key input and generate key signal input related to user settings and function control of the electronic device 300.

[0093] Motor 391 can generate vibration prompts. Motor 391 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 394, motor 391 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.

[0094] Indicator 392 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.

[0095] The SIM card interface 396 is used to connect a SIM card. The SIM card can be connected to and separated from the electronic device 300 by inserting it into the SIM card interface 396 or pulling it out from the SIM card interface 396. The electronic device 300 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 396 can support Nano SIM cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface 396 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 396 can also be compatible with different types of SIM cards. The SIM card interface 396 can also be compatible with external memory cards. The electronic device 300 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the electronic device 300 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 300 and cannot be separated from the electronic device 300.

[0096] Please refer to Figure 4 , Figure 4 Schematic diagram of the structure of the electronic device provided in some embodiments of the present application Figure 2 (like Figure 3 The electronic device 300 shown in FIG. 1 includes a battery, two charging interfaces (respectively a first interface and a second interface), a PD controller (such as Figure 3 The PD module 343 shown in the figure), the battery charging controller, the first reverse charging link (all the paths of the first reverse charging link marked in the figure constitute the first reverse charging link), the two second reverse charging links are respectively the first sub-link (all the paths of the first sub-link marked in the figure constitute the first sub-link) and the second sub-link (all the paths of the second sub-link marked in the figure constitute the second sub-link), and the controller (as shown in the figure Figure 3 It should be understood that the battery can be understood as a controller in the processor 310 shown. Figure 3 The battery 342 shown, the PD controller can be understood as Figure 3The PD module 343 shown, the controller can be understood as Figure 3 A controller in processor 310 is shown.

[0097] The battery is used to receive power input or provide power output.

[0098] The first interface and the second interface are both used for connecting the electronic device to an external device, such as a charger for charging the electronic device, a mobile phone that needs to be charged, etc. In the specific implementation process, the first interface and the second interface can be Type-C interfaces. It should be understood that in this embodiment, the first interface and the second interface can be in the following three states: neither is connected to an external device, one is not connected to an external device and the other is connected to an external device, and both are connected to an external device.

[0099] The PD controller is coupled to the first interface and the second interface respectively ( Figure 4 In the figure, the serial transmission bus (inter-integrated circuit, I2C) between the first interface and the PD controller, and the I2C between the second interface and the PD controller show the coupling relationship), and the PD controller is used to obtain the connection information of the first interface and the connection information of the second interface. The connection information is used to indicate the connection state of the charging interface, and the connection state includes a connected state or a non-connected state. Among them, the connected state means that the charging interface (such as the first interface or the second interface) is connected to an external device, and the non-connected state means that the charging interface is not connected to the external device. In addition, the connection information is also used to indicate the device type of the external device when the charging interface is connected to the external device (that is, in a connected state), and the device type includes a source device or a sink device. The source device is a device that provides power output, and the sink device is a device that receives power input. The following describes the process of the PD controller obtaining connection information by taking the first interface connected and not connected to the external device as an example, as follows:

[0100] When the external device disconnects from the first interface in response to the user's unplugging operation, the first interface sends a first interrupt signal to the PD controller. After receiving the first interrupt signal, the PD controller determines that the first interface is in a non-connected state based on the first interrupt signal; when the external device accesses the first interface in response to the user's access operation, the first interface sends a second interrupt signal to the PD controller. After receiving the second interrupt signal, the PD controller determines that the first interface is in a connected state based on the second interrupt signal. It should be noted that the PD controller has the function of performing charging protocol communication with the external device connected to the first interface. Based on this, when it is determined that the first interface is in a connected state, the PD controller will establish CC handshake communication with the external device to determine the device type of the external device. It should be understood that the external device and the electronic device are source devices and sink devices to each other, that is, one of the external device and the electronic device is a source device, and the other of the external device and the electronic device is a sink device.

[0101] In this embodiment, the connection information only indicates the device type of the external device. It should be understood that in other embodiments, the connection information may also indicate the device type of the electronic device, or indicate the device types of the electronic device and the external device at the same time. Since the external device and the electronic device are source devices and sink devices to each other, after determining the device type of one of the devices, the device type of the other device can be obtained. The embodiment of the present application does not specifically limit the object of the device type indicated by the connection information.

[0102] In addition, the PD controller has two power output terminals, namely a first power output terminal Vout1 and a second power output terminal Vout2. The first power output terminal Vout1 and the second power output terminal Vout2 are used to provide power output, such as 5V / 3A output.

[0103] The first interface is coupled to the first power output terminal Vout1 of the PD controller via the first sub-link, and the second interface is coupled to the second power output terminal Vout2 of the PD controller via the second sub-link. That is, one charging interface is connected to one power output terminal via a second reverse charging link. Based on this, the electronic device can use the first power output terminal Vout1 of the PD controller to reversely charge the external device connected to the first interface via the first sub-link; and can also use the second power output terminal Vout2 of the PD controller to reversely charge the external device connected to the second interface via the second sub-link. It should be understood that the first sub-link and the second sub-link can be understood as Figure 3 The link from USB interface 330 to PD module 343 is shown.

[0104] In a specific implementation process, the first sub-link includes a first switch element Q1; the second sub-link includes a second switch element Q2. The first end of the first switch element Q1 is coupled to the first interface, and the second end of the first switch element Q1 is coupled to the first power output terminal Vout1. The first end of the second switch element Q2 is coupled to the second interface, and the second end of the second switch element Q2 is coupled to the second power output terminal Vout2.

[0105] Exemplarily, the first switch element Q1 and the second switch element Q2 may be N-type transistors. In this case, the first end of the first switch element Q1 and the second switch element Q2 may be the source of the transistor, and the second end of the first switch element Q1 and the second switch element Q2 may be the drain of the transistor. In other embodiments, the first switch element Q1 and the second switch element Q2 may be switch chips. In the embodiment of the present application, when the switch element is a transistor, the first end of the switch element refers to the source of the transistor, the second end of the switch element refers to the drain of the transistor, and the third end of the switch element refers to the gate of the transistor, which will not be described in detail later.

[0106] In this embodiment, by respectively setting the first switch element Q1 and the second switch element Q2 on the first sub-link and the second sub-link, the on-off of the first switch element Q1 and the second switch element Q2 can be controlled, so that the switching of the reverse charging link of the electronic device can be realized.

[0107] In addition, the first interface and the second interface are also coupled to the battery through the first reverse charging link. The first reverse charging link is coupled to the battery charging controller. It is worth noting that in this embodiment, the battery charging controller includes a positive charging state (i.e., the positive output function) and a reverse charging state (i.e., the reverse output function). The fifth terminal D5 of the battery charging controller is used to receive an external control instruction, and in response to the external control instruction, the battery charging controller can switch to a positive charging state or a reverse charging state. When the battery charging controller works in the reverse charging state, the battery charging controller can control the first reverse charging link to perform reverse charging. At this time, the electronic device can use the battery to reversely charge the external device connected to the first interface and the second interface through the first reverse charging link; when the battery charging controller works in the positive charging state, the battery charging controller can control the first reverse charging link to perform forward charging. At this time, the electronic device can use the power input provided by the external device received through the first interface and the second interface, and then forward charge the battery through the first reverse charging link. At the same time, in some embodiments, power can also be supplied to other working components of the electronic device.

[0108] In a specific implementation process, the model of the battery charging controller may be BQ25713. This model of battery charging controller can operate in two states: positive charging state and reverse charging state.

[0109] It should be understood that the first reverse charging link can be understood as Figure 3 The link from the USB interface 330 to the battery 342 shown, the battery charging controller can be understood as Figure 3 The charging management module 340 is shown.

[0110] The controller may be an embedded controller (EC). The first terminal P1 (such as GPIO1) of the controller is coupled to the fifth terminal D5 of the battery charging controller, the second terminal P2 (such as GPIO1) of the controller is coupled to the first sub-link, the third terminal P3 (such as GPIO1) of the controller is coupled to the second sub-link, and the fourth terminal P4 of the controller is coupled to the PD controller (the I2C between the PD controller and the controller in the figure illustrates the coupling relationship). The controller is used to obtain the connection information of the first interface and the connection information of the second interface through the fourth terminal P4 of the controller, and is also used to control the battery charging controller to switch to the reverse charging state for reverse charging through the first terminal P1 of the controller when it is determined that the electronic device meets the first preset condition based on the connection information of the first interface and the connection information of the second interface, and control the target link to be shut down through the second terminal P2 and the third terminal P3 of the controller.

[0111] Among them, the first preset condition includes that the electronic device is in a non-forward charging state, and the first interface and / or the second interface is connected to a sink device. In addition, the target link includes a second reverse charging link corresponding to the charging interface of the first interface and the second interface connected to the sink device, that is, if only the first interface is connected to the sink device, the target link includes the first sub-link; if only the second interface is connected to the sink device, the target link includes the second sub-link; if both the first interface and the second interface are connected to the sink device, the target link includes the first sub-link and the second sub-link.

[0112] In a specific implementation process, the second terminal P2 of the controller is coupled to the third terminal of the first switch element Q1, and the third terminal P3 of the controller is coupled to the third terminal of the second switch element Q2. The controller is used to output a first control instruction through the second terminal P2 of the controller, and output a second control instruction through the third terminal P3 of the controller, and the first control instruction and the second control instruction are used to instruct the first switch element Q1 and the second switch element Q2 to switch to a closed state or an open state, respectively. When the first switch element Q1 and the second switch element Q2 are switched to a closed state, the first sub-link and the second sub-link are turned on; when the first switch element Q1 and the second switch element Q2 are switched to an open state, the first sub-link and the second sub-link are turned off.

[0113] Continuing with the above example, the third terminals of the first switch element Q1 and the second switch element Q2 may be gates of N-type transistors.

[0114] During the specific implementation process, the electronic device also includes a third switch element Q3. The first terminal P1 of the controller is coupled to the third terminal of the third switch element Q3, the second terminal of the third switch element Q3 is coupled to the fifth terminal D5 of the battery charging controller, and the first terminal of the third switch element Q3 is coupled to the reference ground. The controller is used to output a third control instruction through the first terminal P1 of the controller, and the third control instruction is used to instruct the third switch element Q3 to switch to a closed state or an open state, so that the third switch element Q3 outputs the above-mentioned external control instruction. When the third switch element Q3 switches to a closed state, the third switch element Q3 issues a first external control instruction, and the first external control instruction is used to instruct the battery charging controller to switch to a reverse charging state; when the third switch element switches to an open state, the third switch element Q3 issues a second external control instruction, and the second external control instruction is used to instruct the battery charging controller to switch to a positive charging state. The specific implementation of the third switch element Q3 can refer to the specific implementation of the first switch element Q1, which will not be repeated here.

[0115] In this embodiment, the state switching of the battery charging controller is realized by setting the third switch element Q3 and controlling the on and off of the third switch element Q3, so as to realize the switching of the reverse charging link of the electronic device. It should be noted that, since the state control terminal of the battery charging controller is in a high impedance state, the first terminal of the third switch element Q3 also needs to be connected to a pull-up resistor R.

[0116] It should be noted that when an electronic device is in a forward charging state, it means that the electronic device receives power input provided by an external device, thereby charging the battery; when the electronic device is not in a forward charging state, it means that the electronic device does not receive power input provided by an external device, thereby charging the battery.

[0117] It should be understood that when any one of the first interface and the second interface of the electronic device is connected to an external device and receives power input from the external device, or when both interfaces are connected to external devices and simultaneously receive power input from external devices connected to the two interfaces, the electronic device can be placed in a forward charging state. In addition, when neither the first interface nor the second interface receives power input from an external device, the electronic device may not be placed in a forward charging state.

[0118] According to the above content, if the device type of the external device connected to the charging interface of the electronic device is a source device, the electronic device receives the power input provided by the external device connected to the charging interface; conversely, if the charging interface of the electronic device is not connected to the source device, the electronic device does not receive the power input of the external device. Based on this, when the first interface and / or the second interface is connected to the source device (that is, one of the two charging interfaces or both are connected to the source device), it means that the electronic device is in a forward charging state; when neither the first interface nor the second interface is connected to the source device, it means that the electronic device is not in a forward charging state.

[0119] Exemplarily, the first interface and / or the second interface is connected to a source device, including one of the following situations:

[0120] The first interface is connected to the source device, and the second interface is connected to the source device;

[0121] The first interface is connected to a source device, and the second interface is connected to a sink device;

[0122] The first interface is connected to the source device, and the second interface is in a disconnected state;

[0123] The first interface is connected to a sink device, and the second interface is connected to a source device;

[0124] The first interface is in a disconnected state, and the second interface is connected to a source device.

[0125] Exemplarily, neither the first interface nor the second interface is connected to a source device, including one of the following situations:

[0126] The first interface is connected to the sink device, and the second interface is in a disconnected state;

[0127] The first interface is connected to a sink device, and the second interface is connected to the sink device;

[0128] The first interface is in a disconnected state, and the second interface is connected to a sink device;

[0129] The first interface is in a disconnected state, and the second interface is in a disconnected state.

[0130] Obviously, in the above first preset condition, the electronic device is not in a forward charging state, and the first interface and / or the second interface is connected to a sink device, including one of the following situations:

[0131] The first interface is connected to the sink device, and the second interface is in a disconnected state;

[0132] The first interface is in a disconnected state, and the second interface is connected to a sink device;

[0133] The first interface is connected to a sink device, and the second interface is connected to the sink device.

[0134] Based on this, during the specific implementation process, the controller can determine whether the first interface and the second interface meet one of the above three output conditions based on the connection information of the first interface and the connection information of the second interface. If so, it is determined that it meets the first preset condition; if not, it is determined that it does not meet the first preset condition. In the above three conditions, all are device types of external devices connected to the charging interface. Therefore, if the device type indicated by the connection information is the device type of the electronic device, another device type different from the device type indicated by the connection information can be determined as the device type of the external device connected to the charging interface.

[0135] Figure 4 In the electronic device shown, when the electronic device is not in a forward charging state, the reverse output function of the battery charging controller is used to allow the battery to provide power output to the sink device connected to the charging interface through the battery charging controller to achieve the reverse charging function. Since the electronic device achieves reverse charging through a battery with a larger capacity, it can achieve a greater power output to meet the user's high-power fast charging needs.

[0136] In addition, the industry's common reverse charging solution is Figure 1 On the basis of the PD controller and the BUCK circuit, a PD controller and a BUCK circuit are added to provide high-power fast charging to external devices. Adding the PD controller and the BUCK circuit is equivalent to a small charging system. In this case, the software configuration will be more complicated, the debugging will be more difficult, and the R&D investment cost will be much higher. Compared with this solution, Figure 4 The embodiment shown only uses a few switches and some logic controls to achieve external fast charging on the current architecture, saving device costs, reducing the complexity of hardware circuit design, saving PCB design space, reducing the difficulty of PCB, structure and other designs, and has great advantages in software configuration, debugging difficulty and R&D investment costs. In addition, the addition of more devices means an increase in the risk of product failure, so this embodiment also reduces the overall failure rate of the product.

[0137] Please continue to refer to Figure 4 In some embodiments of the present application, the controller is also used to: when it is determined that the electronic device meets a second preset condition, control the battery charging controller to switch to a positive charging state and control the target link to be turned on; wherein the second preset condition includes that the electronic device is in a positive charging state.

[0138] It should be noted that, in the above-mentioned second preset condition, the five situations in which the electronic device is in a forward charging state have been explained in the previous text and will not be repeated here. It can be seen from the foregoing content that the battery charging controller has a forward output function and a reverse output function. Since only the forward output function of the battery charging controller is currently used, there is only one path in the hardware design, and therefore it is impossible to support the existence of two functions at the same time. Based on this, in order to give priority to ensuring the normal operation of the electronic device itself, this embodiment controls the battery charging controller to switch to a positive charging state when the electronic device is in a forward charging state to ensure the forward charging function of the electronic device. At the same time, the target link is controlled to be turned on so that the PD controller provides power output and realizes reverse charging, thereby meeting the user's needs of using the electronic device to reversely charge an external device.

[0139] Of course, in other embodiments of the present application, the second preset condition may also include one of the following conditions:

[0140] The electronic device is in a positive charging state;

[0141] The electronic device is not in a forward charging state, and any charging interface is not connected to a sink device, that is, neither the first interface nor the second interface is connected to a sink device.

[0142] It should be noted that in the above second preset condition, the electronic device is not in a forward charging state, and any charging interface is not connected to a sink device, which means that the electronic device is not in a forward charging state. The fourth situation of the four situations: the first interface is in a non-connected state, and the second interface is also in a non-connected state. The four situations in which the electronic device is not in a forward charging state have been described in the previous text and will not be repeated here.

[0143] It can be seen that, different from the previous embodiment, this embodiment not only ensures the forward charging function of the electronic device by turning off the reverse output function of the battery charging controller and turning on the external output function of the PD controller when the electronic device is in the forward charging state, but also ensures the forward charging function of the electronic device when both the first interface and the second interface are in the non-connected non-forward charging state (i.e. not in the forward charging state). That is to say, when not charging (neither forward charging nor reverse charging), this embodiment adjusts the electronic device to the ready state of providing the forward charging function by default, and can achieve forward charging without link switching when forward charging is required, thereby facilitating the user experience of the forward charging function of the electronic device, which is a common function. It can be seen that in this embodiment, the second preset condition and the first preset condition complement each other and cover all states of the first interface and the second interface of the electronic device. Therefore, when the electronic device does not meet the first preset condition, the second preset condition is met; when the electronic device does not meet the second preset condition, the first preset condition is met.

[0144] Of course, in other embodiments, the situation where both the first interface and the second interface are in a non-connected state may also be regarded as the above-mentioned first preset condition, and the embodiments of the present application do not specifically limit this.

[0145] Please continue to refer to Figure 4 In some embodiments of the present application, the target link also includes other links in the two second reverse charging links except the second reverse charging link corresponding to the charging interface connected to the sink device. That is to say, when the controller determines that the electronic device meets the first preset condition, all the second reverse charging links are controlled to be turned off; when the controller determines that the electronic device meets the second preset condition, all the second reverse charging links are controlled to be turned on.

[0146] It should be noted that when the electronic device meets the first preset condition, reverse charging is performed by the first reverse charging link, and the two second reverse charging links are not used. Therefore, the other second reverse charging link of the two second reverse charging links, except for the second reverse charging link corresponding to the charging interface connected to the sink device, can be shut down at the same time.

[0147] When the electronic device meets the second preset condition, the second reverse charging link performs reverse charging. Taking the first interface connected to the source device for forward charging and the second interface connected to the sink device for reverse charging as an example, since the PD controller detects that the first interface is connected to the source device, it will control the internal switch to disconnect to cut off the path of providing power output to the first interface through the first sub-link. Based on this, when the electronic device meets the second preset condition, even if the two second reverse charging links are controlled to be turned on at the same time, the PD controller cannot provide power output to the first interface through the first sub-link, thereby avoiding affecting the forward charging process of the first interface. Compared with the embodiment in which the target link only includes the second reverse charging link corresponding to the charging interface connected to the sink device, in this embodiment, when the electronic device meets the first preset condition, all the second reverse charging links are controlled to be turned off, and when the second preset condition is met, all the second reverse charging links are controlled to be turned on, without identifying the charging interface connected to the sink device, and controlling the corresponding second reverse charging link to be turned off or turned on. Obviously, this embodiment is conducive to reducing the control complexity.

[0148] Please continue to refer to Figure 4 In some embodiments of the present application, the connection information is also used to indicate the current parameters and voltage parameters required by the external device when the external device is a sink device. The fifth terminal P5 of the controller is also coupled to the sixth terminal D6 of the battery charging controller (the I2C between the controller and the battery charging controller in the figure illustrates the coupling relationship), and the controller is also used to control the current and voltage of the battery charging controller during reverse charging according to the current parameters and voltage parameters.

[0149] Specifically, during CC communication during reverse charging, the external device will inform the electronic device of the current parameters and voltage parameters it needs. The PD controller will receive the current parameters and voltage parameters through the I2C between the first interface and the second interface, and report them to the controller. Based on the current parameters and voltage parameters, the controller can configure the registers of the battery charging controller to control the current and voltage during reverse charging of the battery charging controller.

[0150] It should be noted that, during the specific implementation process, the current and voltage when the electronic device uses the battery charging controller to perform high-power reverse charging are not achieved in one step, but are a process of gradual increase. For example, when the electronic device starts reverse charging, the electronic device will first configure the battery charging controller to reversely output a voltage of 5V, as well as the current parameters initially notified by the external device, usually a maximum of 3A. After that, the external device continues to inform the required voltage parameters and current parameters during CC communication with the PD controller. After receiving its voltage parameters and current parameters, the PD controller will report them to the controller, and the controller will reconfigure the current and voltage parts of the battery charging controller's register to achieve high-power reverse charging function.

[0151] Please continue to refer to Figure 4 In some embodiments of the present application, the controller is also used to: before reverse charging, determine whether the output power of the electronic device is greater than a preset threshold; when the output power of the electronic device is greater than the preset threshold, control the battery charging controller to switch to the reverse charging state for reverse charging.

[0152] In the specific implementation process, before reverse charging, the controller can obtain the maximum power output (i.e., output power) that the electronic device can provide by reading the current and voltage parts in the register of the battery charging controller. In this embodiment, when the output power of the electronic device is greater than the preset threshold (i.e., the power of the electronic device is sufficient), the power output is provided to the outside, which is conducive to ensuring the normal operation of the electronic device itself. In the specific implementation process, the size of the preset threshold can be adjusted according to actual needs.

[0153] Please continue to refer to Figure 4In some embodiments of the present application, a fourth switch element Q4 and a fifth switch element Q5 are provided on the link between the node X1 and the first interface of the first reverse charging link, and a sixth switch element Q6 and a seventh switch element Q7 are provided on the link between the node X1 and the second interface of the first reverse charging link. Among them, the first end of the fourth switch element Q4 is coupled to the first interface, the second end of the fourth switch element Q4 is coupled to the second end of the fifth switch element Q5, the first end of the fifth switch element Q5 is coupled to the battery charging controller, and the third end of the fourth switch element Q4 and the third end of the fifth switch element Q5 are coupled to the PD controller. The first end of the sixth switch element Q6 is coupled to the first interface, the second end of the sixth switch element Q6 is coupled to the second end of the seventh switch element Q7, the first end of the seventh switch element Q7 is coupled to the battery charging controller, and the third end of the sixth switch element Q6 and the third end of the seventh switch element Q7 are coupled to the PD controller.

[0154] The PD controller is coupled to the fourth switch element Q4, the fifth switch element Q5, the sixth switch element Q6 and the seventh switch element Q7, respectively, and is used to control the fourth switch element Q4, the fifth switch element Q5, the sixth switch element Q6 and the seventh switch element Q7 to close after the CC handshake is successful, so as to realize the conduction of the first reverse charging link. The specific implementation of the fourth switch element Q4, the fifth switch element Q5, the sixth switch element Q6 and the seventh switch element Q7 can refer to the specific implementation of the first switch element Q1, and will not be repeated here.

[0155] In this embodiment, the purpose of setting two switch devices on the link between the first reverse charging link and the first interface and the link between the first reverse charging link and the second interface is to prevent leakage. In other embodiments, one switch element may also be set, and this embodiment of the application does not specifically limit this.

[0156] In some embodiments of the present application, the electronic device further includes an eighth switch element Q8. The first end of the eighth switch element Q8 is coupled to the seventh end D7 of the battery charging controller, and the second end of the eighth switch element Q8 is coupled to the battery; that is, the second end D2 of the battery charging controller is coupled to the battery through the eighth switch element Q8. In addition, the third end of the eighth switch element Q8 is coupled to the fifth end of the battery charging controller, and the battery charging controller is used to control the on and off of the eighth switch element Q8 through the fifth end D5 of the battery charging controller to control the battery to output power or input power. The eighth switch element Q8 can be a P-type transistor or a switch chip.

[0157] In some embodiments of the present application, the first reverse charging link includes a ninth switch element Q9, a tenth switch element Q10, an eleventh switch element Q11, and a twelfth switch element Q12. The second end of the ninth switch element Q9 is coupled to the first interface and the second interface respectively, the first end of the ninth switch element Q9 is coupled to the second end of the tenth switch element Q10; and the first end of the tenth switch element Q10 is coupled to the ground. The second end of the eleventh switch element Q11 is coupled to the battery, the first end of the eleventh switch element Q11 is coupled to the second end of the twelfth switch element Q12; and the first end of the twelfth switch element Q12 is coupled to the ground. In addition, the first end of the ninth switch element Q9 and the second end of the tenth switch element Q10 are also coupled to the first end of the eleventh switch element Q11 and the second end of the twelfth switch element Q12 through the inductor L, forming a path of the first reverse charging link.

[0158] The third end of the ninth switch element Q9 is coupled to the first end D1 of the battery charging controller, the third end of the tenth switch element Q10 is coupled to the second end D2 of the battery charging controller, the third end of the eleventh switch element Q11 is coupled to the third end D3 of the battery charging controller, and the third end of the twelfth switch element Q12 is coupled to the fourth end D4 of the battery charging controller. The first end D1 of the battery charging controller can output a first driving instruction to the ninth switch element Q9, and the second end D2 of the battery charging controller can output a second driving instruction to the tenth switch element Q10, and the first driving instruction and the second driving instruction are used to drive the ninth switch element Q9 and the tenth switch element Q10 to alternately close and open at high speed, thereby controlling the first reverse charging link to perform forward charging; in addition, the third end D3 of the battery charging controller can output a third driving instruction to the eleventh switch element Q11, and the second end D2 of the battery charging controller can output a fourth driving instruction to the twelfth switch element Q12, and the third driving instruction and the fourth driving instruction are used to drive the eleventh switch element Q11 and the twelfth switch element Q12 to alternately close and open at high speed, thereby controlling the first reverse charging link to perform reverse charging.

[0159] Of course, in other embodiments, the ninth switch element Q9 and the tenth switch element Q10 may be used to achieve voltage boost, while the eleventh switch element Q11 and the twelfth switch element Q12 are used to achieve voltage reduction, which is not specifically limited in the embodiments of the present application.

[0160] During the specific implementation, the first driving instruction and the second driving instruction are pulse width modulation (PWM) signals respectively.

[0161] Please refer to Figure 5 , Figure 5 A flow chart of a charging control method provided in an embodiment of the present application. Figure 4 Based on the electronic device shown in FIG. 1 , the first interface is connected to the external device at time t1, and the second interface is connected to the external device at time t2. In addition, it should be noted that: Figure 5 In the embodiment shown, the first preset condition and the second preset condition are either one or the other. The charging control method includes:

[0162] S501, the controller controls the first sub-link and the second sub-link to be turned on, and controls the battery charging controller to switch to a positive charging state.

[0163] After the electronic device is powered on, by default, the reverse output function of the battery charging controller is turned off, and the reverse charging path from the PD controller to the first interface and the second interface is turned on to ensure the user experience of the commonly used forward charging function.

[0164] During the specific implementation process, the controller can achieve the above purpose by raising P1, P2, and P3.

[0165] S502: The controller detects that an external device is connected to the first interface at time t1, and determines whether the electronic device meets a first preset condition based on connection information of the first interface and connection information of the second interface.

[0166] If yes, execute S503; if no, execute S501.

[0167] The foregoing content has described in detail how to detect and how to determine whether the electronic device meets the first preset condition based on the connection information, which will not be repeated here.

[0168] S503: The controller controls the first sub-link and the second sub-link to be turned off, and controls the battery charging controller to switch to a reverse charging state.

[0169] During the specific implementation process, the controller can achieve the above purpose by lowering P1, P2, and P3.

[0170] S504: The controller controls the current and voltage of the battery charging controller during reverse charging based on the connection information of the first interface.

[0171] The above content has already detailed how to control the current and voltage of the battery charging controller to achieve the purpose of high-power charging, which will not be repeated here.

[0172] S505: The controller detects that an external device is connected to the second interface at time t2, and determines whether the electronic device meets a first preset condition based on the connection information of the first interface and the connection information of the second interface.

[0173] If yes, continue to execute S503; if no, continue to execute S501.

[0174] It should be noted that although Figure 4 and Figure 5 Take the example of an electronic device including two charging interfaces. In other embodiments, the electronic device may include more or fewer charging interfaces, and the specific implementation is similar to the two charging interfaces. The difference is that the number of the second reverse charging link, the power output terminal of the PD controller, and the number of branches from the node X1 to the charging interface on the first reverse charging link are consistent with the charging interface, and one charging interface is connected to the power output terminal of a PD controller through a second reverse charging link, and is also coupled to the battery through a branch from the charging interface to the node X1 on the first reverse charging link. The embodiments of this application will not be described in detail.

[0175] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A charging method, applied to an electronic device, the electronic device comprising a first interface, a battery charging controller and a battery, the first interface being connected to the battery through the battery charging controller; characterized in that: The method comprises: When a first condition is met, the battery charging controller receives the electric energy provided by the battery and provides an electric energy output of a first power to the first interface for reverse charging; wherein the first condition includes that the first interface is connected to an external device that receives power input; When a second condition is met, the battery charging controller receives power input from the first interface and performs positive charging on the battery; wherein the second condition includes that the first interface is connected to an external device that provides power output.

2. The method according to claim 1, characterized in that The first condition also includes: the power level of the battery is greater than a preset power threshold.

3. The method according to claim 1 or 2, characterized in that: When the first condition is met, before the battery charging controller receives the electric energy provided by the battery and provides the first interface with electric energy output of the first power for reverse charging, the method further includes: The electronic device provides an electrical energy output of a second power to the first interface; wherein the maximum value of the second power is smaller than the maximum value of the first power.

4. The method according to any one of claims 1 to 3, characterized in that: The maximum value of the first power is greater than 15W.

5. The method according to any one of claims 1 to 4, characterized in that The battery charging controller receives the electric energy provided by the battery and provides the electric energy output of the first power to the first interface for reverse charging, including: The battery charging controller receives the voltage provided by the battery, processes the voltage provided by the battery and provides an electric energy output of a first power to the first interface for reverse charging.

6. The method according to any one of claims 1 to 5, characterized in that The battery charging controller receives the power input from the first interface and performs positive charging on the battery, comprising: The battery charging controller receives the voltage from the first interface, processes the voltage from the first interface, and then performs positive charging on the battery.

7. The method according to any one of claims 1 to 6, characterized in that The battery charging controller is a charger.

8. The method according to any one of claims 1 to 7, characterized in that: The electronic device further comprises a PD controller, and the PD controller is connected to the first interface; Before forward charging or reverse charging, the method further includes: The PD controller receives connection information through the first interface; The connection information is used to indicate a device type of the external device, where the device type includes a device that receives power input or a device that provides power output.

9. The method according to claim 8, characterized in that The electronic device further comprises a controller connected to the PD controller and the battery charging controller; The method further comprises: The controller obtains the connection information from a port connected to the PD controller; Based on the connection information indicating that the external device is the device receiving power input, the controller controls the battery charging controller to switch to a reverse charging state; Based on the connection information indicating that the external device is the device providing power input, the controller controls the battery charging controller to switch to a positive charging state.

10. The method according to claim 9, characterized in that The connection information is also used to indicate the current parameters and voltage parameters required by the external device when the type of the external device is a device that receives power input; The method further comprises: The controller controls the current and voltage when the battery charging controller switches to the reverse charging state for reverse charging according to the current parameter and the voltage parameter.

11. The method according to claim 9 or 10, characterized in that: The electronic device further comprises a first sub-link, the first sub-link being connected to the first interface, the controller and the PD controller; The method further comprises: Based on the connection information indicating that the type of the external device is the device receiving power input, the controller further controls the first sub-link to be shut down; Based on the connection information indicating that the type of the external device is the device providing power input, the controller further controls the first sub-link to be turned on.

12. The method according to claim 11, characterized in that The first sub-link includes a first switch device, the first switch device is connected to the first interface, the PD controller and the controller; The controller controls the first sub-link to be turned off, including: the controller controls the first switch element to be in a closed state; The controller controls the first sub-link to be turned on, including: the controller controls the first switch element to be in an off state.

13. The method according to any one of claims 9 to 12, characterized in that: The electronic device further comprises a third switch element, wherein the third switch element is connected to the battery charging controller and the controller; The controller controls the battery charging controller to switch to a positive charging state, including: The controller controls the third switch element to switch to an off state, so that the battery charging controller switches to a positive charging state; The controller controls the battery charging controller to switch to a reverse charging state, including: The controller controls the third switch element to switch to a closed state, so that the battery charging controller switches to a reverse charging state.

14. The method according to any one of claims 9 to 13, characterized in that: The controller is an embedded controller.

15. An electronic device, characterized in that: include: A battery, a first interface and a battery charging controller, wherein the first interface is used to connect an external device, one end of the battery charging controller is connected to the battery, and the other end of the battery charging controller is connected to the first interface; When a first condition is met, the battery charging controller is used to receive the electric energy provided by the battery and provide an electric energy output of a first power to the first interface for reverse charging; wherein the first condition includes that the first interface is connected to an external device that receives power input; When a second condition is met, the battery charging controller is used to receive power input from the first interface and forward charge the battery; wherein the second condition includes that the first interface is connected to an external device that provides power output.

16. The electronic device according to claim 15, characterized in that: The maximum value of the first power is greater than 15W.

17. The electronic device according to claim 15 or 16, characterized in that: The battery charging controller is a charger.

18. The electronic device according to any one of claims 15 to 17, characterized in that: The electronic device also includes a PD controller, which is connected to the first interface and is used to receive connection information through the first interface before forward charging or reverse charging; wherein the connection information is used to indicate a device type of the external device, and the device type includes a device that receives power input or a device that provides power output.

19. The electronic device according to claim 18, characterized in that: The electronic device further comprises a controller connected to the PD controller and the battery charging controller; The controller is used to obtain the connection information from the port connected to the PD controller; Based on the connection information indicating that the type of the external device is the device receiving power input, the controller is used to control the battery charging controller to switch to a reverse charging state; Based on the connection information indicating that the type of the external device is the device providing power input, the controller is used to control the battery charging controller to switch to a positive charging state.

20. The electronic device according to claim 19, characterized in that The electronic device further comprises a first sub-link, the first sub-link being connected to the first interface, the controller and the PD controller; Based on the connection information indicating that the type of the external device is the device receiving power input, the controller is further used to control the first sub-link to be shut down; Based on the connection information indicating that the type of the external device is the device providing power input, the controller is further configured to control the first sub-link to be turned on.

21. The electronic device according to claim 20, characterized in that: The first sub-link includes a first switch device connected to the first interface, the PD controller, and the controller.

22. The electronic device according to any one of claims 19 to 21, characterized in that: The electronic device further comprises a third switch element connected to the battery charging controller and the controller.

23. The electronic device according to any one of claims 19 to 22, characterized in that: The controller is an embedded controller.

24. The electronic device according to any one of claims 15 to 23, characterized in that: The electronic device is a personal computer PC.