Charging control method, device, terminal equipment and storage medium

After the fast charging logic control circuit's transceiver function resets, the data pin of the USB interface is set to pull-down mode and outputs a low level, the problem of disconnection and reconnection of the fast charging adapter that does not comply with the fast charging protocol is solved, and the charging stability and user experience are improved.

CN115441528BActive Publication Date: 2025-09-02GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110625581.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-04
Publication Date
2025-09-02
Estimated Expiration
2041-06-04

AI Technical Summary

Technical Problem

Fast charging adapters that do not meet the fast charging protocol have the problem of probabilistic disconnection and reconnection, resulting in abnormal charging.

Method used

When resetting the transceiver function of the fast charging logic control circuit, set the data pin of the USB interface to pull-down mode and output a low level through the data pin to eliminate floating voltage and glitch superimposed signals, and avoid the fast charging adapter misjudged as allowing fast charging signals.

Benefits of technology

It effectively prevents the probability of disconnection and reconnection caused by floating pressure and glitch signals of the fast charging adapter, and improves charging stability and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115441528B_ABST
    Figure CN115441528B_ABST
Patent Text Reader

Abstract

The present application discloses a charging control method, apparatus, terminal device, and storage medium, belonging to the field of charging technology, capable of resolving the problem of probabilistic disconnection and reconnection of adapters that do not comply with the fast charging protocol. The method is applied to a terminal device including a fast charging logic control circuit and a universal serial bus (USB) interface, and comprises: upon resetting the transceiver function of the fast charging logic control circuit, setting the data pin of the USB interface to a pull-down mode via the fast charging logic control circuit; in the pull-down mode, outputting a low level via the data pin.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of charging technology, and in particular to a charging control method, apparatus, terminal device and storage medium. Background Art

[0002] With the rapid development of fast charging technology, the charging efficiency of terminal devices is getting higher and higher.

[0003] In the process of charging the terminal device using a fast charging adapter, the communication between the terminal device and the fast charging adapter must comply with the fast charging protocol. However, in pursuit of high charging efficiency and in order to save costs, some fast charging adapters are not strictly designed in hardware in accordance with the fast charging protocol. Therefore, when charging without using the fast charging mode, the adapter may generate floating voltage and several hundred millivolts (mv) of burrs, and transmit the superimposed signal of the floating voltage and burrs to the terminal device through the data pin of the Universal Serial Bus (USB) interface. Then, when the fast charging adapter collects the data replied by the terminal device through the data pin of the USB interface, after collecting the superimposed signal, it will be regarded as the signal of allowing fast charging replied by the terminal device, thereby starting the fast charging mode. However, in fact, the terminal device does not allow fast charging and does not respond to the fast charging request of the fast charging adapter. This will cause charging abnormalities, resulting in the phenomenon that the connection between the terminal device and the fast charging adapter is disconnected and reconnected, and the charging icon disappears for a short time and then reappears.

[0004] In this way, fast charging adapters that do not comply with the fast charging protocol may have the problem of probabilistic disconnection and reconnection. Summary of the Invention

[0005] The embodiments of the present application provide a charging control method, apparatus, terminal device, and storage medium to solve the problem of probabilistic disconnection and reconnection of adapters that do not comply with the fast charging protocol.

[0006] A first aspect of an embodiment of the present application provides a charging control method, which is applied to a terminal device including a fast charging logic control circuit and a universal serial bus (USB) interface. The method includes: when resetting the transceiver function of the fast charging logic control circuit, setting the data pin of the USB interface to a pull-down mode through the fast charging logic control circuit; in this pull-down mode, outputting a low level through the data pin.

[0007] According to a second aspect of an embodiment of the present application, a charging control device is provided, which includes a fast charging logic control circuit and a universal serial bus (USB) interface. The device includes: a setting module and an output module; the setting module is used to set the data pin of the USB interface to a pull-down mode through the fast charging logic control circuit when resetting the transceiver function of the fast charging logic control circuit; the output module is used to output a low level through the data pin in the pull-down mode set by the setting module.

[0008] According to a third aspect of an embodiment of the present application, a terminal device is provided, which includes a processor, a memory, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the steps of the charging control method described in the first aspect are implemented.

[0009] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the charging control method described in the first aspect are implemented.

[0010] In a fifth aspect of an embodiment of the present application, a chip is provided, which includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is used to run program instructions to implement the charging control method as described in the first aspect.

[0011] In the embodiment of the present application, when the transceiver function of the fast charge logic control circuit is reset, the data pin of the USB interface can be set to a pull-down mode through the fast charge logic control circuit; in this pull-down mode, a low level is output through the data pin. In this solution, when the terminal device resets the transceiver function of the fast charge logic control circuit during "fake charging", full fast charging, or over-temperature, the data pin of the USB interface is set to a pull-down mode, and the superimposed signal of the floating voltage and the glitch is line-ANDed through the pull-down resistor to achieve the data pin outputting a low level. In this way, the fast charge adapter will not probabilistically collect a high-level signal of "falsely allowing fast charging" due to the superimposed signal of the floating voltage and the glitch, which will cause the fast charge adapter to disconnect and reconnect. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments and the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application, and other drawings can be obtained based on these drawings.

[0013] Figure 1 A block diagram of a solution for controlling fast charging logic through ADSP+VOOCPHY provided in an embodiment of the present application;

[0014] Figure 2 A schematic diagram of the structure of a frame of fast charging data in a fast charging protocol provided in an embodiment of the present application;

[0015] Figure 3 A schematic diagram of the output voltage of a fast charging adapter provided in an embodiment of the present application;

[0016] Figure 4 A schematic diagram of an implementation environment of a charging control method provided in an embodiment of the present application;

[0017] Figure 5A This is a flow chart of a charging control method according to an embodiment of the present application;

[0018] Figure 5B This is a second flow chart of the charging control method provided in an embodiment of the present application;

[0019] Figure 5C This is a third flow chart of the charging control method provided in an embodiment of the present application;

[0020] Figure 5D This is a fourth flow chart of the charging control method provided in an embodiment of the present application;

[0021] Figure 5E This is a fifth flow chart of the charging control method provided in an embodiment of the present application;

[0022] Figure 5F Flowchart 6 of the charging control method provided in the embodiment of the present application;

[0023] Figure 5G Flowchart 7 of the charging control method provided in the embodiment of the present application;

[0024] Figure 6 A structural block diagram of a charging control device provided in an embodiment of the present application;

[0025] Figure 7 A structural block diagram of a terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0026] The following will be combined with the accompanying drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the embodiments described are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field are within the scope of protection of this application.

[0027] The terms "first," "second," and the like in the specification and claims of this application are used to distinguish similar objects, and are not used to describe a specific order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, so that the embodiments of this application can be implemented in an order other than that illustrated or described herein, and that the objects distinguished by "first," "second," and the like are generally of the same type, and do not limit the number of objects; for example, the first object can be one or more. In addition, the term "and / or" in the specification and claims refers to at least one of the connected objects, and the character " / " generally indicates that the objects connected are in an "or" relationship.

[0028] First, some nouns or terms involved in the claims and description of the present invention are explained below.

[0029] Fast charging: This refers to rapid charging, in which the terminal device restores the battery to a fully charged state in a relatively short period of time.

[0030] Fake charging: When the fast charging adapter is inserted but before entering the fast charging mode, the fast charging icon is displayed, but it is actually normal charging, not fast charging.

[0031] Overtemperature: The battery temperature is too low or too high, that is, the battery temperature is less than or equal to a first threshold, or the battery temperature is greater than or equal to a second threshold, where the first threshold is less than the second threshold.

[0032] Fast charging full: refers to the state of fast charging, the battery power is greater than or equal to the third threshold.

[0033] Exit fast charging and enter normal charging: Exit fast charging mode and enter normal charging mode.

[0034] After connecting the fast charge adapter, the situations in which the fast charge icon is displayed include but are not limited to: fast charging process; fake charging process; after entering fast charging mode, fast charging is full but no longer fast charging is performed, but the fast charge icon is displayed; after entering fast charging mode, the process of overheating and switching from fast charging to normal charging is performed, and no longer fast charging is performed but the fast charge icon is displayed.

[0035] Mutex: A simple locking method to control access to shared resources. Mutex has only two states: locked and unlocked.

[0036] Dedicated Charging Port (DCP): This port does not support any data transfer but can provide a current of at least 1.5A. The D+ and D- lines of the port are short-circuited. This type of port supports high-capacity wall and car chargers. It is essentially a simple charger; when the USB port is in this mode, it can only charge and not connect to data.

[0037] Load capacity refers to the size of the load that can be carried.

[0038] With the rapid development of charging technology, a large number of fast-charging technologies have emerged, including Power Delivery (PD), Quick Charge (QC), VOOC (Voltage of Charge Over Voltage), and SuperVOOC (SVOOC). VOOC 3.0 has a charging voltage of 5 volts (V) and a current of 6 amperes (A), recorded as 5V / 6A. SuperVOOC 2.0 offers 65 watts (W) and 50W. In addition, fast-charging technologies include the 125W Programmable Power Supply (PPS).

[0039] For VOOC and SVOOC, initially, the charging logic of the terminal device was controlled by the application processor (AP), that is, the AP can control both the fast charging logic and the general charging logic of the terminal device. Among them, the AP controls the fast charging hardware transceiver logic (referred to as the transceiver logic) and the fast charging monitoring logic (that is, the AP controls the fast charging MCU) through the fast charging microcontroller unit (MCU), and other fast charging logics are controlled by the AP. The fast charging MCU is an external fast charging chip arranged on the printed circuit board (PCB) of the terminal device. Later, in order to save costs (one MCU chip can be saved), the fast charging logic was moved from the AP to the advanced digital signal processor (ADSP), wherein the fast charging transceiver logic was integrated into the flash charging physical logic module (VOOCPHY) in the power management integrated circuit (PMIC) provided in the ADSP, hereinafter referred to as the solution of controlling the fast charging logic through ADSP+VOOCPHY.

[0040] Among them, for the solution of controlling the fast charging logic through the fast charging MCU, when the terminal device determines that it is not allowed to enter the fast charging mode or needs to exit the fast charging mode due to the battery temperature being overheated or the battery power being greater than or equal to the threshold, the terminal device will not switch to the PMIC when resetting the MCU. Therefore, when the terminal device is connected to a fast charging adapter that does not comply with the fast charging protocol, and the terminal device does not respond to the fast charging request of the fast charging adapter during "fake charging", fast charging is fully charged, or when overheating and fast charging is switched to normal charging, the floating pressure generated by the fast charging adapter and the superimposed signal of the burr will cause the fast charging adapter to reconnect.

[0041] Among them, for the solution of controlling the fast charging logic through ADSP+VOOCPHY, when the terminal device is connected to a fast charging adapter that does not comply with the fast charging protocol, and the terminal device does not respond to the fast charging request of the fast charging adapter during "fake charging", full fast charging, or over-temperature and switching from fast charging to normal charging, the floating pressure generated by the fast charging adapter and the superimposed signal of the burr will cause the fast charging adapter to be probabilistically disconnected and reconnected.

[0042] Among them, the block diagram of the solution of controlling fast charging logic through ADSP+VOOCPHY is as follows Figure 1 As shown in the figure, the ADSP directly controls the fast charging logic and the VOOCPHY-related fast charging transceiver logic. The PMIC, VOOCPHY, and USB physical logic module (USBPHY) are all integrated into the ADSP. The ADSP exchanges charging status information and USB-related status information through the GLINK bus. For example, the VOOCPHY receives the fast charging request data sent by the fast charging adapter and stores it in the corresponding register. The ADSP reads the request data from the corresponding register. The ADSP determines the reply data and stores it in the corresponding register. The VOOCPHY reads the reply data from the corresponding register and sends it to the adapter.

[0043] The USB interface pins include at least a voltage pin (VCC or vbus, red pin), a data line positive pin (DM or D+, white pin), a data line negative pin (DP or D-, green pin) and a ground pin (GND, black pin).

[0044] The following uses the solution of controlling fast charging logic through ADSP+VOOCPHY as an example to introduce the fast charging communication process in the fast charging protocol.

[0045] like Figure 2As shown in the figure, a frame of fast charging data in the fast charging protocol consists of 18 bits. Among them, the clock data is completely controlled by the fast charging adapter and obtained through D+. The communication data between the terminal device and the fast charging adapter is obtained through D-. The first 8 bits are the data sent by the fast charging adapter to the terminal device through VOOCPHY. VOOCPHY samples the level signal on D- under the guidance of the CLK clock line interrupt and saves it in the corresponding receive (RX) register, which contains the frame header + actual communication data; the last 10 bits are sent by the terminal device to the fast charging adapter through VOOCPHY. VOOCPHY shifts the bits in the transmit (TX) register to D- under the guidance of the CLK clock line interrupt sent by the adapter. Similarly, the last 10 bits contain the frame header and the actual data to be returned to the adapter. Among them, the frame key data in the first 8 bits is the adapter asking the terminal device whether it agrees to fast charging, recorded as command code A. After receiving the command code A, the terminal device will determine whether fast charging is indeed allowed. If allowed, the subsequent 10 bits of the reply to the adapter must include, in addition to the frame header, information allowing the fast charging adapter to fast charge. Once the adapter is replied to allow fast charging, there must be no abnormalities in the subsequent communication frames, that is, the data VOOCPHY replies to the adapter must meet the fast charging protocol standard, otherwise the adapter will cut off the fast charging mode, which is manifested by the vbus being disconnected and reconnected, and the charging icon disappearing for 1 second and then reappearing.

[0046] Whether a terminal device can perform fast charging is subject to power and temperature conditions. First, when the fast charging adapter is just inserted into the USB port of the terminal device, the terminal device will determine whether the current battery temperature and power level are within the fast charging range. If allowed, the fast charging mode will be activated, and the VOOCPHY and the fast charging adapter will be able to establish fast charging communication. If not allowed, the terminal device will get the fast charging adapter model (ID) after a few frames of communication, and then reset the VOOCPHY so that the VOOCPHY does not respond to the fast charging request sent by the fast charging adapter. That is, the fast charging adapter will continue to send fixed fast charging request frames to the VOOCPHY, but the VOOCPHY will not reply. Secondly, if the terminal device detects that the battery is overheated (the temperature is too low or too high) during the fast charging process, it will also reset the VOOCPHY so that the VOOCPHY does not respond to the fast charging request sent by the fast charging adapter. That is, the fast charging adapter will continue to send fixed fast charging request frames to the VOOCPHY, but the VOOCPHY will not reply. Furthermore, when the terminal device is fully charged and then switches from fast charging to normal charging, it will also reset VOOCPHY so that VOOCPHY will not respond to the fast charging request sent by the fast charging adapter. That is, the fast charging adapter will always send a fixed fast charging request frame to VOOCPHY, but VOOCPHY will not respond. In order to save costs, the hardware design of the fast charging adapter is not strictly in accordance with the fast charging protocol. In the case that VOOCPHY does not respond to the fast charging request of the fast charging adapter, Figure 3 As shown in the figure, there is a floating voltage of 1.2V (marked "31" indicates floating voltage) on the D- line, and a glitch of several hundred millivolts (marked "32" indicates glitch), which may cause a high voltage level. Therefore, when the floating voltage of 1.2V on the D- line is superimposed with a glitch signal of several hundred millivolts, the adapter will likely detect the high voltage level (caused by the floating voltage and glitch) and interpret it as the VOOCPHY reply allowing fast charging. In fact, the VOOCPHY does not reply, but due to the influence of the floating voltage and glitch, the adapter will detect the "same fast charging" data and perform fast charging. Then, the subsequent frames will inevitably be erroneous, both the frame header and the data, because the VOOCPHY does not reply at all. This situation will cause the adapter to disconnect and reconnect, affecting the user experience.

[0047] In order to solve the problem of probabilistic disconnection and reconnection caused by the fast charging adapter whose hardware design does not comply with the fast charging protocol, the embodiments of the present application provide a charging control method, apparatus, terminal device and storage medium. When resetting the transceiver function of the fast charging logic control circuit, the data pin of the USB interface can be set to a pull-down mode through the fast charging logic control circuit; in this pull-down mode, a low level is output through the data pin. In this solution, when "fake charging", fast charging is fully charged, or over-temperature is reversed from fast charging to normal charging, the terminal device resets the transceiver function of the fast charging logic control circuit, and sets the data pin of the USB interface to a pull-down mode. The superimposed signal of the floating voltage and the glitch is line-ANDed through the pull-down resistor to achieve the data pin outputting a low level. In this way, the fast charging adapter will not probabilistically collect the high-level signal of "false fast charging allowed" due to the superimposed signal of the floating voltage and the glitch, which will cause the fast charging adapter to disconnect and reconnect.

[0048] Figure 4 This is a schematic diagram of the implementation environment of a charging control method provided in an embodiment of the present application. Figure 4 The implementation environment includes a terminal device 401 and a fast charging adapter 402 (also referred to as a power adapter 402). The terminal device 401 and the fast charging adapter 402 can be connected through the USB interface of the terminal device 401, and the fast charging adapter 402 is connected to an external power supply.

[0049] In the embodiment of the present application, the terminal device 401 includes a battery, and the terminal device 401 is any device that needs to charge the battery. For example, the terminal device 401 can be a smart terminal device, a tablet computer, an e-reader, a smart speaker, etc. The embodiment of the present application does not limit the specific type of the terminal device 401. Among them, the terminal device 401 in the embodiment of the present application includes at least a fast charging logic control circuit and a universal serial bus USB interface.

[0050] The fast charging adapter 402 supports charging protocols of fast charging technologies such as VOOC, SVOOC, PD, and QC. The embodiment of the present application does not limit the fast charging protocols supported by the fast charging adapter 402.

[0051] The execution subject of the charging control method provided in the embodiment of the present application can be the above-mentioned terminal device, or it can be a functional module and / or functional entity in the terminal device that can implement the charging control method. The specific execution subject can be determined according to actual usage requirements, and the embodiment of the present application does not limit it.

[0052] The following describes in detail the charging control provided by the embodiments of the present application through specific embodiments and their application scenarios in conjunction with the accompanying drawings.

[0053] like Figure 5A As shown, the embodiment of the present application provides a charging control method. The following takes the execution subject as a terminal device as an example to exemplify the charging control method provided by the embodiment of the present application. The method may include the following steps 501 to 502.

[0054] 501. When resetting the transceiver function of the fast charge logic control circuit, the terminal device sets the data pin of the USB interface to a pull-down mode through the fast charge logic control circuit.

[0055] In an embodiment of the present application, the terminal device includes at least a fast charging logic control circuit and a terminal device with a universal serial bus USB interface.

[0056] Optionally, the fast charge logic control circuit may be an ADSP, which includes a VOOCPHY. The terminal device may reset the transceiver function of the fast charge logic control circuit by resetting the VOOCPHY, wherein setting the data pin of the USB interface to a pull-down mode through the fast charge logic control circuit includes: setting the data pin of the USB interface to a pull-down mode through the VOOCPHY; the fast charge logic control circuit may also be an AP. The AP includes a fast charge MCU, and the terminal device may reset the transceiver function of the fast charge logic control circuit by resetting the fast charge MCU, wherein setting the data pin of the USB interface to a pull-down mode through the fast charge logic control circuit includes: setting the data pin of the USB interface to a pull-down mode through the fast charge MCU; the fast charge logic control circuit may also be other circuits with transceiver functions, which is not limited in the embodiments of the present application.

[0057] In the embodiments of the present application, resetting the fast-charging MCU means that the software and hardware controlling the fast-charging MCU stop running and return to their initial state. Therefore, after resetting the fast-charging MCU, the fast-charging adapter will not respond to fast-charging requests. Resetting the VOOCPHY means controlling the VOOCPHY to stop hardware transmission and reception and return to its initial state. Therefore, after resetting the fast-charging VOOCPHY, the fast-charging adapter will not respond to fast-charging requests.

[0058] It can be understood that setting the pull-down mode is to connect a pull-down resistor at the data pin.

[0059] Optionally, the pull-down mode is a pull-down mode in a general-purpose input / output (GPIO) mode; the pull-down mode may also be newly added, that is, a line with a switch and a pull-down resistor are added at the data pin; it may also be other pull-down modes, which are not limited in the embodiments of the present application.

[0060] For example, Figure 5B As shown, the above step 501 can be specifically implemented through the following steps 501a to 501d.

[0061] 501a. The terminal device sets a mutex and locks it.

[0062] Understandably, in a multitasking operating system, multiple tasks running simultaneously may require access to the same resources, leading to inconsistent execution. Therefore, mutexes are required when multiple threads access shared resources simultaneously. When one thread locks a mutex, other threads must wait for it to unlock before accessing it. Mutexes are introduced within threads. Once a thread locks a mutex, it forcibly monopolizes access to the shared resource, blocking other threads from accessing the resource until it unlocks.

[0063] In an embodiment of the present application, a common resource is locked by a mutex lock to execute the task of setting the data pin to the pull-down mode. In this way, it can be ensured that the task of setting the data pin to the pull-down mode is executed first to avoid the problem of probabilistic disconnection of the fast charging adapter before the task is completed.

[0064] 501b. The terminal device sets the data pin to GPIO mode.

[0065] 501c. The terminal device sets the GPIO mode to the pull-down mode and enables the data pin output.

[0066] It can be understood that the GPIO mode includes multiple modes, and the embodiment of the present application is the pull-down mode in the applied GPIO mode.

[0067] In the embodiment of the present application, the data pin is set to the pull-down mode through the existing GPIO mode in the terminal device, which can reduce hardware changes and reduce costs.

[0068] 501d. The terminal device releases the mutex lock.

[0069] Optionally, before step 501b, the above step 501 may further include step 501e.

[0070] 501e. The terminal device determines whether the terminal device is connected to the fast charging adapter.

[0071] When the terminal device is connected to the fast charging adapter, execute the above step 501b; when the terminal device is not connected to the fast charging adapter, execute the above step 501d.

[0072] In the embodiment of the present application, D+ and D- are set to the pull-down mode in the GPIO mode: a mutex lock can be set to perform mutual exclusion operation, and then a foolproof method (a restriction method to avoid errors) is used to determine whether an external power supply is actually connected. When it is not connected, the mutex lock is directly released; if it is indeed externally connected, the register of VOOCPHY is set, D+ and D- are configured to GPIO mode, and then D- is set to output mode and outputs low, and then the output of VOOCPHY is enabled.

[0073] 502. In the pull-down mode, the terminal device outputs a low level through the data pin.

[0074] It can be understood that when the output voltage is less than a certain threshold, it is considered a low level. For example, when the output voltage is less than or equal to 0.8 volts (V), it can be considered a low level.

[0075] Taking resetting VOOCPHY as an example, in the embodiment of the present application, after resetting VOOCPHY, when the fast charging adapter sends fast charging request data and VOOCPHY cannot respond, VOOCPHY actively sets the data pin to pull-down mode, and outputs a low level on the data pin through the wired-AND function, forcibly pulling the level of the data pin (i.e., D-) from 1.2V to 0V.

[0076] Optionally, combined Figure 5A ,like Figure 5C As shown, before the above step 501, the method provided in the embodiment of the present application may further include the following steps 503 to 504.

[0077] 503. Before resetting the transceiver function of the fast charge logic control circuit, the terminal device obtains target parameter information of the battery of the terminal device.

[0078] Optionally, when the target parameter information is parameter information in a non-fast charging state, the terminal device obtains the target parameter information after activating the fast charging adapter. When the target parameter information is parameter information in a fast charging state, the terminal device can periodically obtain the target parameter information according to a preset period and promptly determine whether fast charging is required based on the target parameter information.

[0079] For example, when entering the real fast charging mode, a thread will regularly monitor the fast charging status. In real time, it monitors whether the fast charging is full or overheated. Whether it is overheated or full, the transceiver function of the fast charging logic control circuit needs to be reset to make the terminal device switch from fast charging to normal charging.

[0080] 504. When the target parameter information meets the target condition, the terminal device resets the transceiver function of the fast charge logic control circuit.

[0081] Optionally, the target parameter information includes at least one of the following: temperature information of the battery, and power information of the battery.

[0082] Optionally, when the target parameter information includes the temperature information, the target condition is that the temperature indicated by the temperature information is less than or equal to a first threshold, or the target condition is that the temperature is greater than or equal to a second threshold, and the first threshold is less than the second threshold.

[0083] The first threshold and the second threshold can be determined according to actual use requirements and are not limited in the present embodiment. For example, the first threshold can be 0°C and the second threshold can be 43°C.

[0084] It can be understood that if the battery temperature is less than or equal to the first threshold, the temperature is too low, and if the battery temperature is greater than or equal to the second threshold, the temperature is too high. Before entering the fast charging mode, if the battery temperature is overheated (too low or too high), the battery temperature is not within the fast charging allowable range, and the fast charging mode is not allowed to be entered. When the battery temperature is greater than the first threshold and less than the second threshold, it is allowed to enter the fast charging mode within the fast charging allowable range. When in the fast charging state, if the battery temperature is overheated, it is not allowed to continue in the fast charging state. At this time, the fast charging mode needs to be cut off and then enter the normal charging mode; when in the fast charging state, if the battery temperature is greater than the first threshold and less than the second threshold, it can continue to maintain the fast charging state within the fast charging allowable range.

[0085] Optionally, when the target parameter information includes the power information, the target condition is that the power indicated by the power information is greater than or equal to a third threshold.

[0086] The third threshold value can be determined according to actual use requirements and is not limited in the present embodiment. For example, the third threshold value is 100%, 95%, etc.

[0087] It can be understood that before entering fast charging mode, if the battery power is greater than or equal to the third threshold, the battery power is not within the fast charging range and the fast charging mode is not allowed to be entered; when the battery power is less than the third threshold, the battery power is within the fast charging range and the fast charging mode is allowed to be entered. When in the fast charging state, if the battery power is greater than or equal to the third threshold, the fast charging is fully charged, and the fast charging mode needs to be disconnected, and then the normal charging mode needs to be entered; when in the fast charging state, if the battery power is less than the third threshold, the fast charging battery is not fully charged and the fast charging state can be maintained.

[0088] In an embodiment of the present application, the terminal device determines whether the terminal device is currently allowed to enter the fast charging mode or whether to maintain the fast charging state based on the target parameter information.

[0089] Optionally, the target parameter information is parameter information in a non-fast charging state; before the above step 503, after the terminal device determines that the fast charging adapter is inserted into the USB interface, the terminal device can detect the type of the USB interface according to the relevant fast charging protocol it supports. When it is detected that the type of the USB interface is DCP, the terminal device can set the data pin to fast charging mode through the fast charging logic control circuit and activate the fast charging adapter to enter the fast charging mode.

[0090] For example, in combination Figure 5C ,like Figure 5D As shown, before the above step 503, the method provided in the embodiment of the present application may further include the following steps 505 to 506.

[0091] 505. When the terminal device detects that a fast charging adapter is inserted into the USB interface and determines that the type of the USB interface is DCP, the terminal device sets the data pin to the fast charging mode through the fast charging logic control circuit.

[0092] 506. The terminal device activates the fast charging adapter.

[0093] Optionally, after activating the fast charging adapter, the terminal device can communicate with the fast charging adapter through VOOCPHY, obtain the type of the fast charging adapter (Identity document, ID), and then display the fast charging icon corresponding to the fast charging adapter ID. It can be understood that different types of fast charging adapters connected to the terminal device will display different fast charging icons.

[0094] It can be understood that before fast charging, the terminal device needs to activate the fast charging adapter. After the terminal device activates the fast charging adapter, it needs to obtain the target parameter information and determine whether to allow fast charging based on the target parameter information. If allowed, it will reply to agree to fast charging when receiving the communication frame data of the fast charging adapter requesting fast charging; if not allowed, it will continue to maintain normal charging (this is fake charging). At this time, it is necessary to reset the transceiver function of the fast charging logic control circuit, and set the data pin to pull-down mode through the fast charging logic control circuit.

[0095] In the embodiment of the present application, when it is determined to be a DCP, the fast charging adapter is activated again to ensure the charging safety of the terminal device.

[0096] Optionally, the above step 506 can be specifically implemented by at least one of the following steps 506a and 506b.

[0097] 506a. The terminal device sends a pulse train to the fast charging adapter.

[0098] The current of the pulse train is greater than or equal to the fourth threshold. The fourth threshold can be determined according to actual usage requirements (for example, according to the fast charging adapter ID), and is not limited in this embodiment of the application. For example, for a fast charging adapter based on 65W SVOOC technology, the fourth threshold can be 300 milliamperes (mA).

[0099] 506b. The terminal device controls the charging current of the terminal device to be greater than or equal to a fifth threshold.

[0100] The fifth threshold value can be determined based on actual usage requirements (e.g., based on the fast charging adapter ID), and is not limited in this embodiment of the present application. For example, for a fast charging adapter based on 65W SVOOC technology, the fifth threshold value can be 1A.

[0101] In the embodiments of the present application, multiple methods of activating the fast charging adapter are provided, and an appropriate method of activating the fast charging adapter can be selected according to actual usage requirements.

[0102] Optionally, combined Figure 5D ,like Figure 5E As shown, before the above step 505, the method provided in the embodiment of the present application may further include the following step 507. The above step 505 may be specifically implemented through the following step 505a or step 505b.

[0103] 507. When the terminal device detects that the fast charging adapter is inserted into the USB interface and determines that the type of the USB interface is DCP, the terminal device sets the data pin to the pull-down mode through the fast charging logic control circuit.

[0104] 505a. After a first preset time period after the terminal device determines that the type of the USB interface is DCP, the terminal device switches the data pin from the pull-down mode to the fast charging mode through the fast charging logic control circuit.

[0105] The first preset duration can be determined according to actual usage requirements (for example, according to the fast charging adapter ID), and is not limited in the embodiment of the present application.

[0106] For example, for a fast charging adapter based on 65W SVOOC technology and a terminal device that supports wireless reverse charging technology, and the PMIC's OTG (On-The-Go) mode needs to be used for wireless reverse charging, when DCP is detected, the PMIC needs to be switched from OTG mode to wired charging mode within a first preset time, and the first preset time can be 800 milliseconds (ms).

[0107] Among them, OTG technology realizes data transmission between devices without a host.

[0108] For example, for a terminal device whose fast charging logic control circuit is ADSP (including VOOCPHY), when it is determined that the type of the USB interface is DCP, a first timer can be started to set a first preset duration, and when the first timer times out, the data pin can be switched from the pull-down mode to the fast charging mode through the fast charging logic control circuit.

[0109] 505b. After obtaining the load capacity of the fast charging adapter, the terminal device switches the data pin from the pull-down mode to the fast charging mode through the fast charging logic control circuit.

[0110] It can be understood that load capacity can be understood as the ability of the terminal device to test the fast charging adapter to output voltage and current to the terminal device.

[0111] For example, for a terminal device whose fast charging logic control circuit is a fast charging MCU, when it is determined that the type of the USB interface is DCP, before starting the fast charging mode, it is necessary to obtain the load capacity of the fast charging adapter through experiments.

[0112] Optionally, there's a significant difference between using VOOCPHY for fast charging and using MCU for fast charging: when a DCP is identified, the MCU has a two-stage switch that can hardware-disconnect the USB PHY's control of D+ and D-. VOOCPHY, on the other hand, has only one switch, which can't be hardware-shielded. Therefore, when a DCP is identified, the AP is notified to set the USB PHY's control of D+ and D- to high impedance (i.e., high impedance, which has no effect on the output circuit, equivalent to being suspended or disconnected), thereby enabling software-shielded USB PHY control of D+ and D-.

[0113] Optionally, the target parameter information is parameter information in the fast charging state; combined with Figure 5A ,like Figure 5F As shown, before the above step 501, the charging control method provided in the embodiment of the present application further includes the following step 508.

[0114] 508. After a second preset time period after resetting the transceiver function of the fast charge logic control circuit, the terminal device sets the fast charge flag from true to false when setting the target flag from false to true.

[0115] Among them, the second preset time is less than the time when the terminal device determines that the fast charging adapter is unplugged from the USB port (recorded as the fourth preset time, the fourth preset time can be determined according to actual usage requirements, and is not limited in the embodiment of the present application. For different terminal devices and fast charging adapters, the fourth preset time may be different. Usually, the fourth preset time is greater than or equal to 600ms and less than or equal to 1s. For example, the fourth preset time is 1s). When the target parameter information includes the temperature information, the target flag is the fast charging overtemperature flag (fastchg_to_warm); when the target parameter information includes the power information, the target flag is the fast charging full flag (fastchg_to_normal).

[0116] The second preset duration can be determined according to actual usage requirements and is not limited in the present embodiment. Typically, the second preset duration is less than 600ms. For example, the second preset duration is 350ms.

[0117] It can be understood that when the transceiver function of the fast charging logic control circuit is reset (or when the fast charging is detected to be full or the fast charging is overheated), the second timer can be started, and the timing time is the second preset duration. If the second timer times out, the fast charging flag (fastchg_start) is set from true to false when the target flag is set from false to true.

[0118] In an embodiment of the present application, the terminal device can determine whether the fast charging adapter is unplugged from the USB port by detecting the voltage value of the voltage pin of the UE. When the voltage value of the voltage pin of the UE is greater than or equal to a sixth threshold, it indicates that the fast charging adapter is not unplugged from the USB port; when the voltage value of the voltage pin of the UE is less than the sixth threshold, it indicates that the fast charging adapter is unplugged from the USB port (no external power supply).

[0119] Exemplarily, the sixth threshold value may be determined according to actual usage requirements, for example, according to relevant settings of the terminal device, relevant settings of the fast charging adapter, etc. For example, the sixth threshold value may be 2000 millivolts (mV).

[0120] It should be noted that the terminal device can simultaneously set the target flag from false to true and the fast charge flag from true to false, or it can first set the target flag from false to true and then set the fast charge flag from true to false.

[0121] It can be understood that in the terminal device, the three flags of fast charging flag, fast charging overtemperature flag and fast charging full flag are used to control whether the screen of the terminal device displays the fast charging icon (the fast charging icon is used to indicate that the terminal device is in the charging state. In fact, the terminal device displays the fast charging icon after the fast charging adapter is inserted into the USB interface, but it may be in the fast charging state, the general charging state, the fake charging state, or the uncharging state after fast charging and fast temperature or fast charging is full (not disconnected by unplugging the fast charging adapter).). When at least one of these three flags is true, the terminal device displays the fast charging icon; when all three flags are false, the terminal device cancels the display of the fast charging icon. In addition, due to the relevant fast charging protocol provisions: the fast charging overtemperature flag and the fast charging full flag will be set to false when the terminal device detects a charging interruption (including the terminal device interrupting charging and the adapter being unplugged from the USB interface). The fast charging flag is set to false only in the case of a communication timeout (that is, after the fast charging adapter is inserted into the USB interface, in the case of non-communication timeout, the fast charging flag remains true). Then, when the fast charging adapter is unplugged from the USB port but before the communication times out, the fast charging flag is still true. In this case, the terminal device will continue to display the fast charging icon and cannot cancel the fast charging icon in time, resulting in a poor user experience.

[0122] Therefore, in an embodiment of the present application, after the second timer times out (within the second preset time period after detecting that the fast charge is fully charged or the fast charge is overheated), when the target flag is set from false to true, the fast charge flag is set from true to false (that is, the fast charge flag is forced to be set from true to false through software). In this way, it can be ensured that the fast charge icon can be displayed before the terminal device detects that the fast charge adapter is not unplugged from the USB interface. When it is detected that the fast charge adapter is not unplugged from the USB interface, the target flag (assuming it is the fast charge full flag) is set from true to false. At this time, the fast charge overtemperature flag is false, the fast charge flag is false, and if all three are false, the fast charge icon can be canceled in time.

[0123] In an embodiment of the present application, a second preset time is set to set the fast charge flag from true to false when the target flag is set from false to true after detecting that the fast charge adapter is fully charged or over-temperature and before detecting that the fast charge adapter is not unplugged from the USB interface. The fast charge icon display can be canceled in time after detecting that the fast charge adapter is not unplugged from the USB interface.

[0124] Optionally, the target parameter information is parameter information in the fast charging state; combined with Figure 5F ,like Figure 5G As shown, the above step 501 can be specifically implemented through the following step 501f.

[0125] 501f. After the third preset time period after resetting the transceiver function of the fast charge logic control circuit, the terminal device determines that the fast charge adapter is not unplugged from the USB interface, and sets the data pin to the pull-down mode through the fast charge logic control circuit.

[0126] Among them, the third preset duration is greater than or equal to the time when the terminal device determines that the fast charging adapter is unplugged from the USB port (that is, the fourth preset duration in the above step 508), and is less than the time from when the terminal device exits the fast charging mode to when it starts the normal charging mode (hereinafter referred to as the fifth preset duration, the fifth preset duration can be determined according to actual usage requirements, and is not limited in the embodiment of the present application. For example, the fifth preset duration is 20s).

[0127] It can be understood that the third preset time length is greater than the second preset time length.

[0128] The third preset duration can be determined according to actual usage requirements and is not limited in the present embodiment. For example, the third preset duration is 1.5s or 350ms+1.5s.

[0129] Optionally, in an embodiment of the present application, the starting point of the third preset time length may be the same as the starting point of the second preset time length, may be later than the starting point of the second preset time length, or may be the end point of the second preset time length.

[0130] It can be understood that when it is detected that the transceiver function of the fast charging logic control circuit is reset, the third timer can be started, and the timing duration is the third preset duration. If the third timer times out, it is determined that the fast charging adapter has not been unplugged from the USB interface, and the data pin is set to the pull-down mode through the fast charging logic control circuit.

[0131] For example, the terminal device detects whether the fast charging adapter is unplugged from the USB port within a third preset time period. Specifically, when the third timer is triggered, the voltage of vbus is obtained. If vbus is greater than or equal to 2000mv, it indicates that the external power supply is not unplugged. At this time, it is necessary to set D- to pull-down mode again; if vbus is less than 2000mv, it indicates that the external power supply is not unplugged, and the fast charging icon is canceled.

[0132] It should be noted that when the terminal device determines that an adapter is inserted into the USB port and identifies it as a DCP, the terminal device activates the adapter. Before activating the fast charging adapter, general charging is performed between the terminal device and the fast charging adapter, and no fast charging communication is performed (no fast charging request is sent); when the terminal device detects that the fast charging is overheated or fully charged, the terminal device will disconnect the charging connection with the fast charging adapter within the fifth preset time. During this process, no fast charging communication is performed between the terminal device and the fast charging adapter. After the fifth preset time, the terminal device starts general charging through the AP, and then fast charging communication is performed again between the terminal device and the fast charging adapter.

[0133] Optionally, when it is determined that the fast charging adapter is unplugged from the USB interface, the terminal device sets the target flag to false, or sets both the fast charging full flag and the fast charging overtemperature flag to false, and the terminal device sets D+ and D- to high-impedance mode (i.e., high-impedance state) through the fast charging logic control circuit to avoid affecting the next time the fast charging adapter is inserted into the USB interface and the USB interface type cannot be identified.

[0134] It is understandable that if the data pin is set to the pull-down mode by the fast-charge logic control circuit before determining that the fast-charge adapter is unplugged from the USB interface, then when it is determined that the fast-charge adapter is unplugged from the USB interface, the data pin needs to be set to a high-impedance state by the fast-charge logic control circuit, resulting in more frequent operations, prone to errors, and increased energy consumption. Moreover, the problem of probabilistic disconnection and reconnection does not occur before the terminal device initiates general charging through the AP. Therefore, there is no need to set the data pin to the pull-down mode by the fast-charge logic control circuit before determining that the fast-charge adapter is unplugged from the USB interface.

[0135] In the embodiment of the present application, through the above step 501f, the operation process can be simplified to a certain extent and power consumption can be saved.

[0136] Figure 6 This is a structural block diagram of a charging control device shown in an embodiment of the present application. The charging control device includes a fast charging logic control circuit and a universal serial bus USB interface, such as Figure 6As shown, the charging control device includes: a setting module 601 and an output module 602; the setting module 601 is used to set the data pin of the USB interface to a pull-down mode through the fast charging logic control circuit when the transceiver function of the fast charging logic control circuit is reset; the output module 602 is used to output a low level through the data pin in the pull-down mode set by the setting module 601.

[0137] As an optional implementation of an embodiment of the present application, the pull-down mode is a pull-down mode in a general input and output GPIO mode; the setting module 601 is specifically used to set a mutex lock and lock it; set the data pin to a general input and output GPIO mode, set the GPIO mode to the pull-down mode, and enable the data pin output; release the mutex lock.

[0138] As an optional implementation of the embodiment of the present application, the charging control device also includes: an acquisition module and a reset module; the acquisition module is used to obtain the target parameter information of the battery of the terminal device before resetting the transceiver function of the fast charging logic control circuit; the reset module is used to reset the transceiver function of the fast charging logic control circuit when the target parameter information meets the target conditions.

[0139] As an optional implementation of an embodiment of the present application, the target parameter information includes at least one of the following: temperature information of the battery, power information of the battery; when the target parameter information includes the temperature information, the target condition is that the temperature indicated by the temperature information is less than or equal to a first threshold, or the target condition is that the temperature is greater than or equal to a second threshold, and the first threshold is less than the second threshold; when the target parameter information includes the power information, the target condition is that the power indicated by the power information is greater than or equal to a third threshold.

[0140] As an optional implementation of an embodiment of the present application, the target parameter information is parameter information in a non-fast charging state; the charging control device also includes: an activation module; the setting module 601 is also used to set the data pin to fast charging mode through the fast charging logic control circuit when it is detected that the fast charging adapter is inserted into the USB interface and it is determined that the type of the USB interface is a dedicated charging port DCP before the acquisition module acquires the target parameter information of the battery of the terminal device; the activation module is used to activate the fast charging adapter.

[0141] As an optional implementation of an embodiment of the present application, the activation module is specifically used to perform at least one of the following: sending a pulse string to the fast charging adapter, the current of the pulse string is greater than or equal to the fourth threshold; controlling the charging current of the terminal device to be greater than or equal to the fifth threshold.

[0142] As an optional implementation of an embodiment of the present application, the setting module 601 is also used to set the data pin to the pull-down mode through the fast charging logic control circuit when it is detected that the fast charging adapter is inserted into the USB interface and it is determined that the type of the USB interface is DCP before setting the data pin to the fast charging mode through the fast charging logic control circuit; the setting module 601 is specifically used to switch the data pin from the pull-down mode to the fast charging mode through the fast charging logic control circuit after a first preset time after determining that the type of the USB interface is DCP; or, when the load capacity of the fast charging adapter is obtained, switch the data pin from the pull-down mode to the fast charging mode through the fast charging logic control circuit.

[0143] As an optional implementation scheme of the embodiment of the present application, the charging control device also includes: a control module; the target parameter information is parameter information in the fast charging state; the control module is used to set the fast charging flag from true to false after the second preset time after resetting the transceiver function of the fast charging logic control circuit, before the setting module 601 sets the data pin of the USB interface to the pull-down mode through the fast charging logic control circuit, and when the target flag is set from false to true; wherein the second preset time is less than the time when the terminal device determines that the fast charging adapter is unplugged from the USB port, when the target parameter information includes the temperature information, the target flag is the fast charging overtemperature flag, and when the target parameter information includes the power information, the target flag is the fast charging full flag.

[0144] As an optional implementation of an embodiment of the present application, the target parameter information is parameter information under the fast charging state; the setting module 601 is specifically used to determine that the fast charging adapter is not unplugged from the USB interface after a third preset time after resetting the transceiver function of the fast charging logic control circuit, and set the data pin to the pull-down mode through the fast charging logic control circuit; wherein the third preset time is greater than or equal to the time when the terminal device determines that the fast charging adapter is unplugged from the USB port, and is less than the time from the terminal device exiting the fast charging mode to starting the normal charging mode.

[0145] In the embodiment of the present application, each module can implement the charging control method provided by the above method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0146] Figure 7 A schematic diagram of the hardware structure of a terminal device for implementing each embodiment of the present application is shown as follows: Figure 7As shown, the terminal device includes but is not limited to: radio frequency (RF) circuit 701, memory 702, input unit 703, display unit 704, sensor 705, audio circuit 706, wireless communication (wireless fidelity, WiFi) module 707, processor 708, power supply 709, and camera 710. Among them, the RF circuit 701 includes a receiver 7011 and a transmitter 7012. Those skilled in the art will understand that Figure 7 The terminal device structure shown in the figure does not constitute a limitation on the terminal device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0147] The RF circuit 701 can be used to receive and send signals during information transmission or calls. In particular, after receiving the downlink information from the base station, it is sent to the processor 708 for processing; in addition, the designed uplink data is sent to the base station. Generally, the RF circuit 701 includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (LNA), a duplexer, etc. In addition, the RF circuit 701 can also communicate with the network and other devices through wireless communication. The above-mentioned wireless communication can use any communication standard or protocol, including but not limited to the global system of mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), long term evolution (LTE), email, short messaging service (SMS), etc.

[0148] The memory 702 can be used to store software programs and modules. The processor 708 executes the various functional applications and data processing of the terminal device by running the software programs and modules stored in the memory 702. The memory 702 may mainly include a program storage area and a data storage area. The program storage area may store an operating system and at least one application required for a function (such as a sound playback function, an image playback function, etc.); the data storage area may store data created based on the use of the terminal device (such as audio data, a phone book, etc.). In addition, the memory 702 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage device.

[0149] The input unit 703 can be used to receive input digital or character information, and to generate key signal input related to the user settings and function control of the terminal device. Specifically, the input unit 703 may include a touch panel 7031 and other input devices 7032. The touch panel 7031, also known as a touch screen, can collect user touch operations on or near it (such as operations performed by the user using any suitable object or accessory such as a finger, stylus, etc. on or near the touch panel 7031) and drive the corresponding connection device according to a pre-set program. Optionally, the touch panel 7031 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch direction and detects the signal caused by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device and converts it into touch point coordinates, which are then sent to the processor 708. It can also receive commands sent by the processor 708 and execute them. In addition, the touch panel 7031 can be implemented using a variety of methods such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch panel 7031, the input unit 703 may further include other input devices 7032. Specifically, the other input devices 7032 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick.

[0150] The display unit 704 can be used to display information input by the user or information provided to the user and various menus of the terminal device. The display unit 704 may include a display panel 7041. Optionally, the display panel 7041 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc. Further, the touch panel 7031 may cover the display panel 7041. When the touch panel 7031 detects a touch operation on or near it, it is transmitted to the processor 708 to determine the touch event. Subsequently, the processor 708 provides corresponding visual output on the display panel 7041 according to the touch event. Although in Figure 7 In the embodiment, the touch panel 7031 and the display panel 7041 are used as two independent components to realize the input and output functions of the terminal device, but in some embodiments, the touch panel 7031 and the display panel 7041 can be integrated to realize the input and output functions of the terminal device.

[0151] The terminal device may also include at least one sensor 705, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 7041 according to the brightness of the ambient light, and the proximity sensor may exit the display panel 7041 and / or the backlight when the terminal device is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used for applications that identify the posture of the terminal device (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors that the terminal device can also be configured with, such as gyroscopes, geomagnetic sensors, barometers, hygrometers, thermometers, infrared sensors, etc., they will not be described in detail here. In the embodiment of the present application, the terminal device may include an accelerometer, a depth sensor, or a distance sensor, etc.

[0152] Audio circuit 706, speaker 7061, and microphone 7062 provide an audio interface between the user and the terminal device. Audio circuit 706 converts received audio data into electrical signals and transmits them to speaker 7061, which then converts them into sound signals for output. Microphone 7062, on the other hand, converts collected sound signals into electrical signals, which are then received by audio circuit 706 and converted into audio data. The audio data is then processed by processor 708 and transmitted via RF circuit 701 to, for example, another terminal device, or the audio data is output to memory 702 for further processing.

[0153] WiFi is a short-range wireless transmission technology. The terminal device can help users send and receive emails, browse web pages and access streaming media through the WiFi module 707. It provides users with wireless broadband Internet access. Figure 7 A WiFi module 707 is shown, but it is understandable that it is not an essential component of the terminal device and can be omitted as needed without changing the essence of the invention.

[0154] Processor 708 is the control center of the terminal device. It connects the various components of the entire terminal device using various interfaces and lines. By running or executing software programs and / or modules stored in memory 702 and accessing data stored in memory 702, it performs various terminal device functions and processes data, thereby providing overall monitoring of the terminal device. Optionally, processor 708 may include one or more processing units. Preferably, processor 708 may integrate an application processor and a modem processor. The application processor primarily processes the operating system, user interface, and application programs, while the modem processor primarily handles wireless communications. It is understood that the modem processor may not be integrated into processor 708.

[0155] The terminal device also includes a power supply 709 (such as a battery) for supplying power to various components. Preferably, the power supply can be logically connected to the processor 708 through a power management system, so that the power management system can manage charging, discharging, and power consumption. Although not shown, the terminal device may also include a Bluetooth module, etc., which will not be described in detail here.

[0156] In an embodiment of the present application, the terminal device includes a fast charging logic control circuit and a universal serial bus USB interface, wherein the processor 708 is used to set the data pin of the USB interface to a pull-down mode through the fast charging logic control circuit when resetting the transceiver function of the fast charging logic control circuit; in this pull-down mode, a low level is output through the data pin.

[0157] As an optional implementation of an embodiment of the present application, the pull-down mode is a pull-down mode in a general input and output GPIO mode; the processor 708 is specifically used to set a mutex lock and lock it; set the data pin to a general input and output GPIO mode, set the GPIO mode to the pull-down mode, and enable the data pin output; release the mutex lock.

[0158] As an optional implementation of the embodiment of the present application, the processor 708 is also used to obtain the target parameter information of the battery of the terminal device before resetting the transceiver function of the fast charging logic control circuit; when the target parameter information meets the target condition, reset the transceiver function of the fast charging logic control circuit.

[0159] As an optional implementation of an embodiment of the present application, the target parameter information includes at least one of the following: temperature information of the battery, power information of the battery; when the target parameter information includes the temperature information, the target condition is that the temperature indicated by the temperature information is less than or equal to a first threshold, or the target condition is that the temperature is greater than or equal to a second threshold, and the first threshold is less than the second threshold; when the target parameter information includes the power information, the target condition is that the power indicated by the power information is greater than or equal to a third threshold.

[0160] As an optional implementation of an embodiment of the present application, the target parameter information is parameter information in a non-fast charging state; the processor 708 is also used to, before obtaining the target parameter information of the battery of the terminal device, set the data pin to fast charging mode through the fast charging logic control circuit when it detects that a fast charging adapter is inserted into the USB interface and determines that the type of the USB interface is a dedicated charging port DCP; and activate the fast charging adapter.

[0161] As an optional implementation of an embodiment of the present application, the processor 708 is specifically used to perform at least one of the following: sending a pulse string to the fast charging adapter, the current of the pulse string is greater than or equal to the fourth threshold; controlling the charging current of the terminal device to be greater than or equal to the fifth threshold.

[0162] As an optional implementation of the embodiment of the present application, the processor 708 is also used to set the data pin to the pull-down mode through the fast charging logic control circuit before setting the data pin to the fast charging mode through the fast charging logic control circuit, when it is detected that the fast charging adapter is inserted into the USB interface and it is determined that the type of the USB interface is DCP; the processor 708 is specifically used to switch the data pin from the pull-down mode to the fast charging mode through the fast charging logic control circuit after a first preset time after determining that the type of the USB interface is DCP; or, when the load capacity of the fast charging adapter is obtained, switch the data pin from the pull-down mode to the fast charging mode through the fast charging logic control circuit.

[0163] As an optional implementation of an embodiment of the present application, the target parameter information is parameter information in the fast charging state; the processor 708 is also used to set the data pin of the USB interface to the pull-down mode through the fast charging logic control circuit, and after a second preset time after resetting the transceiver function of the fast charging logic control circuit, when the target flag is set from false to true, set the fast charging flag from true to false; wherein the second preset time is less than the time when the terminal device determines that the fast charging adapter is unplugged from the USB port, and when the target parameter information includes the temperature information, the target flag is the fast charging overtemperature flag; when the target parameter information includes the power information, the target flag is the fast charging full flag.

[0164] As an optional implementation of an embodiment of the present application, the target parameter information is parameter information in the fast charging state; the processor 708 is specifically used to determine that the fast charging adapter is not unplugged from the USB interface after a third preset time after resetting the transceiver function of the fast charging logic control circuit, and set the data pin to the pull-down mode through the fast charging logic control circuit; wherein the third preset time is greater than or equal to the time when the terminal device determines that the fast charging adapter is unplugged from the USB port, and is less than the time from when the terminal device exits the fast charging mode to when it starts the normal charging mode.

[0165] The beneficial effects of various implementations in this embodiment can be specifically referred to the beneficial effects of the corresponding implementations in the above-mentioned charging control method embodiment. To avoid repetition, they will not be described again here.

[0166] An embodiment of the present application also provides a terminal device, including a fast charging logic control circuit and a universal serial bus USB interface; the fast charging logic control circuit is used to set the data pin of the USB interface to a pull-down mode when resetting the transceiver function of the fast charging logic control circuit; and in this pull-down mode, output a low level through the data pin.

[0167] Optionally, the fast charging logic control circuit is ADSP or AP, etc. The fast charging logic control circuit is also used to implement the various processes of the charging control method provided in the above method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0168] An embodiment of the present application also provides a terminal device, which may include: a processor, a memory, and a computer program stored in the memory and run on the processor. When the computer program is executed by the processor, it can implement the various processes of the charging control method provided in the above method embodiment and achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0169] An embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the various processes of the charging control method provided in the above method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0170] An embodiment of the present application also provides a computer program product, wherein the computer program product includes computer instructions. When the computer program product runs on a processor, the processor executes the computer instructions to implement the various processes of the charging control method provided in the above method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0171] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, which is coupled to the processor. The processor is used to run programs or instructions to implement the various processes of the above-mentioned charging control method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0172] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0173] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices, servers and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0174] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0175] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0176] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0177] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A charging control method, characterized in that: Applied to a terminal device including a fast charging logic control circuit and a universal serial bus (USB) interface, the method includes: Before resetting the transceiver function of the fast charge logic control circuit, obtaining target parameter information of the battery of the terminal device; When the target parameter information meets the target condition, the transceiver function of the fast charge logic control circuit is reset; wherein the target parameter information includes at least one of the following: temperature information of the battery, power information of the battery; when the target parameter information includes the temperature information, the target condition is that the temperature indicated by the temperature information is less than or equal to a first threshold, or the target condition is that the temperature is greater than or equal to a second threshold, and the first threshold is less than the second threshold; when the target parameter information includes the power information, the target condition is that the power indicated by the power information is greater than or equal to a third threshold; When resetting the transceiver function of the fast charge logic control circuit, the data pin of the USB interface is set to a pull-down mode by the fast charge logic control circuit; In the pull-down mode, a low level is output through the data pin.

2. The method according to claim 1, characterized in that The pull-down mode is a pull-down mode in a general-purpose input and output GPIO mode; and setting the data pin of the USB interface to the pull-down mode by the fast charge logic control circuit includes: Set up a mutex and lock it; Set the data pin to general purpose input and output GPIO mode, Setting the GPIO mode to the pull-down mode and enabling the data pin output; Release the mutex lock.

3. The method according to claim 1, characterized in that The target parameter information is parameter information in a non-fast charging state; Before acquiring target parameter information of the battery of the terminal device, the method further includes: When detecting that a fast charging adapter is inserted into the USB interface and determining that the type of the USB interface is a dedicated charging port DCP, setting the data pin to a fast charging mode through the fast charging logic control circuit; Activate the fast charge adapter.

4. The method according to claim 3, characterized in that Before setting the data pin to the fast charge mode by the fast charge logic control circuit, the method further includes: When detecting that the fast charge adapter is inserted into the USB interface and determining that the type of the USB interface is DCP, setting the data pin to the pull-down mode through the fast charge logic control circuit; Setting the data pin to the fast charge mode by the fast charge logic control circuit includes: After a first preset time period after determining that the type of the USB interface is DCP, switching the data pin from the pull-down mode to the fast charging mode by the fast charging logic control circuit; or, When the load capacity of the fast charge adapter is obtained, the data pin is switched from the pull-down mode to the fast charge mode through the fast charge logic control circuit.

5. The method according to claim 1, wherein The target parameter information is parameter information in a fast charging state; before the fast charging logic control circuit sets the data pin of the USB interface to a pull-down mode, the method further includes: After a second preset time period after resetting the transceiver function of the fast charge logic control circuit, when the target flag bit is set from false to true, the fast charge flag bit is set from true to false; Among them, the second preset time length is less than the time when the terminal device determines that the fast charging adapter is unplugged from the USB port. When the target parameter information includes the temperature information, the target flag is the fast charging overtemperature flag. When the target parameter information includes the power information, the target flag is the fast charging full flag.

6. The method according to claim 1, wherein The target parameter information is parameter information in a fast charging state; and when resetting the transceiver function of the fast charging logic control circuit, setting the data pin of the USB interface to a pull-down mode by the fast charging logic control circuit includes: After a third preset time period after resetting the transceiver function of the fast charge logic control circuit, if it is determined that the fast charge adapter is not unplugged from the USB interface, setting the data pin to the pull-down mode through the fast charge logic control circuit; Among them, the third preset time length is greater than or equal to the time when the terminal device determines that the fast charging adapter is unplugged from the USB port, and is less than the time when the terminal device exits the fast charging mode and starts the normal charging mode.

7. A charging control device, characterized in that: The device includes a fast charging logic control circuit and a universal serial bus USB interface, and the device includes: a setting module and an output module; The setting module is configured to set the data pin of the USB interface to a pull-down mode through the fast charging logic control circuit when resetting the transceiver function of the fast charging logic control circuit; The output module is configured to output a low level through the data pin in the pull-down mode set by the setting module; The device further comprises: an acquisition module and a reset module; The acquisition module is configured to acquire target parameter information of the battery before resetting the transceiver function of the fast charge logic control circuit; The reset module is used to reset the transceiver function of the fast charging logic control circuit when the target parameter information meets the target condition; wherein, the target parameter information includes at least one of the following: the temperature information of the battery, the power information of the battery; when the target parameter information includes the temperature information, the target condition is that the temperature indicated by the temperature information is less than or equal to the first threshold, or the target condition is that the temperature is greater than or equal to the second threshold, and the first threshold is less than the second threshold; when the target parameter information includes the power information, the target condition is that the power indicated by the power information is greater than or equal to the third threshold.

8. A terminal device, characterized in that: Including processor, fast charging logic control circuit and universal serial bus USB interface; The processor is configured to obtain target parameter information of the battery of the terminal device before resetting the transceiver function of the fast charge logic control circuit; and, when the target parameter information meets the target condition, reset the transceiver function of the fast charge logic control circuit; wherein, the target parameter information includes at least one of the following: temperature information of the battery, power information of the battery; when the target parameter information includes the temperature information, the target condition is that the temperature indicated by the temperature information is less than or equal to a first threshold, or the target condition is that the temperature is greater than or equal to a second threshold, and the first threshold is less than the second threshold; when the target parameter information includes the power information, the target condition is that the power indicated by the power information is greater than or equal to a third threshold; The fast charge logic control circuit is used to set the data pin of the USB interface to a pull-down mode when resetting the transceiver function of the fast charge logic control circuit; and in the pull-down mode, output a low level through the data pin.

9. A terminal device, characterized in that: The method comprises a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the charging control method according to any one of claims 1 to 6.

10. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by a processor, the steps of the charging control method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Serial port communication circuit and wearable equipment

    CN109522261A