Control method, circuit, chip and electronic equipment

By sending a charging mode entry command and negotiating a power role switch when a third electronic device is detected in the electronic device, the problem of charging devices that do not support external discharge during data communication is solved, thus enabling charging of devices during data communication.

CN121529888APending Publication Date: 2026-02-13CHIPSEA TECH SHENZHEN CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511465307.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-14
Publication Date
2026-02-13

AI Technical Summary

Technical Problem

Electronic devices that do not support external discharge cannot switch power sources during data communication, making it impossible to charge while conducting data communication.

Method used

When the first electronic device detects the access of the third electronic device, it sends a charging mode entry command to the second electronic device and negotiates a power role switching with the second electronic device to switch the power role from the second power role to the first power role. At the same time, it negotiates a power role with the third electronic device to enable it to charge the second electronic device.

Benefits of technology

It enables charging of a second electronic device during data communication, solving the problem that devices that do not support external discharge cannot be charged during data communication.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121529888A_ABST
    Figure CN121529888A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of charging and data transmission control, in particular to a control method, a circuit, a chip and electronic equipment, if it is detected that third electronic equipment is accessed in the process of first data transmission operation, a charging mode entering instruction is sent to second electronic equipment; performing power supply role switching negotiation with the second electronic equipment, and switching the power supply role to the first power supply role; performing first power supply negotiation with the second electronic equipment and third electronic equipment, so that the third electronic equipment charges the second electronic equipment according to a result of the first power supply negotiation; according to the mode, in the first data transmission operation process, the second electronic equipment enters the first charging mode through the charging mode entering instruction, the power supply role is switched to the first power supply role through the power supply role switching negotiation, and the power of the newly connected third electronic equipment can be transmitted to the second electronic equipment through the first electronic equipment; the second electronic equipment is charged while data communication is carried out.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of charging and data transmission control technology, and in particular to a control method, circuit, chip and electronic device. Background Technology

[0002] Currently, for electronic devices that do not support external discharge, both their data role and power role are determined during data communication. Since no discharge circuit is set up, the power role cannot be switched during data communication, which means that the aforementioned electronic devices that do not support external discharge cannot be charged while conducting data communication. Summary of the Invention

[0003] In view of the above problems, embodiments of this application provide a control method, circuit, chip, and electronic device to solve the technical problem of being unable to charge while conducting data communication.

[0004] In a first aspect, embodiments of this application provide a control method applied to a first electronic device, the control method comprising: If a third electronic device is detected during the first data transmission operation when a second electronic device is connected, a charging mode entry command is sent to the second electronic device; the second electronic device has a first power supply role, and the first electronic device has a second power supply role. When the second electronic device enters the first charging mode in response to the charging mode entry command, it negotiates with the second electronic device to switch the power role from the second power role to the first power role. A first power negotiation is performed with the second electronic device and the third electronic device so that the third electronic device charges the second electronic device according to the result of the first power negotiation.

[0005] Secondly, embodiments of this application provide a control circuit applied to a first electronic device. The control circuit is used to implement the above-described control method, and the control circuit includes: The first PD module corresponding to the second electronic device; The second PD module corresponding to the third electronic device; A control module that is connected to the first PD module and the second PD module respectively.

[0006] Thirdly, embodiments of this application provide a chip, which includes the control circuit described above.

[0007] Fourthly, embodiments of this application provide an electronic device, which includes the chip described above.

[0008] The control method, circuit, chip, and electronic device provided in this application embodiment, when a second electronic device is connected, if a third electronic device is detected to be connected during the first data transmission operation, a charging mode entry command is sent to the second electronic device. When the second electronic device responds to the charging mode entry command and enters the first charging mode, a power role switching negotiation is performed with the second electronic device to switch the power role from the second power role to the first power role. A first power negotiation is performed with the second electronic device and the third electronic device so that the third electronic device charges the second electronic device according to the result of the first power negotiation. In this way, during the first data transmission operation, the charging mode entry command causes the second electronic device to enter the first charging mode, and the power role is switched to the first power role through power role switching negotiation. The power of the newly connected third electronic device can be transmitted to the second electronic device through the first electronic device, realizing charging of the second electronic device while performing data communication.

[0009] These or other aspects of this application will become more apparent in the following description of the embodiments. Attached Figure Description

[0010] Figure 1 The diagram illustrates an application scenario of the control method provided in one embodiment of this application.

[0011] Figure 2 for Figure 1 The diagram shows the structure of a data transmission and power management system for an application scenario in the control method shown.

[0012] Figure 3 for Figure 1 The diagram shows the structure of a data transmission and power management system for another application scenario of the control method shown.

[0013] Figure 4 A schematic diagram of the control circuit provided in an embodiment of this application is shown.

[0014] Figure 5 A schematic diagram of the chip structure provided in an embodiment of this application is shown.

[0015] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of this application is shown. Detailed Implementation

[0016] The embodiments of this application are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application.

[0017] To enable those skilled in the art to better understand the solutions of this application, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.

[0018] In the embodiments of this application, it should be noted that, in this document, relational terms such as first and second are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations.

[0019] Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0020] In the description of the embodiments of this application, the words "example" or "for example" are used to indicate exemplification, illustration, or description. Any embodiment or design described as "example" or "for example" in the embodiments of this application is not to be construed as being more preferred or having more advantages than another embodiment or design. The use of the words "example" or "for example" is intended to present relative concepts in a clear manner.

[0021] Furthermore, in the embodiments of this application, "multiple" refers to two or more. Therefore, in the embodiments of this application, "multiple" can also be understood as "at least two". "At least one" can be understood as one or more, such as one, two, or more. For example, including at least one means including one, two, or more, and is not limited to which ones are included. For example, including at least one of A, B, and C, then it could include A, B, C, A and B, A and C, B and C, or A and B and C.

[0022] It should be noted that in the embodiments of this application, "and / or" describes the relationship between associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. In addition, the character " / ", unless otherwise specified, generally indicates that the associated objects before and after it are in an "or" relationship.

[0023] It should be noted that in the embodiments of this application, "connection" can be understood as electrical connection. The connection between two electrical components can be a direct or indirect connection between the two electrical components. For example, the connection between A and B can be a direct connection between A and B, or an indirect connection between A and B through one or more other electrical components.

[0024] In the background technology, when it is necessary to project photos from a camera onto a target device, the camera is connected to an accessory, and the accessory is connected to the target device. The camera then projects the photos onto the target device via the accessory. During data communication processes such as screen projection, the camera defaults to being a power source. As an electronic device that does not support external discharge, the camera lacks a discharge circuit. Therefore, the camera cannot switch power sources during data communication processes such as screen projection, preventing it from charging simultaneously. If the camera's battery is low during the aforementioned data communication process, the data communication must be stopped before charging can begin.

[0025] One embodiment of this application provides a control method; please refer to [link / reference]. Figure 1 As shown, the control method of this embodiment is applied to a first electronic device, and includes the following steps: Step S11: If a third electronic device is detected to be connected during the first data transmission operation when the second electronic device is connected, a charging mode entry command is sent to the second electronic device; the second electronic device has a first power supply role, and the first electronic device has a second power supply role.

[0026] In this system, a second electronic device is connected to a first electronic device. The first electronic device performs a first data transmission operation, which can be an operation that enables data in the second electronic device to be displayed on a target electronic device. During the execution of the first data transmission operation, the first electronic device is also connected to the target electronic device. The first data transmission operation can be a screen mirroring operation. Optionally, the first data transmission operation needs to be performed in a preset transmission mode. The preset transmission mode can be a data sending mode, i.e., a mode in which the first electronic device can send data. Before entering the preset transmission mode, the first electronic device needs to switch its data role to a second data role. Further, the preset transmission mode can be a data sending mode that sends data from the second electronic device, and the first data transmission operation is an operation that enables data in the second electronic device to be transmitted to the target electronic device, such as a screen mirroring operation. For example, the preset transmission mode can be an Alternative Mode (ALT Mode), the first data transmission operation can be a screen mirroring operation, and the target electronic device can be a display device. The first electronic device enters the Alternative Mode and performs a screen mirroring operation on the target electronic device using data (e.g., photos) from the second electronic device.

[0027] In this configuration, during the execution of the first data transmission operation, the second electronic device has a first power supply role and a second power supply role. The first power supply role can be a power provider role, and the second power supply role can be a power receiver role. The electronic device with the first power supply role can supply power to the electronic device with the second power supply role, and the electronic device with the second power supply role can obtain power from the electronic device with the first power supply role to support its own operation. For example, the electronic device with the first power supply role can be a source device, and the electronic device with the second power supply role can be a sink device.

[0028] The third electronic device is an electronic device with discharge capability, capable of providing power to the second electronic device for charging. For example, the third electronic device can be a power adapter or a PC. When the third electronic device is connected to the first electronic device, it can supply power to the second electronic device for charging. When the first electronic device detects the connection of the third electronic device, the second electronic device assumes a first power supply role. The second electronic device in the first power supply role cannot receive power and needs to switch its power supply role from the first power supply role to the second power supply role.

[0029] The charging mode entry command is used to instruct the second electronic device to enter the first charging mode, thereby enabling the second electronic device to switch power roles within the first charging mode. For example, if the first and second electronic devices interact based on the PD (USB Power Delivery) protocol, the charging mode entry command can be a UVDM (Unstructured Vendor Defined Message) type command. UVDM type commands allow for customized information exchange between PD-enabled USB devices.

[0030] Step S12: When the second electronic device enters the first charging mode in response to the charging mode entry command, negotiate the power role switching with the second electronic device and switch the power role from the second power role to the first power role.

[0031] When the second electronic device receives a charging mode entry command, it enters the first charging mode according to the command. The first electronic device recognizes that the second electronic device has entered the first charging mode. The first electronic device negotiates a power role switching with the second electronic device, switching the power role of the second electronic device to the second power role and switching its own power role to the first power role, so as to meet the power role required for power transmission to the second electronic device.

[0032] Step S13: Perform a first power negotiation with the second electronic device and the third electronic device so that the third electronic device charges the second electronic device according to the result of the first power negotiation.

[0033] In this process, the first electronic device engages in a first power negotiation with the second and third electronic devices. For example, the first power negotiation is used to confirm the parameters of power transmission. The parameters may include charging voltage, charging current and / or charging power, etc. The parameters of power transmission can also be dynamically adjusted. For example, when the second electronic device needs more power, it can request a higher charging voltage or charging current. When the second electronic device has a high temperature, it can request a relatively lower charging voltage or charging current to avoid overheating.

[0034] In this process, the power supply role of the second electronic device has been switched to the second power supply role. After the first power supply negotiation is completed, the third electronic device can supply power to the second electronic device for charging.

[0035] In this embodiment, during the first data transmission operation, the second electronic device is put into the first charging mode by the charging mode entry command, and the power role is switched to the first power role by the power role switching negotiation. The power of the newly connected third electronic device can be transmitted to the second electronic device through the first electronic device, thus realizing the charging of the second electronic device while performing data communication.

[0036] In one implementation, the second electronic device can be an electronic device that does not discharge externally, such as a camera, a portable hard drive, or a USB flash drive; the first electronic device can be an accessory, and can be connected to a display device, etc., to perform a first data transmission operation on the data in the second electronic device.

[0037] As one implementation method, the above control method can be achieved through, for example... Figure 2 The data transmission and power management circuit shown is implemented as follows: Figure 2 As shown, when the second electronic device is connected to the first electronic device, the second interface 20 of the second electronic device is connected to the first connection interface 11 of the first electronic device. The detection pin 201 of the second interface 20 is connected to the detection pin 111 of the first connection interface 11, the cable power pin 202 of the second interface 20 is connected to the cable power pin 112 of the first connection interface 11, and the device power pin 203 of the second interface 20 is connected to the device power pin 113 of the first connection interface 11. For example, the first electronic device and the second electronic device can be connected via a Type-C interface, meaning both the first connection interface 11 and the second interface 20 are Type-C interfaces. Each detection pin can be a CC pin, each cable power pin can be a VCONN pin, and each device power pin can be a VBUS pin.

[0038] When a third electronic device is connected to a first electronic device, the third interface 30 of the third electronic device is connected to the second connection interface 12 of the first electronic device. The detection pin 301 of the third interface 30 is connected to the detection pin 121 of the second connection interface 12, and the device power pin 303 of the third interface 30 is connected to the device power pin 123 of the second connection interface 12. For example, the first and third electronic devices can be connected via a Type-C interface, meaning both the second connection interface 12 and the third interface 30 are Type-C interfaces, each detection pin can be a CC pin, and each device power pin can be a VBUS pin.

[0039] The second electronic device can disconnect the second pull-up unit 204 connected to the detection pin 201, while simultaneously connecting the second pull-down unit 205 to the detection pin 201, thereby switching its power supply role to the second power supply role. Exemplarily, the second pull-up unit 204 may include a second pull-up current source I. p2Second pull-up current source I p2 One end is connected to the second power supply VDD2 via a switch, and the second pull-up current source I p2 The other end is connected to the detection pin 201 via a cable; the second pull-down unit 205 may include a second pull-down resistor R. d2 The second pull-down resistor R d2 One end is connected to the detection pin 201, and the second pull-down resistor R d2 The other end is grounded via a switch.

[0040] The first electronic device can connect the first pull-up unit 114 to the detection pin 111 and simultaneously disconnect the first pull-down unit 115 from the detection pin 111 to switch its power supply role to the first power supply role. For example, the first pull-up unit 114 may include a first pull-up current source I. p1 First pull-up current source I p1 One end is connected to the first power supply VDD1 via a switch, and the first pull-up current source I p1 The other end is connected to the detection pin 111 via a cable; the first pull-down unit 115 may include a first pull-down resistor R. d1 First pull-down resistor R d1 One end is connected to the detection pin 111, and the first pull-down resistor R d1 The other end is grounded via a switch.

[0041] The first electronic device is equipped with a first PD module 131, which is connected to the detection pin 111 via a cable. The first PD module 131 can be used to interact with the second electronic device.

[0042] The first electronic device is equipped with a second PD module 132, which is connected to the detection pin 121 via a cable. The second PD module 132 can be used to interact with the third electronic device.

[0043] In some implementations, the first PD module 131 can be used to switch the power supply role of the first electronic device. Please continue reading. Figure 2 As shown, in the first electronic device, the first pull-up unit 114 and the first pull-down unit 115 are respectively connected to the first PD module 131. The first PD module 131 can control the switch in the first pull-up unit 114 to turn on or off in order to control the first pull-up unit 114 to connect or disconnect from the detection pin 111. The first PD module 131 can control the switch in the first pull-down unit 115 to turn on or off in order to control the first pull-down unit 115 to connect or disconnect from the detection pin 111.

[0044] As one implementation method, step S13 specifically includes the following steps: Step S21: Receive the first power negotiation request sent by the third electronic device.

[0045] The first power negotiation request may include the voltage and current that the third electronic device can provide. For example, when the third electronic device is a power adapter or a PC, the PDO (Power Data Object) data structure in the PD protocol can be used. The third power negotiation request could be PD: PDO(5V@0.1A), indicating that the available power voltage is 5V and the available current is 0.1A. Alternatively, the first power negotiation request may further include whether the power configuration of the third electronic device supports preset communication functions. For example, when the third electronic device is a power adapter, the PDO (Power Data Object) data structure in the PD protocol can be used. The first power negotiation request may further include PD: PDO(USB Communications Capable->0), indicating that the power configuration of the third electronic device does not support USB communication functions. This means that although the power configuration can provide power, it does not support data communication via the USB interface. For example, when the third electronic device is a PC computer, the PDO (Power DataObject) data structure in the PD protocol can be used. The first power negotiation request can further include PD: PDO (USB CommunicationsCapable->1), indicating that the power configuration of the third electronic device supports USB communication function. This means that the power configuration can provide power and also supports data communication through the USB interface.

[0046] Step S22: Send a first power negotiation request to the second electronic device, so that the second electronic device responds to the first power negotiation request by sending a power negotiation message to the first electronic device.

[0047] Upon receiving the first power negotiation request, the second electronic device generates a power negotiation message for the first power negotiation request. The power negotiation message may include the voltage required for charging the second electronic device and the current required for charging the second electronic device. For example, the power negotiation message may adopt the PDO (Power Data Object) data structure in the PD protocol. The power negotiation message may be PD: PDO(5V@0.1A), which means that the power supply voltage required for charging is 5V and the current required for charging is 0.1A.

[0048] Step S23: Send a corresponding power negotiation message to the third electronic device, so that the third electronic device responds to the power negotiation message and sends a first response message to the first electronic device.

[0049] The first response message generated by the third electronic device in response to the aforementioned power negotiation message can be used to characterize that the third electronic device receives the voltage and current required for charging and that the third electronic device is ready to output power and has reached the required operating conditions. For example, the first response message may include Accept in the PD protocol and PS_RDY (Power Supply Ready) in the PD protocol.

[0050] Step S24: Receive the first response message sent by the third electronic device, and send the first response message to the second electronic device so that the third electronic device can transmit power to the second electronic device.

[0051] When the second electronic device receives the first response message, the power negotiation is completed, and the third electronic device supplies power to the first electronic device.

[0052] In this embodiment, during the first data transmission operation, the second electronic device and the third electronic device negotiate power through the first electronic device, enabling the second electronic device to be charged while conducting data communication.

[0053] In some implementations, step S21 is executed by the second PD module 132. Steps S22, S23, and S24 can be implemented through transparent transmission interaction; please refer to the following documentation. Figure 2 As shown, the first electronic device is also provided with a control module 133, which is connected to the first PD module 131 and the second PD module 132 respectively. The first PD module 131 and the second PD module 132 are not directly connected.

[0054] In step S22, when a first power negotiation request is sent to the second electronic device, the second PD module 132 sends the first power negotiation request to the control module 133, the control module 133 sends the first power negotiation request to the first PD module 131, and the first PD module 131 then sends the first power negotiation request to the second electronic device. In step S23, when a power negotiation message is sent to the third electronic device, the first PD module 131 sends the power negotiation message to the control module 133, the control module 133 sends the power negotiation message to the second PD module 132, and the second PD module 132 then sends the power negotiation message to the third electronic device. In step S24, when a first response message is sent to the second electronic device, the second PD module 132 sends the first response message to the control module 133, the control module 133 sends the first response message to the first PD module 131, and the first PD module 131 then sends the first response message to the second electronic device.

[0055] In some implementations, please refer to Figure 3 As shown, in Figure 2 Based on the above, the first electronic device further includes a third pull-up unit 116 and a third pull-down unit 117 to extend the communication between the first electronic device and the third electronic device. The third pull-up unit 116 and the third pull-down unit 117 are respectively connected to the second PD module 132.

[0056] The second PD module 132 can control the on or off of the switch in the third pull-up unit 116 to control the connection or disconnection of the third pull-up unit 116 with the detection pin 121. The second PD module 132 can also control the on or off of the switch in the third pull-down unit 117 to control the connection or disconnection of the third pull-down unit 117 with the detection pin 121.

[0057] For example, the third pull-up unit 116 may include a third pull-up current source I. p3 Third pull-up current source I p3 One end is connected to the third power supply VDD3 via a switch, and the third pull-up current source I p3 The other end is connected to the detection pin 121 via a cable; the third pull-down unit 117 may include a third pull-down resistor R. d3 The third pull-down resistor R d3 One end is connected to the detection pin 121, and the third pull-down resistor R d3 The other end is grounded via a switch.

[0058] In one implementation, the following steps are included after step S13: Step S14: If the third electronic device is detected to be unplugged, a charging mode exit command is sent to the second electronic device so that the second electronic device exits the first charging mode in response to the charging mode exit command.

[0059] In this embodiment, when the third electronic device is unplugged, it can no longer charge the second electronic device. The charging mode exit command causes the second electronic device to exit the first charging mode, but the power supply role of the second electronic device remains the second power supply role. When the third electronic device is connected to the first electronic device again, there is no need to switch the power supply role; it can directly enter the power negotiation process.

[0060] For example, step S14 can be jointly performed by the first PD module 131, the second PD module 132, and the control module 133. In step S14, when the second PD module 132 detects that the third electronic device has been unplugged and sends a charging mode exit command to the second electronic device, the second PD module 132 sends the charging mode exit command to the control module 133, the control module 133 sends the charging mode exit command to the first PD module 131, and the first PD module 131 then sends the charging mode exit command to the second electronic device.

[0061] In some implementations, after step S14, the following steps are also included: Step S15: If a third electronic device is detected to be connected, a charging mode entry command is sent to the second electronic device.

[0062] In this process, after the third electronic device is unplugged and then reconnected to the first electronic device, the first electronic device sends a charging mode entry command again, causing the second electronic device to re-enter the first charging mode.

[0063] Step S16: When the second electronic device enters the first charging mode in response to the charging mode entry command, a second power negotiation is performed with the second electronic device and the third electronic device so that the third electronic device charges the second electronic device according to the result of the second power negotiation.

[0064] When the third electronic device is unplugged, the power role of the second electronic device remains the second power role. At this time, there is no need to switch the power role. The process of the second power negotiation can be similar to the process of the first power negotiation. Please refer to the content of the first power negotiation mentioned above. It will not be elaborated here.

[0065] In this embodiment, after the third electronic device is unplugged and then reconnected to the first electronic device, the second electronic device does not need to switch power sources, which helps to improve charging efficiency.

[0066] For example, step S15 can be jointly completed by the first PD module 131, the second PD module 132, and the control module 133. In step S15, when the second PD module 132 detects the access of the third electronic device and sends a charging mode entry command to the second electronic device, the second PD module 132 sends the charging mode entry command to the control module 133, the control module 133 sends the charging mode entry command to the first PD module 131, and the first PD module 131 then sends the charging mode entry command to the second electronic device.

[0067] For example, step S16 can be completed by the first PD module 131, the second PD module 132 and the control module 133. In step S16, the specific process of the second power negotiation can be similar to the specific process of the first power negotiation. For details, please refer to the description of steps S21 to S24.

[0068] In one implementation, the following steps are included before step S11: Step S31: When the second electronic device is detected to be connected, a third power negotiation is performed with the second electronic device to switch the power role to the second power role and the data role to the second data role; The third power supply negotiation may include the following steps: First, a power negotiation request is sent to the second electronic device, so that the second electronic device responds to the power negotiation request and sends a corresponding response message to the first electronic device.

[0069] A power negotiation request is used to characterize the power capability of a first electronic device. For example, the power negotiation request may include the voltage, current, and / or power that the first electronic device can provide. When the first electronic device is an accessory and cannot provide power to charge a second electronic device, the power negotiation request may include the voltage and current that the first electronic device can provide. In this case, the current that can be provided is 0. For example, the PDO (Power Data Object) data structure in the PD protocol can be used. The first power negotiation request can be PD: PDO(5V@0A), indicating that the power supply voltage that can be provided is 5V and the current that can be provided is 0A.

[0070] The corresponding response message from the second electronic device can be used to indicate agreement to the power negotiation request. When the first electronic device is an accessory, it cannot provide power to the second electronic device. The second electronic device will not draw current from the cable where the device power pin 203 is located. The second electronic device sets its power role to the first power role and its data role to the first data role. For example, the first PD module 131 can be used to perform the above step S31.

[0071] In this context, the first data role can be the one receiving data, and the second data role can be the one providing data. Specifically, the electronic device of the first data role is used to receive data, and the electronic device of the second data role is used to send data. For example, the electronic device of the first data role can be a DFP (Downstream Facing Port) device, and the electronic device of the second data role can be a UFP (Upstream Facing Port) device.

[0072] Then, after receiving the corresponding response message, the first electronic device switches its power role to the second power role and its data role to the second data role.

[0073] In this step, through power negotiation, the second electronic device can learn about the power capabilities of the first electronic device, making it easier to perform corresponding operations based on those power capabilities.

[0074] Step S32: Perform the first data transmission operation in the preset transmission mode.

[0075] When the data role of the first electronic device is switched to the second data role, the first electronic device can enter the preset transmission mode and perform the first data transmission operation.

[0076] In this embodiment, through third power negotiation, the first electronic device switches its power role to the second power role and its data role to the second data role, so that the first electronic device can switch to the data role that enables the first data transmission operation.

[0077] For example, step S31 can be executed by the first PD module 131, and step S32 can be executed by the main control module 133.

[0078] In some implementations, the following steps are included before step S31: Step S30: When accessing the second electronic device, send a first message data carrying device type information to the second electronic device so that the second electronic device can use the device type information.

[0079] Once the first electronic device and the second electronic device are connected, the second electronic device can send communication messages to the first electronic device. These communication messages can be used to obtain the identification information of the first electronic device. For example, the identification information can include at least device type information, and may further include supplier ID, product ID, cable capabilities, etc.

[0080] Upon receiving the communication message, the first electronic device responds by sending first message data to the second electronic device. The first message data contains device type information, which is used to characterize the type of the first electronic device.

[0081] For example, the first electronic device and the second electronic device can communicate based on the PD (USB Power Delivery) protocol. The communication message can be an SOP' Discover Identity message, and the first message data can be an SOP' message or an SOP'' message.

[0082] For example, the device type information of the first electronic device can be an accessory, or the device type information of the first electronic device can be a VPA (VCONN-Powered Accessory).

[0083] For example, from [continue reading] Figure 2 As shown, after the first electronic device and the second electronic device are connected, the second electronic device can supply power to the first electronic device through the connection between cable power pin 112 and cable power pin 202, enabling the first electronic device to operate normally. That is, the second electronic device supplies power to the first electronic device through the VCONN pin. Furthermore, the first PD module 131 can be used to execute the above step S30.

[0084] In one implementation, when the second electronic device has insufficient power, it needs to be charged by a third electronic device before it can be connected to the first electronic device. Alternatively, the third electronic device and the second electronic device can be connected to the first electronic device simultaneously, or the third electronic device can be connected to the first electronic device first, followed by the second electronic device. Therefore, before step S11, the following steps are also included: Step S41: If a third electronic device is connected, and a second electronic device is detected to be connected and in a low-power mode, a fourth power negotiation is performed with the second and third electronic devices so that the third electronic device charges the second electronic device according to the result of the fourth power negotiation.

[0085] First, receive a power negotiation request sent by a third electronic device.

[0086] The power negotiation request may include the voltage and current that the third electronic device can provide. Then, the power negotiation request is sent to the second electronic device, so that the second electronic device responds to the power negotiation request and sends a corresponding power negotiation message to the first electronic device.

[0087] Upon receiving the power negotiation request, the second electronic device generates a power negotiation message for the power negotiation request. The power negotiation message may include the voltage required for charging the second electronic device and the current required for charging the second electronic device.

[0088] Then, a corresponding power negotiation message is sent to the third electronic device, so that the third electronic device responds to the power negotiation message and sends a corresponding response message to the first electronic device.

[0089] The corresponding response message generated by the third electronic device in response to the aforementioned power negotiation message can be used to characterize that the third electronic device receives the voltage and current required for the aforementioned charging and that the third electronic device is ready to output power and has reached the required operating conditions.

[0090] Finally, the system receives the corresponding response message from the third electronic device and sends the response message to the second electronic device, so that the third electronic device can transmit power to the second electronic device.

[0091] Upon receiving the response message, the second electronic device completes the power negotiation, and the third electronic device supplies power to the first electronic device.

[0092] For example, step S41 can be jointly performed by the first PD module 131, the second PD module 132, and the control module 133. In step S41, when the second PD module 132 receives a power negotiation request from the third electronic device and sends a power negotiation request to the second electronic device, the second PD module 132 sends the power negotiation request to the control module 133, the control module 133 sends the power negotiation request to the first PD module 131, and the first PD module 131 then sends the power negotiation request to the second electronic device. When the first PD module 131 receives a power negotiation message from the second electronic device and sends a power negotiation message to the third electronic device, the first PD module 131 sends the power negotiation message to the control module 133, the control module 133 sends the power negotiation message to the second PD module 132, and the second PD module 132 then sends the power negotiation message to the third electronic device. When the second PD module 132 receives a response message from the third electronic device and sends a response message to the second electronic device, the second PD module 132 sends the response message to the control module 133, the control module 133 sends the response message to the first PD module 131, and the first PD module 131 then sends the response message to the second electronic device.

[0093] In some implementations, after step S41, the following steps are also included: Step S42: When the second electronic device exits the low-power mode, perform a fifth power negotiation with the second electronic device to switch the power role to the second power role and the data role to the second data role; The fifth power negotiation may include the following steps: First, a power negotiation request is sent to the second electronic device, so that the second electronic device responds to the power negotiation request and sends a corresponding response message to the first electronic device.

[0094] A power negotiation request is used to characterize the power capability of a first electronic device. For example, the power negotiation request may include the voltage, current, and / or power that the first electronic device can provide. When the first electronic device is an accessory and cannot provide power to charge a second electronic device, the power negotiation request may include the voltage and current that the first electronic device can provide. In this case, the current that can be provided is 0. For example, the PDO (Power Data Object) data structure in the PD protocol can be used. The first power negotiation request can be PD: PDO(5V@0A), indicating that the power supply voltage that can be provided is 5V and the current that can be provided is 0A.

[0095] The corresponding response message of the second electronic device can be used to indicate agreement to the power negotiation request. When the first electronic device is an accessory, it cannot provide power to the second electronic device. The second electronic device will not draw current from the cable where the device power pin 203 is located. The second electronic device sets the power role to the first power role and the data role to the first data role.

[0096] Then, after receiving the corresponding response message, the first electronic device switches its power role to the second power role and its data role to the second data role.

[0097] In this step, through power negotiation, the second electronic device can learn about the power capabilities of the first electronic device, making it easier to perform corresponding operations based on those power capabilities.

[0098] Step S43: Perform the first data transmission operation in the preset transmission mode.

[0099] When the data role of the first electronic device is switched to the second data role, the first electronic device can enter the preset transmission mode and perform the first data transmission operation.

[0100] In this embodiment, through the fifth power negotiation, the first electronic device switches its power role to the second power role and its data role to the second data role, so that the first electronic device can switch to the data role that enables the first data transmission operation.

[0101] For example, step S42 can be executed by the first PD module 131, and step S43 can be executed by the main control module 133.

[0102] In one implementation, when the third electronic device is an electronic device capable of data communication, the third electronic device needs to process the data in the second electronic device.

[0103] Following step S13, the following steps are also included: Step S17: When the third electronic device requests data transmission, the first data transmission operation is stopped.

[0104] The third electronic device can send a data transmission request to the first electronic device. In response to the data transmission request, the first electronic device stops performing the first data transmission operation and exits the preset transmission mode.

[0105] Step S18: Negotiate a data role switch with the second electronic device to switch the data role from the second data role to the first data role in order to perform the second data transmission operation.

[0106] In this process, through data role switching negotiation, the data role of the first electronic device is switched to the first data role, and the data role of the second electronic device is switched to the second data role. The second electronic device can send data to the first electronic device, and the first electronic device can receive data sent by the second electronic device.

[0107] The data role switching negotiation may include the following steps: First, a data role switching request is sent to the second electronic device, so that the second electronic device responds to the data role switching request and sends a corresponding response message to the first electronic device.

[0108] The data role switching request is used to request an exchange of data roles with the second electronic device. Upon receiving the data role switching request, the second electronic device generates a corresponding response message, which is used to reply to the data role switching request sent by the first electronic device. For example, the response message may indicate agreement to exchange data roles.

[0109] In this process, the second electronic device sends a corresponding response message to the first electronic device, and the second electronic device switches its data role from the first data role to the second data role.

[0110] Then, upon receiving the corresponding response message, the data role is switched from the second data role to the first data role, and the second data transmission operation is performed.

[0111] The first electronic device can learn from the corresponding response message received that the second electronic device agrees to exchange data roles and switches its own data role to the first data role.

[0112] In this process, through data role switching negotiation, the data role of the first electronic device is switched to the first data role, the data role of the second electronic device is switched to the second data role, the second electronic device can send data to the third electronic device through the first electronic device, and the first electronic device can receive data.

[0113] The second data transmission operation can be an operation that copies data from a second electronic device to a third electronic device.

[0114] In this embodiment, after stopping the first data transmission operation, a data role switch is performed, enabling the first electronic device to perform the second data transmission operation, which is beneficial for expanding the functionality of the first electronic device.

[0115] For example, step S17 can be executed by the second PD module 132 and the control module 133. The second PD module 132 receives a data transmission request sent by the third electronic device and sends the data transmission request to the control module 133. The control module 133 then stops performing the first data transmission operation. Step S18 can be executed by the first PD module 131 and the control module 133. The first PD module 131 negotiates a data role switch with the second electronic device, switching the data role from the second data role to the first data role. After the data role of the first electronic device switches from the second data role to the first data role, the control module 133 performs the second data transmission operation.

[0116] In some implementations, after step S18, the following steps are also included: Step S19: When the third electronic device is unplugged, negotiate a data role switching with the second electronic device to switch the data role from the first data role to the second data role in order to perform the first data transmission operation in the preset transmission mode.

[0117] After the second data transmission operation is completed, the third electronic device is unplugged, and the first electronic device can continue to perform the first data operation.

[0118] Specifically, when the third electronic device is unplugged, a data role switching request is sent to the second electronic device, so that the second electronic device responds to the data role switching request and sends a corresponding response message to the first electronic device; when the response message is received, the data role is switched from the first data role to the second data role, so as to perform the first data transmission operation in the preset transmission mode.

[0119] The data role switching request is used to request an exchange of data roles with the second electronic device. Upon receiving the data role switching request, the second electronic device generates a corresponding response message, which replies to the data role switching request sent by the first electronic device. For example, the response message could be an agreement to exchange data roles.

[0120] The second electronic device sends a corresponding response message to the first electronic device, switching the data role from the second data role to the first data role.

[0121] The first electronic device can learn from the corresponding response message received that the second electronic device agrees to exchange data roles and switches its own data role to the second data role.

[0122] For example, step S19 can be completed jointly by the first PD module 131, the second PD module 132, and the control module 133. The second PD module 132 detects that the third electronic device is unplugged and sends the message that the third electronic device is unplugged to the control module 133. The control module 133 sends the message that the third electronic device is unplugged to the first PD module 131. The first PD module 131 negotiates with the second electronic device to switch the data role from the first data role to the second data role. The control module 133 performs the first data transmission operation in the preset transmission mode.

[0123] One embodiment of this application provides a control circuit 100, which is applied to a first electronic device. This control circuit 100 is used to implement the control method described above. Please refer to [link to relevant documentation]. Figure 4 As shown, the control circuit 100 includes: a first PD module 131, a second PD module 132, and a control module 133.

[0124] The first PD module 131 corresponds to the second electronic device, the second PD module 132 corresponds to the third electronic device, and the control module 133 is connected to the first PD module 131 and the second PD module 132 respectively.

[0125] For specific application scenarios of the control circuit 100, please refer to [link / reference needed]. Figure 2 as well as Figure 3 As shown. Exemplarily, the first PD module 131 is used to connect the first pull-up unit 114 to the detection pin 111, and at the same time disconnect the first pull-down unit 115 from the detection pin 111, so as to switch the power supply role of the first electronic device to the first power supply role.

[0126] The first PD module 131, the second PD module 132, and the control module 133 can be specifically referred to in the above control method, and will not be described in detail here.

[0127] In this embodiment, during the first data transmission operation, the second electronic device is put into the first charging mode by the charging mode entry command, and the power role is switched to the first power role by the power role switching negotiation. The power of the newly connected third electronic device can be transmitted to the second electronic device through the first electronic device, thus realizing the charging of the second electronic device while performing data communication.

[0128] One embodiment of this application provides a chip 200; please refer to [link / reference]. Figure 5As shown, chip 200 includes the aforementioned control circuit 100. A chip (Integrated Circuit, IC) can be, but is not limited to, a System-on-Chip (SoC) chip or a System-in-Package (SIP) chip. In this embodiment, during the first data transmission operation, the chip initiates a charging mode entry command to put the second electronic device into a first charging mode. Through power role switching negotiation, the power role is switched to the first power role. Power from the newly connected third electronic device can be transferred from the first electronic device to the second electronic device, thus enabling charging of the second electronic device simultaneously with data communication.

[0129] This application also provides an electronic device 300, please refer to... Figure 6 As shown, the electronic device 300 includes a device body and a chip 200 as described above disposed within the device body. The electronic device 300 may be, for example, an accessory.

[0130] In this embodiment, during the first data transmission operation, the second electronic device enters the first charging mode via a charging mode entry command. The power role is switched to the first power role through power role switching negotiation. The power of the newly connected third electronic device can be transmitted from the first electronic device to the second electronic device, thus realizing charging of the second electronic device while conducting data communication.

[0131] The above description is merely an embodiment of this application. It should be noted that those skilled in the art can make improvements without departing from the inventive concept of this application, but these improvements all fall within the protection scope of this application.

Claims

1. A control method, characterized in that, The control method, applied to a first electronic device, includes: If a third electronic device is detected during the first data transmission operation when a second electronic device is connected, a charging mode entry command is sent to the second electronic device; the second electronic device has a first power supply role, and the first electronic device has a second power supply role. When the second electronic device enters the first charging mode in response to the charging mode entry command, it negotiates with the second electronic device to switch the power role from the second power role to the first power role. A first power negotiation is performed with the second electronic device and the third electronic device so that the third electronic device charges the second electronic device according to the result of the first power negotiation.

2. The control method according to claim 1, characterized in that, After performing a first power negotiation with the second electronic device and the third electronic device to enable the third electronic device to charge the second electronic device according to the result of the first power negotiation, the method further includes: If the third electronic device is detected to be unplugged, a charging mode exit command is sent to the second electronic device so that the second electronic device exits the first charging mode in response to the charging mode exit command.

3. The control method according to claim 2, characterized in that, The step of sending a charging mode exit command to the second electronic device if the third electronic device is detected to be unplugged, so that the second electronic device exits the first charging mode in response to the charging mode exit command, further includes: If the third electronic device is detected to be connected, a charging mode entry command is sent to the second electronic device; When the second electronic device enters the first charging mode in response to the charging mode entry command, it performs a second power negotiation with the second electronic device and the third electronic device so that the third electronic device charges the second electronic device according to the result of the second power negotiation.

4. The control method according to claim 1, characterized in that, If, during the first data transmission operation, a third electronic device is detected to be connected when the second electronic device is connected, before sending a charging mode entry command to the second electronic device, the method further includes: When the second electronic device is detected to be connected, a third power negotiation is performed with the second electronic device to switch the power role to the second power role and the data role to the second data role; In the preset transmission mode, the first data transmission operation is performed.

5. The control method according to claim 1, characterized in that, If, during the first data transmission operation, a third electronic device is detected to be connected when the second electronic device is connected, before sending a charging mode entry command to the second electronic device, the method further includes: When a third electronic device is connected, if the second electronic device is detected to be connected and in a low-power mode, a fourth power negotiation is performed with the second electronic device and the third electronic device so that the third electronic device charges the second electronic device according to the result of the fourth power negotiation.

6. The control method according to claim 5, characterized in that, After the third electronic device charges the second electronic device according to the result of the fourth power negotiation, the method further includes: When the second electronic device exits the low-power mode, a fifth power negotiation is performed with the second electronic device to switch the power role to the second power role and the data role to the second data role; In the preset transmission mode, the first data transmission operation is performed.

7. The control method according to claim 1, characterized in that, After performing a first power negotiation with the second electronic device and the third electronic device to enable the third electronic device to charge the second electronic device according to the result of the first power negotiation, the method further includes: When the third electronic device requests data transmission, the first data transmission operation is stopped; Negotiate a data role switch with the second electronic device to switch the data role from the second data role to the first data role in order to perform the second data transmission operation.

8. The control method according to claim 7, characterized in that, After negotiating a data role switch with the second electronic device to switch the data role from the second data role to the first data role for the second data transmission operation, the method further includes: When the third electronic device is unplugged, it negotiates a data role switch with the second electronic device to switch the data role from the first data role to the second data role in order to perform the first data transmission operation in a preset transmission mode.

9. The control method according to claim 1, characterized in that, The first power negotiation with the second electronic device and the third electronic device, so that the third electronic device charges the second electronic device according to the result of the first power negotiation, includes: Receive the first power negotiation request sent by the third electronic device; Send a first power negotiation request to the second electronic device, so that the second electronic device responds to the first power negotiation request by sending a power negotiation message to the first electronic device; Send a corresponding power negotiation message to the third electronic device, so that the third electronic device responds to the power negotiation message and sends a first response message to the first electronic device; The system receives the first response message sent by the third electronic device and sends the first response message to the second electronic device, so that the third electronic device can transmit power to the second electronic device.

10. A control circuit, characterized in that, Applied to a first electronic device, the control circuit is used to implement the control method as described in any one of claims 1 to 9, the control circuit comprising: The first PD module corresponding to the second electronic device; The second PD module corresponding to the third electronic device; A control module that is connected to the first PD module and the second PD module respectively.

11. The control circuit according to claim 10, characterized in that, The first PD module is used to connect the first pull-up unit in the first electronic device to the detection pin of the first electronic device, and disconnect the connection between the first pull-down unit in the first electronic device and the detection pin of the first electronic device, so as to switch the power supply role of the first electronic device to the first power supply role.

12. A chip, characterized in that, Includes the control circuit as described in claim 11.

13. An electronic device, characterized in that, Including the chip as described in claim 12.