Self-charging identification circuit and method and electronic equipment

By determining the communication protocol and current limiting strategy between the USB Type-C interface, identifying the self-charge state and turning off the current output, the problem of self-charge of the USB Type-C interface is solved, and the device's high efficiency and low loss are achieved.

CN119298308APending Publication Date: 2025-01-10ZHUHAI NANXIN SEMICON TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411628457.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-14
Publication Date
2025-01-10

AI Technical Summary

Technical Problem

When using the USB Type-C interface, when the user inserts the USB-USBC cable into different Type-C interfaces, how to determine whether the two Type-C interfaces are in self-charge state and disconnect in time when they are in self-charge state. Turn on to avoid the problem of self-charge loss of the device.

Method used

Design a self-charging identification circuit to communicate between Type-C ports by preset communication protocol, determine the port type is DFP or UFP, and control the current according to the charging and discharging limiting strategies. If the discharging limiting strategy is similar to the charging limiting strategy At the same time, it is determined to be a self-charge state and the current output of the DFP port is turned off.

Benefits of technology

Through the current limiting strategy with port types DFP and UFP, it is accurate to identify whether the two Type-C interfaces are in self-charge state, and the current output is turned off in time to avoid the device's self-charge loss.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119298308A_ABST
    Figure CN119298308A_ABST
Patent Text Reader

Abstract

The invention provides a self-charging identification circuit, a self-charging identification method and electronic equipment. The circuit comprises two Type-C ports with a double-role function; the Type-C port is used for judging the port type of the Type-C port; when the port type is UFP, the charging current is controlled to charge within a first preset duration according to a charging limiting strategy, and then charging is carried out according to the original charging current; when the port type is DFP, controlling the own discharge current to discharge according to the original discharge current, and detecting the own current within a second preset duration to obtain a discharge limiting strategy; when the discharging limiting strategy is the same as the charging limiting strategy, the discharging current is controlled to conduct discharging according to the preset limiting current within the third preset duration; the real-time current of the other Type-C port is obtained; and when the real-time current is the same as the preset limiting current, judging that the two Type-C ports are in a self-charging state. And the two Type-C ports are respectively used for limiting the discharging current and the charging current so as to identify whether the battery is in a self-charging state or not.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of power management chips, and in particular to a self-charging identification circuit, method and electronic device. Background Art

[0002] USB Type-C is a USB interface standard that is smaller than Type-A and Type-B and can be used in both host devices (such as computers) and slave devices (such as mobile phones). USB Type-C can be referred to as Type-C or USB-C.

[0003] In daily production and life, with the popularity of Type-C interface, Type-C interface has become the standard charging and discharging interface of various digital electronic products. Some electronic products, such as laptops, power banks and charging adapters, already have two Type-C interfaces, and the two Type-C interfaces have DRP (Dual Role Port) function.

[0004] In actual use, users often plug USBC-USBC cables into different Type-C ports of the same device. In this case, one Type-C port is the power supply (Source) and is in a discharging state, while the other Type-C port is the power receiving (Sink) and is in a charging state. For the device, it is equivalent to charging itself until the power of the device is exhausted by heat dissipation in the state of charging and discharging.

[0005] Therefore, when users insert USBC-USBC cables into different Type-C interfaces respectively, how to determine whether the two Type-C interfaces are in the self-charging state and disconnect them in time when they are in the self-charging state becomes an important problem that needs to be solved. Summary of the invention

[0006] The present application provides a self-charging identification circuit, method and electronic device to identify whether two Type-C interfaces are in a self-charging state. The specific technical solution is as follows:

[0007] In a first aspect, the present application provides a self-charging identification circuit, the self-charging identification circuit comprising: two Type-C ports, the Type-C ports being dual-role ports, the Type-C ports being electrically connected via a USBC-USBC cable; the Type-C ports communicating via a preset communication protocol;

[0008] The Type-C port is used to determine its own port type, wherein the port type includes DFP and UFP, and when the port type of one of the Type-C ports is DFP, the port type of the other Type-C port is UFP;

[0009] The Type-C port is further used to, when determining that its port type is UFP, first control its own charging current to charge according to the charging restriction strategy within the first preset time, and then control its own charging current to charge according to the original charging current; when determining that its port type is DFP, control its own discharge current to discharge according to the original discharge current, and detect its own current within the second preset time to obtain the discharge restriction strategy; when the discharge restriction strategy is the same as the charging restriction strategy, control its own discharge current to discharge according to the preset restriction current within the third preset time; obtain the current of the Type-C port whose port type is UFP to obtain the real-time current; when the real-time current is the same as the preset restriction current, determine that the two Type-C ports are in the self-charging state, and close the Type-C port whose port type is DFP;

[0010] Among them, the first preset time length is shorter than the second preset time length.

[0011] In one possible design, the Type-C port includes a Type-C interface, a power chip, and a fast charging protocol chip; the fast charging protocol chip is electrically connected to the Type-C interface and the power chip respectively;

[0012] The fast charging protocol chip is used to determine the port type of the Type-C port;

[0013] The fast charging protocol chip is also used to, when determining that the port type of the Type-C port is UFP, first control the power chip so that the charging current of the Type-C port is charged according to the charging limit strategy within a first preset time, and then control the power chip so that the charging current of the Type-C port is charged according to the original charging current; when determining that its own port type is DFP, control the power chip so that the discharge current of the Type-C port is discharged according to the original discharge current, and detect the current of the Type-C port within a second preset time to obtain the discharge limit strategy; when the discharge limit strategy is the same as the charging limit strategy, control the power chip so that the discharge current of the Type-C port is discharged according to the preset limit current within a third preset time; obtain the current of the Type-C port whose port type is UFP to obtain the real-time current; when the real-time current is the same as the preset limit current, determine that the two Type-C ports are in the self-charging state, and close the Type-C port whose port type is DFP;

[0014] Among them, the first preset time length is shorter than the second preset time length.

[0015] In one possible design, the charging limitation strategy is to limit the charging current to a first current value for a first time; limit the charging current to a second current value for a second time, and limit the charging current to a third current value for a third time, wherein the sum of the first time, the second time, and the third time is the first preset duration.

[0016] In a possible design, when the discharge limitation strategy is different from the charge limitation strategy, it is determined that the two Type-C ports are not in the self-charging state, and the Type-C port with the port type of DFP is controlled to discharge according to the original discharge current.

[0017] In a possible design, when the real-time current is different from the preset limit current, it is determined that the two Type-C ports are not in the self-charging state, and the Type-C port with the port type of DFP is controlled to discharge according to the original discharge current.

[0018] In one possible design, the model of the power chip is SC8823 or SC8815, and the model of the fast charging protocol chip is SC2021A.

[0019] In a second aspect, the present application provides a self-charging identification method, which is applied to the self-charging identification circuit described in the first aspect above, and the method includes:

[0020] Determine the port type of the device, wherein the port type includes DFP and UFP;

[0021] When determining that its own port type is UFP, firstly control its own charging current to charge according to the charging restriction strategy within the first preset time, and then control its own charging current to charge according to the original charging current;

[0022] When determining that its own port type is DFP, control its own discharge current to discharge according to the original discharge current, and detect its own current within the second preset time length to obtain a discharge limit strategy; when the discharge limit strategy is the same as the charging limit strategy, control its own discharge current to discharge according to the preset limit current within the third preset time length; obtain the current of the Type-C port whose port type is UFP to obtain the real-time current; when the real-time current is the same as the preset limit current, determine that the two Type-C ports are in the self-charging state, and close the Type-C port whose port type is DFP;

[0023] Among them, the first preset time length is shorter than the second preset time length.

[0024] In one possible design, the charging limitation strategy is to limit the charging current to a first current value for a first time; limit the charging current to a second current value for a second time, and limit the charging current to a third current value for a third time, wherein the sum of the first time, the second time, and the third time is the first preset duration.

[0025] In one possible design, the method further includes:

[0026] When the discharge restriction strategy is different from the charge restriction strategy, it is determined that the two Type-C ports are not in a self-charging state, and the Type-C port whose port type is DFP is controlled to discharge according to the original discharge current.

[0027] In one possible design, the method further includes:

[0028] When the real-time current is different from the preset limit current, it is determined that the two Type-C ports are not in a self-charging state, and the Type-C port whose port type is DFP is controlled to discharge according to the original discharge current.

[0029] In a third aspect, an embodiment of the present application provides an electronic device, including: the self-charging identification circuit described in the first aspect above.

[0030] Beneficial effects of the embodiments of the present application:

[0031] In the embodiment of the present application, by determining that the port type of the Type-C port is DFP, when the port type of the Type-C port is UFP, by limiting the charging current of the Type-C port of the port type UFP, it is charged according to the charging restriction strategy, and then detecting the current of the Type-C port of the port type DFP, the discharge restriction strategy is obtained. If the discharge restriction strategy is the same as the charging restriction strategy, it is considered that the charging current is limited so that the discharge current is discharged according to the limited charging current, and the two Type-C ports are preliminarily determined to be in the self-charging state. Then, by limiting the discharge current of the Type-C port of the port type DFP so that it is discharged according to the preset limit current, the current of the Type-C port of the port type UFP is obtained, and the real-time current is obtained. If the real-time current is the same as the preset limit current, it is considered that the discharge current is limited so that the charging current is charged according to the limited discharge current, and the two Type-C ports can be completely determined to be in the self-charging state, and the Type-C port of the port type DFP is closed to stop discharging. By limiting the discharge current and charging current of the two Type-C ports with port types of DFP and UFP respectively, it is possible to identify whether the two Type-C interfaces are in the self-charging state, and then shut down the current output of the port in time to avoid loss.

[0032] The beneficial effects provided in the above-mentioned second aspect and various possible designs of the above-mentioned second aspect can refer to the beneficial effects brought about by the above-mentioned first aspect and various possible implementation methods of the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other embodiments can also be obtained based on these drawings.

[0034] Figure 1 A schematic diagram of a self-charging identification circuit provided in an embodiment of the present application;

[0035] Figure 2 A self-charging identification circuit diagram provided in an embodiment of the present application;

[0036] Figure 3 A self-charging identification method provided in an embodiment of the present application;

[0037] Figure 4 A logic flow chart of a self-charging identification method provided in an embodiment of the present application;

[0038] Figure 5A current variation diagram of a Type-C port provided in an embodiment of the present application. DETAILED DESCRIPTION

[0039] In this application, "at least one" means one or more, and "plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c alone can represent: a, b, c, a and b, a and c, or a, b, and c, where a, b, and c can be single or multiple. In addition, the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance.

[0040] The directions or positional relationships indicated by terms such as "center", "longitudinal", "lateral", "up", "down", "left", "right", "front", and "back" are based on the directions or positional relationships shown in the accompanying drawings and are only for the convenience of describing the present application and simplifying the description. They do not indicate or imply that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore should not be understood as a limitation on the present application.

[0041] The terms "connected" and "connected" should be understood in a broad sense. For example, the "connected" or "connected" of a circuit structure can refer to not only physical connection, but also electrical connection or signal connection. For example, it can be directly connected, that is, physically connected, or indirectly connected through at least one intermediate element, as long as the circuit is connected, or it can be the internal connection of two elements; signal connection can refer to signal connection through a circuit or through a media medium, such as radio waves. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.

[0042] When a user inserts a USBC-USBC cable into different Type-C interfaces respectively, in order to identify whether the two Type-C interfaces are in a self-charging state, an embodiment of the present application provides a self-charging identification circuit, method and electronic device.

[0043] The self-charging identification circuit may be a chip or a circuit module.

[0044] In the present application, electronic devices may include but are not limited to: dual Type-C interface power banks and dual Type-C interface tablets.

[0045] See also Figure 1 , Figure 1 A schematic diagram of a self-charging identification circuit provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the self-charging identification circuit 1000 may include: two Type-C ports (i.e., Type-C port 1 and Type-C port 2), the Type-C port is a dual-role port, and the Type-C ports are electrically connected via a USBC-USBC cable; the Type-C ports communicate with each other via a preset communication protocol.

[0046] The Type-C port is used to determine its own port type, where the port types include DFP and UFP. When the port type of one Type-C port is DFP, the port type of the other Type-C port is UFP.

[0047] The Type-C port is also used to, when determining that its own port type is UFP, first control its own charging current to charge according to the charging strategy within a first preset time period, and then control its own charging current to charge according to the original charging current; when determining that its own port type is DFP, control its own discharge current to discharge according to the original discharge current, and detect its own current within a second preset time period to obtain the discharge strategy; when the discharge strategy is the same as the charging strategy, control its own discharge current to discharge according to the preset limit current within a third preset time period; obtain the current of the Type-C port whose port type is UFP to obtain the real-time current; when the real-time current is the same as the preset limit current, determine that the two Type-C ports are in the self-charging state, and close the Type-C port whose port type is DFP.

[0048] Among them, the first preset time length is shorter than the second preset time length.

[0049] In this application, the Type-C port is a dual-role port (i.e., DRP). For the dual-role port DRP, it can be used as a DFP (Downstream Facing Port) or a UFP (Upstream Facing Port). Among them, DFP can be understood as providing power VBUS to the main device, and a typical DFP device is a power adapter. UFP draws power from the power VBUS, and a typical UFP device is a USB flash drive or a mobile hard disk.

[0050] Since the Type-C port in this application is a dual-role port, it is necessary to first determine the port type. Since the two Type-C ports are electrically connected via a USBC-USBC cable, when determining the port type, if the port type of one Type-C port is DFP and the port type of the other Type-C port is UFP, the Type-C port with the port type of DFP is used for discharge, and the Type-C port with the port type of UFP is used for charging. The two Type-C ports transmit current via a USBC-USBC cable.

[0051] The two Type-C ports are electrically connected through a USBC-USBC cable. When one Type-C port is discharged with a port type of DFP and the other Type-C port is charged with a port type of UFP, when the charging current is limited to a smaller current P, the discharge current will discharge according to the current P, and when the discharge current is limited to a smaller current Q, the charging current will charge according to the current Q. In an example, when the charging current is limited to a smaller current of 0.5A, even if the maximum discharge current can be 2A, it will still discharge according to the charging current limit of 0.5A; when the discharge current is limited to a smaller current of 0.5A, even if the maximum charging current can be 2A, it will still charge according to the discharge current limit of 0.5A.

[0052] The current magnitude of the preset limiting current can be set according to the user's design requirements. In one example, the preset limiting current is 0.4 A. The charging limiting strategy is to limit the charging current, which will be specifically described in the following embodiments.

[0053] The original charging current and original discharging current in this application are the normal charging current when the Type-C port is not limited. In an example, the original charging current of the Type-C port is 2A, and the original discharging current is 2A.

[0054] In the present application, when the port type of the Type-C port is UFP, that is, the Type-C port is charged, first its own charging current is charged according to the charging limitation strategy within the first preset time, and then its own charging current is controlled to charge according to the original charging current. That is, the charging current is limited first, and then charged according to the original charging current. When it is determined that its own port type is DFP, its own discharge current is controlled to discharge according to the original discharge current, and its own current is detected within the second preset time to obtain the discharge limitation strategy; when the discharge limitation strategy is the same as the charging limitation strategy, that is, by limiting the charging current, when it is detected that the discharge current is the same as the charging current after limitation, it is preliminarily determined that the two Type-C ports are in the self-charging state. Control its own discharge current to discharge according to the preset limit current within the third preset time length; since the Type-C ports communicate with each other through the preset communication protocol, the current of the Type-C port with the port type of UFP can be obtained to obtain the real-time current; when the real-time current is the same as the preset limit current, that is, by limiting the discharge current, when the charging current of the Type-C port with the port type of UFP is the same as the discharge current after limitation, it can be completely determined that the two Type-C ports are in the self-charging state, and the Type-C port with the port type of DFP is closed, that is, the discharging Type-C port is closed.

[0055] The first preset time, the second preset time, and the third preset time in this application can be set according to user needs. Since this application detects the current of the Type-C port with a port type of DFP within the second preset time, obtains the discharge limit strategy, and compares the discharge limit strategy with the charging limit strategy, in order to more completely detect the current, the first preset time needs to be set to be less than the second preset time. In an example, the first preset time is set to 1.5 seconds, the second preset time is set to 2 seconds, and the third preset time is set to 0.5 seconds.

[0056] The preset communication protocol is a commonly used communication bus protocol. In one example, the preset communication protocol is an I2C communication bus protocol.

[0057] In the embodiment of the present application, by determining that the port type of the Type-C port is DFP, when the port type of the Type-C port is UFP, by limiting the charging current of the Type-C port of the port type UFP, it is charged according to the charging restriction strategy, and then detecting the current of the Type-C port of the port type DFP, the discharge restriction strategy is obtained. If the discharge restriction strategy is the same as the charging restriction strategy, it is considered that the charging current is limited so that the discharge current is discharged according to the limited charging current, and the two Type-C ports are preliminarily determined to be in the self-charging state. Then, by limiting the discharge current of the Type-C port of the port type DFP so that it is discharged according to the preset limit current, the current of the Type-C port of the port type UFP is obtained, and the real-time current is obtained. If the real-time current is the same as the preset limit current, it is considered that the discharge current is limited so that the charging current is charged according to the limited discharge current, and the two Type-C ports can be completely determined to be in the self-charging state, and the Type-C port of the port type DFP is closed to stop discharging. By limiting the discharge current and charging current of the two Type-C ports with port types of DFP and UFP respectively, it is possible to identify whether the two Type-C interfaces are in the self-charging state, and then shut down the current output of the port in time to avoid loss.

[0058] In one possible embodiment, see Figure 2 , Figure 2 A self-charging identification circuit diagram provided in an embodiment of the present application, such as Figure 2 As shown, the Type-C port includes a Type-C interface, a power chip SC8813, and a fast charging protocol chip SC2021A; the fast charging protocol chip SC2021A is electrically connected to the Type-C interface and the power chip SC8813 respectively.

[0059] Fast charging protocol chip, used to determine the port type of the Type-C port.

[0060] The fast charging protocol chip is also used to, when it is determined that the port type of the Type-C port is UFP, first control the power chip so that the charging current of the Type-C port is charged according to the charging limit strategy within a first preset time period, and then control the power chip so that the charging current of the Type-C port is charged according to the original charging current; when it is determined that its own port type is DFP, control the power chip so that the discharge current of the Type-C port is discharged according to the original discharge current, and detect the current of the Type-C port within a second preset time period to obtain the discharge limit strategy; when the discharge limit strategy is the same as the charging limit strategy, control the power chip so that the discharge current of the Type-C port is discharged according to the preset limit current within a third preset time period; obtain the current of the Type-C port whose port type is UFP to obtain the real-time current; when the real-time current is the same as the preset limit current, determine that the two Type-C ports are in the self-charging state, and close the Type-C port whose port type is DFP.

[0061] Among them, the first preset time length is shorter than the second preset time length.

[0062] The Type-C port in this application includes a Type-C interface, a power chip, and a fast charging protocol chip. Among them, the Type-C interface is a hardware interface, which serves as a connector. The fast charging protocol chip is an important component in the Type-C port, which can identify the port type of the Type-C port. The fast charging protocol chip is usually used in conjunction with the power chip, and the fast charging protocol chip controls the output current of the power chip.

[0063] The fast charging protocol chip SC2021A in Type-C port 1 and the fast charging protocol chip SC2021A in Type-C port 2 can communicate through the I2C communication bus protocol.

[0064] The specific implementation method in the embodiment of the present application is the same as the above embodiment. The only difference is that the specific implementation method is completed through the fast charging protocol chip and the power chip in the Type-C port. The specific implementation method will not be repeated here.

[0065] In a possible embodiment, the charging limitation strategy is to limit the charging current to a first current value and last for a first time; limit the charging current to a second current value and last for a second time, and limit the charging current to a third current value and last for a third time, wherein the sum of the first time, the second time and the third time is a first preset duration.

[0066] In the present application, the charging limit strategy can limit the charging current to multiple current values, each current value lasts for a preset time, and the sum of the durations for each current value is a first preset duration. The current value of the charging current limit and the preset duration for each current value can be set according to design requirements.

[0067] In one example, the charging restriction strategy is: limiting the charging current to 300 mA for 0.5 seconds (seconds); limiting the charging current to 500 mA for 0.5 seconds; limiting the charging current to 300 mA for 0.5 seconds. The first preset time length is 1.5 seconds.

[0068] In a possible embodiment, when the discharge restriction strategy is different from the charge restriction strategy, it is determined that the two Type-C ports are not in a self-charging state, and the Type-C port with a port type of DFP is controlled to discharge according to the original discharge current.

[0069] When the discharge limit strategy is different from the charge limit strategy, it is considered that limiting the charge current does not affect the discharge current, and the two Type-C ports are determined not to be in the self-charging state. The Type-C port with the port type of DFP is controlled to discharge according to the original discharge current.

[0070] In a possible embodiment, when the real-time current is different from the preset limit current, it is determined that the two Type-C ports are not in the self-charging state, and the Type-C port with the port type of DFP is controlled to discharge according to the original discharge current.

[0071] When the real-time current is different from the preset limit current, it is considered that limiting the discharge current does not affect the charging current, and the two Type-C ports are determined not to be in self-charging state. The Type-C port with the port type of DFP is controlled to discharge according to the original discharge current.

[0072] In a possible embodiment, the model of the power chip is SC8823 or SC8815, and the model of the fast charging protocol chip is SC2021A.

[0073] See also Figure 3 , Figure 3 A self-charging identification method is provided in an embodiment of the present application. The method is applied to the above-mentioned self-charging identification circuit, such as Figure 3 As shown, the method includes:

[0074] S1, determine the port type of the device, where the port types include DFP and UFP.

[0075] S2, when determining that its own port type is UFP, first control its own charging current to charge according to the charging restriction strategy within a first preset time period, and then control its own charging current to charge according to the original charging current.

[0076] S3, when determining that its own port type is DFP, control its own discharge current to discharge according to the original discharge current, and detect its own current within the second preset time length to obtain a discharge limit strategy; when the discharge limit strategy is the same as the charging limit strategy, control its own discharge current to discharge according to the preset limit current within the third preset time length; obtain the current of the Type-C port whose port type is UFP to obtain the real-time current; when the real-time current is the same as the preset limit current, determine that the two Type-C ports are in self-charging state, and close the Type-C port whose port type is DFP; wherein the first preset time length is less than the second preset time length.

[0077] In a possible embodiment, the above S3 also includes: the charging limitation strategy is to limit the charging current to a first current value and last for a first time; limit the charging current to a second current value and last for a second time, and limit the charging current to a third current value and last for a third time, wherein the sum of the first time, the second time and the third time is the first preset duration.

[0078] In a possible embodiment, the method further includes:

[0079] S4, when the discharge limit strategy is different from the charge limit strategy, it is determined that the two Type-C ports are not in the self-charging state, and the Type-C port with the port type of DFP is controlled to discharge according to the original discharge current.

[0080] In a possible embodiment, the method further includes:

[0081] S5, when the real-time current is different from the preset limit current, it is determined that the two Type-C ports are not in the self-charging state, and the Type-C port with the port type of DFP is controlled to discharge according to the original discharge current.

[0082] In a specific embodiment, see Figure 4 , Figure 4 A logic flow chart of a self-charging identification method provided in an embodiment of the present application is as follows: Figure 4As shown, the specific process is as follows: Step 1, the port type of the Type-C port is identified within 1s through the fast charging protocol chip SC2021A. When the port type of one Type-C port is DFP, the port type of the other Type-C port is UFP. When the port type is DFP, it discharges externally, and when the port type is UFP, it charges internally; Step 2, when the port type is UFP, the corresponding power chip SC8813 is first configured through the fast charging protocol chip SC2021A to charge at 300mA. The battery is charged with a current of 500mA for 0.5s, then with a current of 300mA for 0.5s (i.e., the charging current on the power supply end VBUS is limited to 300mA and lasts for 0.5s, then the charging current on the power supply end VBUS is limited to 500mA and lasts for 0.5s, then the charging current on the power supply end VBUS is limited to 300mA and lasts for 0.5s), and then charged according to the original charging current; Step 3, when the port type is DFP, control the power chip so that The discharge current of the Type-C port is discharged according to the original discharge current, and the current of the VBUS at the power end of the Type-C port is detected within 2 seconds. If the current changes regularly at 300mA for 0.5s, 500mA for 0.5s, and 300mA for 0.5s, it is preliminarily determined that the two Type-C ports are in the self-charging state; Step 4, after the fast charging protocol chip SC2021A in the Type-C port with the port type of DFP detects the above-mentioned change pattern, the fast charging protocol chip SC2021A controls the corresponding power chip SC8813 to limit the discharge current to 400mA and last for 0.5s, and reads the current of the Type-C port with the port type of UFP through the I2C (or IIC) bus protocol. If the current is 400mA, it is determined that the two Type-C ports are in the self-charging state; Step 5, the power output of the Type-C port with the port type of DFP is turned off through the fast charging protocol chip SC2021A, and it is restored after the USBC-USBC cable is plugged in and unplugged. The current change diagram of the Type-C port in the embodiment of the present application is shown in Figure 5 .

[0083] The present application provides an electronic device, including: the above-mentioned self-charging identification circuit.

[0084] Finally, it should be noted that the above embodiments are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto, and any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A self-charging identification circuit, characterized in that: The self-charging identification circuit includes: two Type-C ports, the Type-C ports are dual-role ports, the Type-C ports are electrically connected via a USBC-USBC cable; the Type-C ports communicate with each other via a preset communication protocol; The Type-C port is used to determine its own port type, wherein the port type includes DFP and UFP, and when the port type of one of the Type-C ports is DFP, the port type of the other Type-C port is UFP; The Type-C port is further used to, when determining that its port type is UFP, first control its own charging current to charge according to the charging restriction strategy within the first preset time, and then control its own charging current to charge according to the original charging current; when determining that its port type is DFP, control its own discharge current to discharge according to the original discharge current, and detect its own current within the second preset time to obtain the discharge restriction strategy; when the discharge restriction strategy is the same as the charging restriction strategy, control its own discharge current to discharge according to the preset restriction current within the third preset time; obtain the current of the Type-C port whose port type is UFP to obtain the real-time current; when the real-time current is the same as the preset restriction current, determine that the two Type-C ports are in the self-charging state, and close the Type-C port whose port type is DFP; Among them, the first preset time length is shorter than the second preset time length.

2. The self-charging identification circuit according to claim 1, characterized in that: The Type-C port includes a Type-C interface, a power chip and a fast charging protocol chip; the fast charging protocol chip is electrically connected to the Type-C interface and the power chip respectively; The fast charging protocol chip is used to determine the port type of the Type-C port; The fast charging protocol chip is also used to, when determining that the port type of the Type-C port is UFP, first control the power chip so that the charging current of the Type-C port is charged according to the charging limit strategy within a first preset time, and then control the power chip so that the charging current of the Type-C port is charged according to the original charging current; when determining that its own port type is DFP, control the power chip so that the discharge current of the Type-C port is discharged according to the original discharge current, and detect the current of the Type-C port within a second preset time to obtain the discharge limit strategy; when the discharge limit strategy is the same as the charging limit strategy, control the power chip so that the discharge current of the Type-C port is discharged according to the preset limit current within a third preset time; obtain the current of the Type-C port whose port type is UFP to obtain the real-time current; when the real-time current is the same as the preset limit current, determine that the two Type-C ports are in the self-charging state, and close the Type-C port whose port type is DFP; Among them, the first preset time length is shorter than the second preset time length.

3. The self-charging identification circuit according to claim 1 or 2, characterized in that: The charging limitation strategy is to limit the charging current to a first current value for a first time; to limit the charging current to a second current value for a second time; and to limit the charging current to a third current value for a third time, wherein the sum of the first time, the second time and the third time is the first preset duration.

4. The self-charging identification circuit according to claim 1 or 2, characterized in that: When the discharge restriction strategy is different from the charge restriction strategy, it is determined that the two Type-C ports are not in a self-charging state, and the Type-C port whose port type is DFP is controlled to discharge according to the original discharge current.

5. The self-charging identification circuit according to claim 1 or 2, characterized in that: When the real-time current is different from the preset limit current, it is determined that the two Type-C ports are not in a self-charging state, and the Type-C port whose port type is DFP is controlled to discharge according to the original discharge current.

6. The self-charging identification circuit according to claim 2, characterized in that: The model of the power chip is SC8823 or SC8815, and the model of the fast charging protocol chip is SC2021A.

7. A self-charging identification method, characterized in that: The method is applied to the self-charging identification circuit according to any one of claims 1 to 6, and the method comprises: Determine the port type of the device, wherein the port type includes DFP and UFP; When determining that its own port type is UFP, firstly control its own charging current to charge according to the charging restriction strategy within the first preset time, and then control its own charging current to charge according to the original charging current; When determining that its own port type is DFP, control its own discharge current to discharge according to the original discharge current, and detect its own current within the second preset time length to obtain a discharge limit strategy; when the discharge limit strategy is the same as the charging limit strategy, control its own discharge current to discharge according to the preset limit current within the third preset time length; obtain the current of the Type-C port whose port type is UFP to obtain the real-time current; when the real-time current is the same as the preset limit current, determine that the two Type-C ports are in the self-charging state, and close the Type-C port whose port type is DFP; Among them, the first preset time length is shorter than the second preset time length.

8. The self-charging identification method according to claim 7, characterized in that: The charging limitation strategy is to limit the charging current to a first current value for a first time; to limit the charging current to a second current value for a second time; and to limit the charging current to a third current value for a third time, wherein the sum of the first time, the second time and the third time is the first preset duration.

9. The self-charging identification method according to claim 7, characterized in that: The method further comprises: When the discharge restriction strategy is different from the charge restriction strategy, it is determined that the two Type-C ports are not in a self-charging state, and the Type-C port whose port type is DFP is controlled to discharge according to the original discharge current.

10. The self-charging identification method according to claim 7, characterized in that: The method further comprises: When the real-time current is different from the preset limit current, it is determined that the two Type-C ports are not in a self-charging state, and the Type-C port whose port type is DFP is controlled to discharge according to the original discharge current.

11. An electronic device, characterized in that: include: A self-charging identification circuit as described in any one of claims 1 to 6.