CN113949116A - Data transmission method and device - Google Patents

Data transmission method and device Download PDF

Info

Publication number
CN113949116A
CN113949116A CN202011175402.7A CN202011175402A CN113949116A CN 113949116 A CN113949116 A CN 113949116A CN 202011175402 A CN202011175402 A CN 202011175402A CN 113949116 A CN113949116 A CN 113949116A
Authority
CN
China
Prior art keywords
electronic device
signal
message
pin
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011175402.7A
Other languages
Chinese (zh)
Other versions
CN113949116B (en
Inventor
彭江
李宗健
张明威
杨成军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202211602263.0A priority Critical patent/CN115864582A/en
Priority to EP21842808.4A priority patent/EP4181341A4/en
Priority to CN202210012459.8A priority patent/CN114297127B/en
Priority to CN202180003825.7A priority patent/CN114631244A/en
Priority to PCT/CN2021/106599 priority patent/WO2022012644A1/en
Priority to US18/014,529 priority patent/US20230261477A1/en
Priority to CN202211613029.8A priority patent/CN115912567A/en
Priority to CN202210012219.8A priority patent/CN114297126B/en
Publication of CN113949116A publication Critical patent/CN113949116A/en
Application granted granted Critical
Publication of CN113949116B publication Critical patent/CN113949116B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/0063Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries with circuits adapted for supplying loads from the battery
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/0029Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries with safety or protection devices or circuits
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J2207/00Indexing scheme relating to details of circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J2207/20Charging or discharging characterised by the power electronics converter

Landscapes

  • Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The application discloses a data transmission method and a data transmission device, wherein a first electronic device is connected with a second electronic device through a third electronic device, the third electronic device comprises a first data signal line and a second data signal line, and when the method is applied to the first electronic device, the connection with the second electronic device can be detected; sending a first message through a first pin; the first pin is connected with a first data signal line; receiving a second message through a second pin; the second pin is connected with a second data signal line; the first message and the second message are used for setting charging of the first electronic device.

Description

Data transmission method and device
Cross Reference to Related Applications
The present application claims priority from the chinese patent application filed on 15/07/2020 and entitled "a data transmission method, apparatus and system" by the chinese patent office, application number 202010682894.2, the entire contents of which are incorporated herein by reference.
Technical Field
The present application relates to the field of charging technologies, and in particular, to a data transmission method and apparatus.
Background
Along with the diversification and large screen trend of the functions of the intelligent terminal, the power consumption of the intelligent terminal is gradually increased, the capacity of a battery is gradually increased, and the intelligent terminal has stronger and stronger requirements on quick charging. The industry has evolved a variety of fast charge protocols in recent years.
One Type of fast charging protocol is a single-wire communication (CC) fast charging protocol, a representative of the CC communication protocol is a USB PD, and an end product in the USB PD can support a USB Type C interface defined by a USB association, referred to as a Type-C interface, where the USB Type-C interface has an advantage that: support USB interface two-sided to insert, have more slim, succinct design, have more bold circuit transmission (the biggest 100W), because these advantages can realize the quick charge to terminal product to satisfy customer's the demand of charging. However, the USB PD protocol cannot be applied to other charging scenarios except for the Type-C to Type-C interface, for example, interface scenarios such as Type a to Type B, and the USB PD protocol has great restrictions on charging power and specification, and is relatively complex to implement and relatively high in cost.
Another type of fast charging protocol is a fast charging protocol based on D +/D- (Data +/Data-) channel communication, such as hua be SCP, OPPO VOOC, QC, samsung AFC, etc., however, in the existing charging process based on D +/D- (Data +/Data-) channel communication, the transmission efficiency of charging Data or instructions is very low, and in the charging process of a terminal product, the transmission of information to be transmitted may be delayed due to the charging state of a terminal or a power supply device or sudden failure, which may cause an impact on the security of the charging system.
Disclosure of Invention
The application provides a data transmission method and device, which are used for improving the data transmission efficiency of a D +/D-channel in the charging process.
In a first aspect, the present application provides a data transmission method applied to a first electronic device, where the first electronic device is connected to a second electronic device through a third electronic device, and the third electronic device includes a first data signal line and a second data signal line, where the method includes: detecting a connection with the second electronic device; sending a first message through a first pin; the first pin is connected with a first data signal line; receiving a second message through a second pin; the second pin is connected with a second data signal line; the first message and the second message are used for setting charging of the first electronic device.
Unlike the prior art, the transmission and reception of messages between the first electronic device and the second electronic device can only be performed through the D-data signal line. By the method, the messages can be sent and received on different data signal lines, so that the electronic equipment can send the messages to the opposite terminal without waiting for the completion of the sending of the opposite terminal, and the transmission efficiency of the data on the data signal lines is effectively improved. In addition, compared with the case that the second electronic device is used as a device to be charged and the second electronic device is used as a power supply device, in the prior art, only the scheme that the first electronic device actively sends a message to the second electronic device and the second electronic device passively responds is available.
In a possible implementation manner, the first pin is a pin connected to a negative signal data line; the second pin is connected with the positive signal data line.
In a possible implementation manner, the first pin is a pin connected to a positive signal data line; the second pin is connected with the negative signal data line.
By the method, the pin of the positive signal data line (such as D +) can be set as the first pin, the pin of the negative signal data line (such as D-) can be set as the second pin, the pin of the positive signal data line (such as D +) can also be set as the second pin, and the pin of the negative signal data line (such as D-) can be set as the first pin, so that signals can be independently sent or received on different data lines, duplex transmission on the signal data line is realized, different duplex transmission modes can be set according to requirements, and therefore, the data transmission efficiency and the flexibility of data transmission are effectively improved.
In a possible implementation manner, the connection between the first pin or the second pin and a second electronic device is detected, and the second electronic device is determined to be a dedicated charging interface DCP device; sending a first pulse signal through the first pin; and detecting an electric signal of the second electronic equipment through the second pin to confirm that the second electronic equipment supports a quick charging mode.
In consideration of the fact that the time consumption of the communication protocol in the prior art is long, by the method for sending the first pulse signal, the first electronic device and the second electronic device support the handshake protocol for charging the battery of the first electronic device through the quick charging mode, and the second electronic device can quickly detect the first pulse signal, so that the time for entering the quick charging mode is shortened, and particularly when the electric quantity of the first electronic device is too low, the first electronic device can quickly enter the quick charging mode to improve the charging experience.
In a possible implementation manner, the second pin is a pin connected to a positive signal data line, and the electrical signal is a second response signal.
By the method, when the second pin is a pin connected with the positive signal data line, the first electronic device is considered to send the first pulse signal through the first pin, and at the moment, the first pin is a negative signal data line and is at a low level in an idle state. Thus, the electrical signal of the second electronic device may be the second response signal, for example, the second response signal may be a high level pulse signal. Therefore, the first electronic device can quickly confirm the completion of the handshake by detecting the second response signal, and the time for entering the fast charging mode is further shortened.
In a possible implementation manner, the second pin is a pin connected to a negative signal data line, and the electrical signal is a first response signal.
By the method, when the second pin is a pin connected with the negative signal data line, the first electronic device is considered to send the first pulse signal through the first pin, and at the moment, the first pin is a positive signal data line and is at a high level in an idle state. Thus, the electrical signal of the second electronic device may be the first response signal, for example, the first response signal may be a low level pulse signal. Therefore, the first electronic device can quickly confirm the completion of the handshake by detecting the first response signal, and the time for entering the fast charging mode is further shortened.
In one possible implementation, the first message includes: a first identifier; the first identification is used for indicating a receiver of the first message; the second message includes: a second identifier; the second identification is used for indicating a receiver of the second message.
In a possible implementation manner, the receiver of the first message is a chip of the third electronic device, and the receiver of the second message is the first electronic device; in a possible implementation manner, the receiver of the first message is the second electronic device; and the receiver of the second message is the first electronic equipment.
Considering that the third electronic device can also participate in data transmission, by the method, the identifier can be set for the receiver of the message, so that the receiver of the message in the data transmission system is distinguished, the message is prevented from being processed by mistake, and the reliability of message transmission is improved.
A possible implementation manner, before the sending the first message through the first pin, further includes: sending a first signal through the first pin; the frequency of the first signal is a first frequency; the first signal is used for indicating that the frequency of the first message is the first frequency.
By the method, the first electronic device can send the first signal, so that the frequency for sending the first signal is determined by negotiation with the second electronic device, the frequency of the signal for data transmission between the first electronic device and the second electronic device can be negotiated and adjusted as required, the flexibility of data transmission is improved, in addition, the anti-interference capability of data transmission can be realized by adjusting the frequency of the signal, the reliability of data signal transmission is improved, and the performance of data transmission is improved.
In a possible implementation manner, a second signal is received through the second pin; the frequency of the second signal is a second frequency; the second signal is used for indicating that the frequency of the second message is the second frequency.
Through the method, the first electronic device can receive the second signal sent by the second electronic device to determine that the frequency for sending the first signal is determined to be the second frequency through negotiation with the second electronic device.
In one possible implementation, the first message includes at least one of: at least one data frame, a cyclic redundancy check field; wherein one data frame includes: a start field, an end field, a header field, and a data field.
By the method, the first electronic equipment can determine the content of the message sent to the second electronic equipment according to the requirement, and the flexibility of sending the first message is improved. The second electronic device can accurately receive the first message through the start field and the end field of the transmitted data frame, and in addition, the reliability of data transmission can be improved through the cyclic redundancy check field. Similarly, the second electronic device or the third device may also determine the content of the second message sent to the first electronic device according to needs, so as to improve the flexibility of sending the second message.
In one possible implementation, the header field includes the first identifier.
By the method, after a receiving end (for example, a second electronic device or a third electronic device) receives the first message, the first identifier included in the header field of the data packet is determined, so that whether the first message is a message sent to the receiving end is determined, and after the first message is determined to be the message sent to the receiving end, the remaining fields are analyzed, so that unnecessary message processing at the receiving end is avoided, and power consumption is saved.
A possible implementation manner, before the sending the first message through the first pin, further includes: sending a starting signal; the starting signal is a low level signal; after the first message is sent through the first pin, the method further includes: sending an end signal; the end signal is a high level signal.
By the method, the starting signal sending mode can be adopted, so that the receiving end determines the starting of the message sending, and the message receiving efficiency is improved. And the receiving end determines the end of the message sending by the mode of sending the end signal, thereby avoiding the error receiving of the message by the receiving end and improving the message receiving efficiency.
A possible implementation manner, before the receiving the second message through the second pin, further includes: receiving a start signal; the starting signal is a low level signal; after receiving the second message through the second pin, the method further includes: receiving an end signal; the end signal is a high level signal.
By the method, the start of the received message can be determined through the received start signal, and the message receiving efficiency is improved. And the end of receiving the message is determined through the received end signal, thereby avoiding the false reception of the message and improving the efficiency of receiving the message.
In one possible implementation, a first reset signal is sent through the first pin; the first reset signal is used for indicating a receiver of the first reset signal to reset; the pulse width of the first reset signal has a correlation with a receiver.
By the method, when the data transmission is confirmed to be abnormal or under other abnormal conditions, the first reset signal can be sent to the second electronic device or the third electronic device, so that the receiver confirms that the current data transmission is abnormal according to the received first reset signal, loss can be stopped in time, damage to the device due to abnormal charging behaviors is avoided, and charging safety is improved. In addition, in order to distinguish the first reset signals sent to different receivers, the pulse width of the first reset signal and the receivers can be related, so that error reset is avoided.
In a second aspect, the present application provides a data transmission method, which is applied to a second electronic device, where the second electronic device is connected to a first electronic device through a third electronic device, and the third electronic device includes a first data signal line and a second data signal line, where the method includes: determining a connection with the first electronic device; receiving a first message through a first pin; the first pin is connected with a first data signal line; sending a second message through a second pin; the second pin is connected with a second data signal line; the first message and the second message are used for setting charging of the first electronic device.
Unlike the prior art, the transmission and reception of messages between the first electronic device and the second electronic device can only be performed through the D-data signal line. By the method, the messages can be sent and received on different data signal lines, so that the electronic devices can send the messages to the opposite terminal without waiting for the opposite terminal to finish sending the messages. Especially, when the second electronic device or the third electronic device is abnormal, the situation that needs to be actively reported can effectively improve the safety of the charging process.
In a possible implementation manner, the first pin is a pin connected to a negative signal data line; the second pin is connected with the positive signal data line.
In a possible implementation manner, the first pin is a pin connected to a positive signal data line; the second pin is connected with the negative signal data line.
By the method, the pin of the positive signal data line (such as D +) can be set as the first pin, the pin of the negative signal data line (such as D-) can be set as the second pin, the pin of the positive signal data line (such as D +) can also be set as the second pin, and the pin of the negative signal data line (such as D-) can be set as the first pin, so that signals can be independently sent or received on different data lines, duplex transmission on the signal data line is realized, different duplex transmission modes can be set according to requirements, and therefore, the data transmission efficiency and the flexibility of data transmission are effectively improved.
In one possible implementation manner, a detection from the first electronic device is received through the first pin or the second pin, and the detection is used for the first electronic device to determine that the second electronic device is a dedicated charging interface DCP device;
receiving a first pulse signal from the first electronic device through the first pin; and sending an electric signal to the first electronic device through the second pin to confirm that the battery of the first electronic device is charged in a quick charging mode.
In consideration of the fact that the time consumption of the communication protocol in the prior art is long, the method for sending the first pulse signal by the first electronic device realizes that the first electronic device and the second electronic device support the handshake protocol for charging the battery of the first electronic device in the fast charging mode, and the second electronic device can quickly detect the first pulse signal, so that the time for entering the fast charging mode is shortened, and particularly when the electric quantity of the first electronic device is too low, the first electronic device can quickly enter the fast charging mode to improve the charging experience.
In a possible implementation manner, the second pin is a pin connected to a positive signal data line, and the electrical signal is a second pulse signal; the second pin is connected with the negative signal data line, and the electric signal is a low level signal.
By the method, when the second pin is a pin connected with the negative signal data line, the first electronic device is considered to send the first pulse signal through the first pin, and at the moment, the first pin is a positive signal data line and is at a high level in an idle state. Thus, the electrical signal of the second electronic device may be the first response signal, for example, the first response signal may be a low level pulse signal. Therefore, the first electronic device can quickly confirm the completion of the handshake by detecting the first response signal, and the time for entering the fast charging mode is further shortened.
In one possible implementation, the first message includes: a first identifier; the first identification is used for indicating a receiver of the first message; the second message includes: a second identifier; the second identification is used for indicating a receiver of the second message.
Considering that the third electronic device can also participate in data transmission, by the method, the identifier can be set for the receiver of the message, so that the receiver of the message in the data transmission system is distinguished, the message is prevented from being processed by mistake, and the reliability of message transmission is improved.
In a possible implementation manner, the receiver of the first message is the second electronic device; and the receiver of the second message is the first electronic equipment.
In a possible implementation manner, when the receiver of the first message is the chip of the third electronic device, the second message is not sent to the first electronic device.
By the method, the occurrence of conflict caused by the fact that the second electronic equipment actively sends the message to the first electronic equipment when the first electronic equipment and the third electronic equipment transmit the message can be avoided, and the reliability of message transmission is improved.
A possible implementation manner, before the sending the second message through the second pin, further includes: sending a second signal through the second pin; the frequency of the second signal is a second frequency; the second signal is used for indicating that the frequency of the second message is the second frequency.
Through the method, the second electronic device can send the second signal to the first device, so that the first device determines that the frequency of sending the first signal by the first electronic device is determined to be the second frequency through negotiation with the second electronic device. The frequencies of the signals for data transmission of the first electronic device and the second electronic device can be negotiated and adjusted according to needs, and the flexibility of data transmission is improved. In addition, the anti-interference capability of data transmission can be realized by adjusting the frequency of the signal, the reliability of data signal transmission is improved, and the performance of data transmission is improved.
In one possible implementation, a first signal is received through the first pin; the frequency of the first signal is a first frequency; the first signal is used for indicating that the frequency of the first message is the first frequency.
By the method, the first electronic device can send the first signal, so that the frequency for sending the first signal is determined by negotiation with the second electronic device, the frequency of the signal for data transmission between the first electronic device and the second electronic device can be negotiated and adjusted according to needs, and the flexibility of data transmission is improved. In addition, the anti-interference capability of data transmission can be realized by adjusting the frequency of the signal, the reliability of data signal transmission is improved, and the performance of data transmission is improved.
In one possible implementation, the first message includes at least one data frame; the data frame is any one of: header information, data information, control information, cyclic redundancy check; wherein one data frame includes: a start field, a data field, and an end field.
By the method, the first electronic equipment can determine the content of the message sent to the second electronic equipment according to the requirement, and the flexibility of sending the first message is improved. The second electronic device can accurately receive the first message through the start field and the end field of the transmitted data frame, and in addition, the reliability of data transmission can be improved through the cyclic redundancy check field. Similarly, the second electronic device may also determine the content of the second message sent to the first electronic device according to needs, so as to improve the flexibility of sending the second message.
A possible implementation manner, before the sending the second message through the second pin, further includes: sending a starting signal; the starting signal is a low level signal; after the sending the second message through the second pin, the method further includes: sending an end signal; the end signal is a high level signal.
By the method, the starting signal sending mode can be adopted, so that the receiving end determines the starting of the message sending, and the message receiving efficiency is improved. And the receiving end determines the end of the message sending by the mode of sending the end signal, thereby avoiding the error receiving of the message by the receiving end and improving the message receiving efficiency.
A possible implementation manner, before the receiving the first message through the first pin, further includes: receiving a start signal; the starting signal is a low level signal; after receiving the first message through the first pin, the method further includes: receiving an end signal; the end signal is a high level signal.
By the method, the start of the received message can be determined through the received start signal, and the message receiving efficiency is improved. And the end of receiving the message is determined through the received end signal, thereby avoiding the false reception of the message and improving the efficiency of receiving the message.
In one possible implementation, a first reset signal is received through the first pin; the pulse width of the first reset signal is related to the second electronic equipment; and resetting the second electronic equipment according to the first reset signal.
By the method, when the first electronic device confirms that the data transmission is abnormal or under other abnormal conditions, the first reset signal can be sent to the second electronic device, so that the second electronic device confirms that the current data transmission is abnormal according to the received first reset signal sent by the first electronic device, loss can be stopped in time, damage to each electronic device caused by abnormal charging behaviors is avoided, and charging safety is improved.
In one possible implementation, a second reset signal is received through the first pin; the pulse width of the second reset signal is related to the third electronic device; ignoring the second reset signal.
By the method, the first reset signal sent by the first electronic device to other receivers can be distinguished, so that the second electronic device is prevented from being reset by mistake according to the second reset signal.
In a third aspect, the present application provides a data transmission method applied to a third electronic device, where the third electronic device is used to connect a second electronic device and a first electronic device, and the third electronic device includes a first data signal line and a second data signal line, and the method includes: receiving a first message through a first pin; the first pin is connected with a first data signal line; sending a second message through a second pin; the second pin is connected with a second data signal line; the first message and the second message are used for setting charging of the first electronic device.
Unlike the prior art, the transmission and reception of messages between the first electronic device and the second electronic device can only be performed through the D-data signal line. By the method, the messages can be sent and received on different data signal lines, so that the electronic equipment can send the messages to the opposite terminal without waiting for the completion of the sending of the opposite terminal, and the transmission efficiency of the data on the data signal lines is effectively improved. In addition, compared with the case that the second electronic device is used as a device to be charged and the second electronic device is used as a power supply device, in the prior art, only the scheme that the first electronic device actively sends a message to the second electronic device and the second electronic device passively responds is available.
In a possible implementation manner, the first pin is a pin connected to a negative signal data line; the second pin is connected with the positive signal data line.
In a possible implementation manner, the first pin is a pin connected to a positive signal data line; the second pin is connected with the negative signal data line.
By the method, the pin of the positive signal data line (such as D +) can be set as the first pin, the pin of the negative signal data line (such as D-) can be set as the second pin, the pin of the positive signal data line (such as D +) can also be set as the second pin, and the pin of the negative signal data line (such as D-) can be set as the first pin, so that signals can be independently sent or received on different data lines, duplex transmission on the signal data line is realized, different duplex transmission modes can be set according to requirements, and therefore, the data transmission efficiency and the flexibility of data transmission are effectively improved.
In one possible implementation, the first message includes: a first identifier; the first identification is used for indicating a receiver of the first message; the second message includes: a second identifier; the second identification is used for indicating a receiver of the second message.
Considering that a third electronic device may also participate in data transmission, for example, in one possible implementation, the recipient of the first message is the third electronic device; and the receiver of the second message is the first electronic equipment. By the method, the identifier can be set for the receiver of the message, so that the receiver of the message in the data transmission system is distinguished, the message is prevented from being processed by mistake, and the reliability of message transmission is improved.
In a possible implementation manner, when the receiver of the first message is the second electronic device, the second message is not sent to the first electronic device.
By the method, the occurrence of conflict caused by the fact that the second electronic equipment actively sends the message to the first electronic equipment when the first electronic equipment and the third electronic equipment transmit the message can be avoided, and the reliability of message transmission is improved.
In one possible implementation, a first signal is received through the first pin; the frequency of the first signal is a first frequency; the first signal is used for indicating that the frequency of the first message is the first frequency;
before the sending the second message through the second pin, the method further includes: sending a first signal through the second pin; the frequency of the first signal is a second frequency; the first signal is used for indicating that the frequency of the first message is the second frequency.
Through the method, the third electronic device may send the second signal to the first device, so that the first device determines that the frequency at which the first electronic device sends the first signal is determined to be the second frequency through negotiation with the third electronic device. The frequencies of the signals for data transmission of the first electronic device and the third electronic device can be negotiated and adjusted according to needs, and the flexibility of data transmission is improved. In addition, the anti-interference capability of data transmission can be realized by adjusting the frequency of the signal, the reliability of data signal transmission is improved, and the performance of data transmission is improved.
In one possible implementation, the first message includes at least one data frame; the data frame is any one of: header information, data information, control information, cyclic redundancy check; wherein one data frame includes: a start field, a data field, and an end field.
By the method, the first electronic device can determine the content of the message sent to the third electronic device according to the requirement, and the flexibility of sending the first message is improved. The third electronic device can accurately receive the first message through the start field and the end field of the transmitted data frame, and in addition, the reliability of data transmission can be improved through the cyclic redundancy check field. Similarly, the third device may also determine the content of the second message sent to the first electronic device as needed, so as to improve the flexibility of sending the second message.
A possible implementation manner, before the sending the second message through the second pin, further includes: sending a starting signal; the starting signal is a low level signal; after the sending the second message through the second pin, the method further includes: sending an end signal; the end signal is a high level signal.
By the method, the starting signal sending mode can be adopted, so that the receiving end determines the starting of the message sending, and the message receiving efficiency is improved. And the receiving end determines the end of the message sending by the mode of sending the end signal, thereby avoiding the error receiving of the message by the receiving end and improving the message receiving efficiency.
A possible implementation manner, before the receiving the first message through the first pin, further includes: receiving a start signal; the starting signal is a low level signal; after receiving the first message through the first pin, the method further includes: receiving an end signal; the end signal is a high level signal.
By the method, the start of the received message can be determined through the received start signal, and the message receiving efficiency is improved. And the end of receiving the message is determined through the received end signal, thereby avoiding the false reception of the message and improving the efficiency of receiving the message.
In one possible implementation, a second reset signal is received through the first pin; the pulse width of the second reset signal is related to the third electronic device; and resetting according to the second reset signal.
By the method, when the first electronic device confirms that the data transmission is abnormal or under other abnormal conditions, the second reset signal can be sent to the third electronic device, so that the third electronic device confirms that the current data transmission is abnormal according to the received second reset signal, loss can be stopped in time, damage to each electronic device caused by abnormal charging behaviors is avoided, and charging safety is improved.
In one possible implementation, a first reset signal is received through the first pin; the pulse width of the first reset signal is related to the second electronic equipment; ignoring the first reset signal.
Through the method, the first reset signal sent by the first electronic device to other receivers can be distinguished, so that the third electronic device is prevented from being reset by mistake according to the first reset signal.
In a fourth aspect, the present application provides a data transmission method, which is applied to a first electronic device, where the first electronic device is connected to a second electronic device through a third electronic device, where the third electronic device includes a first data signal line, and the method includes: detecting a connection with the second electronic device; sending a first message through a first pin; or, receiving a second message through the first pin; wherein the first message and the second message are messages encoded by Manchester; the first pin is connected with a first data signal line; the first message and the second message are used for setting charging of the first electronic device.
By the method, the first electronic device can transmit the first message after Manchester encoding and decode the received second message through Manchester encoding without transmitting a synchronous clock signal in the message, so that the problems of poor transmission performance and low transmission efficiency caused by the fact that a receiving end in the prior art is difficult to receive continuous high-frequency signals are solved.
In a possible implementation manner, the first pin is a pin connected to a negative signal data line; or, the first pin is a pin connected with a positive signal data line.
By the method, the first pin for transmitting the first message and the second message can be flexibly configured, so that data transmission is more flexible.
According to a possible implementation manner, connection between a first electronic device and a second electronic device is detected through the first pin and the second pin, and the second electronic device is determined to be a special charging interface DCP device; sending a first pulse signal through the first pin; and detecting an electric signal of the second electronic equipment through the second pin to determine whether to charge the battery of the first electronic equipment through a quick charging mode.
In consideration of the fact that the time consumption of the communication protocol in the prior art is long, by the method for sending the first pulse signal, the first electronic device and the second electronic device support the handshake protocol for charging the battery of the first electronic device through the quick charging mode, the time for entering the quick charging mode is shortened, and particularly when the electric quantity of the first electronic device is too low, the first electronic device can enter the quick charging mode quickly to improve the charging experience.
In a possible implementation manner, the second pin is a pin connected to a positive signal data line, and the electrical signal is a second pulse signal.
By the method, when the second pin is a pin connected with the positive signal data line, the first electronic device is considered to send the first pulse signal through the first pin, and at the moment, the first pin is a negative signal data line and is at a low level in an idle state. Thus, the electrical signal of the second electronic device may be a second pulse signal, for example, the second response signal may be a high level pulse signal. Therefore, the first electronic device can quickly confirm the completion of the handshake by detecting the second response signal, and the time for entering the fast charging mode is further shortened.
In a possible implementation manner, the second pin is a pin connected to a negative signal data line, and the electrical signal is a low level signal.
By the method, when the second pin is a pin connected with the negative signal data line, the first electronic device is considered to send the first pulse signal through the first pin, and at the moment, the first pin is a positive signal data line and is at a high level in an idle state. Therefore, the electric signal of the second electronic device can be a low-level signal, so that the first electronic device can quickly confirm the completion of the handshake by detecting the first response signal, the time for entering the quick charging mode is shortened, and the handshake complexity is reduced.
In one possible implementation, the first message includes: a third identifier; the third identification is used for indicating a receiver of the first message and a sender of the first message; the second message includes: a fourth identification; the fourth identifier is used for indicating a receiver of the second message and a sender of the second message; the receiver of the first message or the sender of the second message is any one of: the second electronic device, the third electronic device.
Considering that the third electronic device can also participate in data transmission, through the method, the identifiers can be respectively set for the sender and the receiver of the message, so that the sender and the receiver of the message in the data transmission system are distinguished, the message is prevented from being processed by mistake, and the reliability of message transmission is improved.
In one possible implementation, a first signal is sent through the first pin; the frequency of the first signal is a first frequency; the first signal is used for negotiating that the communication frequency is the first frequency.
By the method, the first electronic device can send the first signal, so that the frequency for sending the first signal is determined by negotiation with the second electronic device, the frequency of the signal for data transmission between the first electronic device and the second electronic device can be negotiated and adjusted as required, the flexibility of data transmission is improved, in addition, the anti-interference capability of data transmission can be realized by adjusting the frequency of the signal, the reliability of data signal transmission is improved, and the performance of data transmission is improved.
In one possible implementation, a second signal is received through the first pin; the frequency of the second signal is a first frequency; the second signal is used to determine that the communication frequency is the first frequency.
Through the method, the first electronic device can receive the second signal sent by the second electronic device to determine that the frequency for sending the first signal is the first frequency through negotiation with the second electronic device.
In one possible implementation, the frequency of the first message and the second message is the first frequency.
By the method, the frequency of the messages sent and received by the first electronic equipment can be set to be consistent, and the complexity of data transmission is reduced.
In one possible implementation, the first message includes at least one data frame; the data frame is any one of: header information, data information, control information, cyclic redundancy check; wherein one data frame includes: a start field, a data field, and an end field.
By the method, the first electronic device can determine the content of the message sent to the second electronic device or the third electronic device according to the requirement, and the flexibility of sending the first message is improved. The second electronic device or the third electronic device can accurately receive the first message through the start field and the end field of the transmitted data frame, and in addition, the reliability of data transmission can be improved through the cyclic redundancy check field. Similarly, the second electronic device or the third device may also determine the content of the second message sent to the first electronic device according to needs, so as to improve the flexibility of sending the second message.
A possible implementation manner, after the sending the first message through the first pin, further includes: the first data signal line is used for the first electronic device to receive messages in a first time window.
By the method, the first time window can be set after the first electronic device finishes sending the first message, and the sending authority of the first data signal line can be other electronic devices in the first time window, so that the scheme that other electronic devices actively send messages is realized, the flexibility of data transmission is improved, and the possibility of data transmission conflict is avoided.
A possible implementation manner, after receiving the second message through the first pin, further includes: the first data signal line is used for the first electronic device to receive messages in a second time window.
By the method, the second time window can be set after the first electronic device receives the second message, and the sending permission of the first data signal line can be set to other electronic devices in the second time window, so that the scheme that other electronic devices actively send messages is realized, the flexibility of data transmission is improved, and the possibility of data transmission conflict is avoided.
A possible implementation manner, after receiving the second message through the first pin, further includes: and after the current time is determined to exceed the second time window, the first data signal line is used for the first electronic equipment to send messages.
By the method, the second time window can be set after the first electronic device receives the second message, and the sending authority of the first data signal line returns to the first electronic device after the second time window is finished, so that the possibility that the first electronic device cannot actively send the message for a long time is avoided, the transmission efficiency of data transmission is improved, and the possibility of data transmission collision is avoided.
In one possible implementation, the method further includes: sending a first reset signal through the first pin; the first reset signal is used for indicating a receiver of the first reset signal to reset; the pulse width of the first reset signal has a correlation with a receiver.
By the method, when the first electronic device confirms that the data transmission is abnormal or under other abnormal conditions, the second reset signal can be sent to the third electronic device, so that the third electronic device confirms that the current data transmission is abnormal according to the received second reset signal, loss can be stopped in time, damage to each electronic device caused by abnormal charging behaviors is avoided, and charging safety is improved. Further, the first reset signal sent by the first electronic device to other receivers can be distinguished, so that the second electronic device or the third electronic device is prevented from being reset by mistake according to the first reset signal.
In a fifth aspect, the present application provides a data transmission method applied to a second electronic device, where the second electronic device is connected to a first electronic device through a third electronic device, and the third electronic device includes a first data signal line, and the method includes: determining a connection with the first electronic device; sending a second message through the first pin; or, receiving a first message through the first pin; the first pin is connected with a first data signal line; wherein the first message and the second message are messages encoded by Manchester; the first message and the second message are used for setting charging of the first electronic device.
By the method, the second electronic device can transmit the second message after Manchester encoding and decode the received first message through Manchester encoding without transmitting a synchronous clock signal in the message, so that the problems of poor transmission performance and low transmission efficiency caused by the fact that a receiving end in the prior art is difficult to receive continuous high-frequency signals are solved.
In a possible implementation manner, the first pin is a pin connected to a negative signal data line; or, the first pin is a pin connected with a positive signal data line.
By the method, the first pin for transmitting the first message and the second message can be flexibly configured, so that data transmission is more flexible.
In one possible implementation manner, a detection from the first electronic device is received through the first pin and the second pin, and the detection is used for the first electronic device to determine that the second electronic device is a dedicated charging interface DCP device; receiving a first pulse signal from the first electronic device through the first pin; and sending an electric signal to the first electronic equipment through the second pin to confirm whether to charge the battery of the first electronic equipment in a quick charging mode.
In consideration of the fact that the time consumption of the communication protocol in the prior art is long, by the method for sending the first pulse signal, the first electronic device and the second electronic device support the handshake protocol for charging the battery of the first electronic device through the quick charging mode, the time for entering the quick charging mode is shortened, and particularly when the electric quantity of the first electronic device is too low, the first electronic device can enter the quick charging mode quickly to improve the charging experience.
In a possible implementation manner, the second pin is a pin connected to a positive signal data line, and the electrical signal is a second pulse signal; the second pin is connected with the negative signal data line, and the electric signal is a low level signal.
By the method, when the second pin is a pin connected with the negative signal data line, the first electronic device is considered to send the first pulse signal through the first pin, and at the moment, the first pin is a positive signal data line and is at a high level in an idle state. Therefore, the electric signal of the second electronic device can be a low-level signal, so that the first electronic device can quickly confirm the completion of the handshake by detecting the first response signal, the time for entering the quick charging mode is shortened, and the handshake complexity is reduced.
In one possible implementation, the first message includes: a third identifier; the third identification is used for indicating a receiver of the first message and a sender of the first message; the second message includes: a fourth identification; the fourth identifier is used for indicating a receiver of the second message and a sender of the second message; the sender of the first message or the receiver of the second message is any one of: the first electronic device, the third electronic device.
Considering that the third electronic device can also participate in data transmission, through the method, the identifiers can be respectively set for the sender and the receiver of the message, so that the sender and the receiver of the message in the data transmission system are distinguished, the message is prevented from being processed by mistake, and the reliability of message transmission is improved.
In one possible implementation, a first signal is received through the first pin; the frequency of the first signal is a first frequency; the first signal is used for negotiating that the communication frequency is the first frequency.
By the method, the first electronic device can send the first signal, so that the frequency for sending the first signal is determined by negotiation with the second electronic device, the frequency of the signal for data transmission between the first electronic device and the second electronic device can be negotiated and adjusted as required, the flexibility of data transmission is improved, in addition, the anti-interference capability of data transmission can be realized by adjusting the frequency of the signal, the reliability of data signal transmission is improved, and the performance of data transmission is improved.
In a possible implementation manner, a second signal is sent through the first pin; the frequency of the second signal is a first frequency; the first signal is used to determine that the communication frequency is the first frequency.
Through the method, the first electronic device can receive the second signal sent by the second electronic device to determine that the frequency for sending the first signal is the first frequency through negotiation with the second electronic device.
In one possible implementation, the frequency of the first message and the second message is the first frequency.
By the method, the frequency of the messages sent and received by the second electronic equipment can be set to be consistent, and the complexity of data transmission is reduced.
In one possible implementation, the first message includes at least one of: at least one data frame, a cyclic redundancy check field; wherein one data frame includes: a start field, an end field, a header field, and a data field.
By the method, the first electronic equipment can determine the content of the message sent to the second electronic equipment according to the requirement, and the flexibility of sending the first message is improved. The second electronic device can accurately receive the first message through the start field and the end field of the transmitted data frame, and in addition, the reliability of data transmission can be improved through the cyclic redundancy check field. Similarly, the third device may also determine the content of the second message sent to the first electronic device as needed, so as to improve the flexibility of sending the second message.
A possible implementation manner, after receiving the first message through the first pin, further includes: within a first time window, the first data signal line is used for the second electronic device or the third electronic device to send a message.
By the method, the first time window can be set after the first electronic device finishes sending the first message, and the sending authority of the first data signal line can be the second electronic device or the third electronic device in the first time window, so that the scheme that the second electronic device or the third electronic device actively sends the message is realized, the flexibility of data transmission is improved, and the possibility of data transmission collision is avoided.
A possible implementation manner, after the sending the second message through the first pin, further includes:
and in a second time window, the first data signal line is used for the second electronic equipment or the third electronic equipment to send messages.
By the method, the second time window can be set after the first electronic device receives the second message, and the sending permission of the first data signal line can be set to other electronic devices in the second time window, so that the scheme that other electronic devices actively send messages is realized, the flexibility of data transmission is improved, and the possibility of data transmission conflict is avoided.
A possible implementation manner, after the sending the second message through the first pin, further includes:
and after the current time is determined to exceed the second time window, the first data signal line is used for the second electronic equipment or the third electronic equipment to receive messages.
By the method, the second time window can be set after the first electronic device receives the second message, and the sending authority of the first data signal line returns to the first electronic device after the second time window is finished, so that the possibility that the first electronic device cannot actively send the message for a long time is avoided, the transmission efficiency of data transmission is improved, and the possibility of data transmission collision is avoided.
In one possible implementation, a first reset signal is received through the first pin; the pulse width of the first reset signal is related to the second electronic equipment; and resetting the charging mode according to the first reset signal.
By the method, when the first electronic device confirms that the data transmission is abnormal or under other abnormal conditions, the first reset signal can be sent to the second electronic device, so that the second electronic device confirms that the current data transmission is abnormal according to the received first reset signal sent by the first electronic device, loss can be stopped in time, damage to each electronic device caused by abnormal charging behaviors is avoided, and charging safety is improved.
In one possible implementation, a second reset signal is received through the first pin; the pulse width of the second reset signal is related to the third electronic device; ignoring the second reset signal.
By the method, the first reset signal sent by the first electronic device to other receivers can be distinguished, so that the second electronic device is prevented from being reset by mistake according to the second reset signal.
In a sixth aspect, the present application provides a data transmission method applied to a third electronic device, where the third electronic device is used to connect a second electronic device and a first electronic device, and the third electronic device includes a first data signal line, where the method includes: sending a second message through the first pin; or, receiving a first message through the first pin; the first pin is connected with a first data signal line; wherein the first message and the second message are messages encoded by Manchester; the first message and the second message are used for setting charging of the first electronic device.
By the method, the third electronic device can transmit the second message after Manchester encoding and decode the received first message through Manchester encoding without transmitting a synchronous clock signal in the message, so that the problems of poor transmission performance and low transmission efficiency caused by the fact that a receiving end is difficult to receive continuous high-frequency signals in the prior art are solved.
In a possible implementation manner, the first pin is a pin connected to a negative signal data line; or, the first pin is a pin connected with a positive signal data line.
By the method, the first pin for transmitting the first message and the second message can be flexibly configured, so that data transmission is more flexible.
In one possible implementation, the first message includes: a third identifier; the third identification is used for indicating a receiver of the first message and a sender of the first message;
the second message includes: a fourth identification; the fourth identifier is used for indicating a receiver of the second message and a sender of the second message; the sender of the first message or the receiver of the second message is any one of: the first electronic device, the third electronic device.
Considering that the third electronic device participates in data transmission, the method can set the identifiers for the sender and the receiver of the message respectively, thereby distinguishing the sender and the receiver of the message in the data transmission system, avoiding the error processing of the message and improving the reliability of the message transmission.
In one possible implementation, the frequency of the first message and the second message is the first frequency.
By the method, the frequency of the messages sent and received by the second electronic equipment can be set to be consistent, and the complexity of data transmission is reduced.
In one possible implementation, the first message includes at least one of: at least one data frame, a cyclic redundancy check field; wherein one data frame includes: a start field, an end field, a header field, and a data field.
By the method, the first electronic device can determine the content of the first message sent to the third electronic device according to the requirement, and the flexibility of sending the first message is improved. The second electronic device can accurately receive the first message through the start field and the end field of the transmitted data frame, and in addition, the reliability of data transmission can be improved through the cyclic redundancy check field. Similarly, the third electronic device may also determine the content of the second message sent to the first electronic device as needed, so as to improve the flexibility of sending the second message.
A possible implementation manner, after receiving the first message through the first pin, further includes: within a first time window, the first data signal line is used for the second electronic device or the third electronic device to send a message.
By the method, the first time window can be set after the first electronic device finishes sending the first message, and the sending authority of the first data signal line can be the second electronic device or the third electronic device in the first time window, so that the scheme that the second electronic device or the third electronic device actively sends the message is realized, the flexibility of data transmission is improved, and the possibility of data transmission collision is avoided.
A possible implementation manner, after the sending the second message through the first pin, further includes: and in a second time window, the first data signal line is used for the second electronic equipment or the third electronic equipment to send messages.
By the method, a second time window can be set after the first electronic device receives the second message, and the sending permission of the first data signal line can be the second electronic device or the third electronic device in the second time window, so that the scheme that the second electronic device or the third electronic device actively sends the message is realized, the flexibility of data transmission is improved, and the possibility of data transmission collision is avoided.
A possible implementation manner, after the sending the second message through the first pin, further includes: and after the current time is determined to exceed the second time window, the first data signal line is used for the third electronic equipment or the second electronic equipment to receive messages.
By the method, the second time window can be set after the first electronic device receives the second message, and the sending authority of the first data signal line returns to the first electronic device after the second time window is finished, so that the possibility that the first electronic device cannot actively send the message for a long time is avoided, the transmission efficiency of data transmission is improved, and the possibility of data transmission collision is avoided.
In one possible implementation, a second reset signal is received through the first pin; the pulse width of the second reset signal is related to the third electronic device; and resetting the charging mode according to the second reset signal.
By the method, when the first electronic device confirms that the data transmission is abnormal or under other abnormal conditions, the second reset signal can be sent to the third electronic device, so that the third electronic device can confirm that the current data transmission is abnormal according to the second reset signal sent by the first electronic device, loss can be stopped in time, damage to each electronic device caused by abnormal charging behaviors is avoided, and charging safety is improved.
In one possible implementation, a first reset signal is received through the first pin; the pulse width of the first reset signal is related to the second electronic equipment; ignoring the first reset signal.
Through the method, the first reset signal sent by the first electronic device to other receivers can be distinguished, so that the third electronic device is prevented from being reset by mistake according to the first reset signal.
In a seventh aspect, the present application provides an electronic device comprising one or more processors, memory, and one or more computer programs; wherein the one or more computer programs are stored in the memory, the one or more computer programs comprising instructions which, when executed by the electronic device, cause the electronic device to perform the method of any of the possible designs provided by the first or fourth aspects of the embodiments of the present application.
In an eighth aspect, the present application provides an electronic device comprising one or more processors, memory, and one or more computer programs; wherein one or more computer programs are stored in the memory, the one or more computer programs comprising instructions which, when executed by the electronic device, cause the electronic device to perform the method of any of the possible designs provided by the second or fifth aspects of the embodiments of the present application.
In a ninth aspect, the present application provides an electronic device comprising one or more processors, memory, and one or more computer programs; wherein one or more computer programs are stored in the memory, the one or more computer programs comprising instructions which, when executed by the electronic device, cause the electronic device to perform the method of any of the possible designs provided by the third or sixth aspects of the embodiments of the present application. Alternatively, the electronic device may not include a memory, for example, the processor may execute instructions stored in the external memory, so that the electronic device executes the method according to any one of the possible designs provided in the third aspect or the sixth aspect of the embodiments of the present application.
In a tenth aspect, an embodiment of the present application provides a data transmission system, which includes the electronic device of the seventh aspect, the electronic device of the eighth aspect, and the electronic device of the ninth aspect.
In an eleventh aspect, the present application provides a computer storage medium storing a program, which when run on an electronic device, causes the electronic device to execute any one of the possible design methods of the first aspect to the sixth aspect.
In a twelfth aspect, the present application provides a computer program product, which when run on an electronic device, causes the electronic device to execute the method of any one of the possible designs of the first aspect to the sixth aspect.
Drawings
Fig. 1a is a schematic structural diagram of a charging system according to an embodiment of the present disclosure;
fig. 1b is a schematic structural diagram of a charging interface according to an embodiment of the present disclosure;
FIG. 2 is a schematic structural diagram of an electronic device;
fig. 3 is a schematic structural diagram of a charging system according to an embodiment of the present disclosure;
FIG. 4a is a timing diagram of handshaking in the prior art;
fig. 4b is a flowchart illustrating a protocol handshaking method according to an embodiment of the present application;
fig. 4c and fig. 4d are schematic diagrams of a protocol handshake provided in an embodiment of the present application;
fig. 5a is a flowchart illustrating a protocol handshaking method according to an embodiment of the present application;
fig. 5b and fig. 5c are schematic diagrams of a protocol handshake provided in an embodiment of the present application;
fig. 6a is a schematic encoding diagram of a data transmission method according to an embodiment of the present application;
fig. 6b is a schematic structural diagram of encoding and decoding of a data transmission method according to an embodiment of the present application;
fig. 6c is a schematic flowchart of a data transmission method according to an embodiment of the present application;
fig. 6d is a schematic structural diagram of a data transmission method according to an embodiment of the present application;
fig. 6e is a schematic structural diagram of a data transmission method according to an embodiment of the present application;
fig. 6f is a schematic signal diagram of a data transmission method according to an embodiment of the present application;
fig. 7 is a schematic flowchart of a data transmission method according to an embodiment of the present application;
fig. 8a is a timing diagram illustrating a data transmission method according to an embodiment of the present application;
fig. 8b is a schematic flowchart of a data transmission method according to an embodiment of the present application;
fig. 8c is a timing diagram illustrating a data transmission method according to an embodiment of the present application;
fig. 8d and fig. 8e are schematic diagrams of a data structure provided in an embodiment of the present application;
fig. 9a is a schematic flowchart of a data transmission method according to an embodiment of the present application;
fig. 9b to 9d are schematic structural diagrams of a data transmission method according to an embodiment of the present application;
fig. 9e is a schematic signal diagram of a data transmission method according to an embodiment of the present application;
FIG. 9f is a diagram illustrating a data structure according to an embodiment of the present application;
fig. 10a is a schematic flowchart of a data transmission method according to an embodiment of the present application;
fig. 10b is a schematic signal diagram of a data transmission method according to an embodiment of the present application;
fig. 11a is a schematic flowchart of a data transmission method according to an embodiment of the present application;
fig. 11b is a diagram illustrating a second reset signal according to an embodiment of the disclosure;
FIG. 12 is a schematic structural diagram of a possible electronic device according to an embodiment of the disclosure;
fig. 13 is a schematic structural diagram of a possible electronic device according to an embodiment of the present disclosure.
Detailed Description
The present application will be described in further detail below with reference to the accompanying drawings. The particular methods of operation in the method embodiments may also be applied to apparatus embodiments or system embodiments. It should be noted that, in the description of the following embodiments of the present application, "at least one" means one or more, where a plurality means two or more. In view of this, the "plurality" may also be understood as "at least two" in the embodiments of the present invention. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" generally indicates that the preceding and following related objects are in an "or" relationship, unless otherwise specified. In addition, it is to be understood that the terms first, second, etc. in the description of the present application are used for distinguishing between the descriptions and not necessarily for describing a sequential or chronological order.
In addition, in the embodiments of the present application, the word "exemplary" is used to mean serving as an example, instance, or illustration. Any embodiment or design described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, the term using examples is intended to present concepts in a concrete fashion.
Under the trend of diversification and large screen of intelligent terminal functions, the power consumption of the intelligent terminal is gradually increased, the battery capacity is gradually increased, and the intelligent terminal has stronger and stronger requirements on quick charging along with the increase of the battery capacity. Therefore, based on the USB channel, in recent years, various rapid charging protocols are derived in the industry, such as USB PD2.0/3.0, high-pass QC2.0/3.0/4.0, OPPO VOOC, Samsung AFC, Councico PE and Huacheng SCP, and the like, and commercial charging power in the current market is different from 10W to 65W, so that the charging time of the terminal equipment is greatly shortened.
The USB is a serial bus standard and is also a technical specification of an input/output interface. The USB interface has three physical specifications at present, which are called USB Type-A, USB Type-B and USB Type-C respectively. The following exemplifies the pin in the USB interface with USB Type-C. USB Type-C includes 24 pins. The pin diagram of the USB Type-C interface is shown in fig. 1 a. As can be seen, the USB Type-C includes 4 pairs of differential transmission line pins for implementing the TX/RX function, wherein two pairs of differential transmission line pins (or differential data pins) for transmitting data signals are included: a2(TX1+) and A3(TX1-), B2(TX2+) and B3(TX 2-); and two pairs of differential transmission line pins (or differential data pins) for receiving data signals: b11(RX1+) and B10(RX1-), A11(RX2+) and A10(RX 2-). The data signals transmitted by the differential data pins will be referred to as differential data signals for convenience of description later. USB Type-C also includes 2 Channel Configuration (CC) signal pins for function negotiation. For example, it can be used to determine the direction of device insertion: a forward insertion or a reverse insertion. But also for negotiating a power function, an alternative mode or a peripheral mode on the interface. The peripheral mode supports transmission of analog audio or debugging signals and the like through a USB Type-C interface. The alternate mode supports the USB Type-C interface to transmit compressed or lossless video signals, such as data signals of the DP protocol. USB Type-C may also include pins for transmitting other signals, such as a Side Band Use (SBU) signal, as shown in table 1.
TABLE 1
Figure BDA0002748559160000161
Figure BDA0002748559160000171
Wherein, TX/RX (TX1, TX2, RX1 and RX2) is a differential data signal of USB 3.1. It should be noted that TX1 is used to represent a differential data signal (TX1+/-) transmitted by a pair of differential transmission line terminals, and RX1 is also used to represent RX1+/-, and the other differential signals are also described in the same manner. In USB3.1, when the electronic device using the USB Type-C interface is inserted in the positive direction, a2, A3, B10, and B11 are used as terminals of the differential transmission line of the data signal of USB 3.1. When the insertion direction of the electronic device is reverse insertion, B2, B3, A10 and A11 are adopted as the terminals of the differential transmission line of the USB3.1 data signal. Whether a forward or reverse plug direction is used, there will be two pairs of differential transmission line pins unused. USB Type-C may also be used to transmit digital video interface (DP) signals. In the DP mode, two pairs of differential signal line pins not used by USB3.1 may be used to transmit DP data signals (or data signals referred to as the DP protocol). Therefore, the USB Type-C interface can be used for realizing USB3.1+ DP signal transmission. In addition, if the receiving end only needs the DP signal and does not need the USB3.1 signal, 4 pairs of differential signal line pins may be used to transmit the DP data signal. The USB Type-C also includes two pairs of differential transmission line pins (A6, A7 and B7, B7) for transmitting USB2.0 data signals, the USB2.0 data signals being D +/D-. A8 and B8 are reserved pins in the USB Type-C interface and are used for transmitting SBU signals. In different application scenarios, the SBU signal has different purposes, for example, the SBU signal may include a control signal or a data signal of the DP protocol. For example, A8 and B8 are used as audio transmission channels or microphone transmission channels for transmitting audio data or video data. The control signal of the DP protocol may be an AUX (AUX) signal. The USB Type-C interface also supports a Power Delivery (PD) protocol, i.e., has a power supply function. Referring to fig. 1a, GND is a ground pin, Vbus is a power pin, and 4 pairs of power supply pins are formed by 4 ground pins and 4 power pins in the USB Type-C interface and are used for supplying power.
A charging scenario to which the present application is applicable is described below. FIG. 1a is a schematic diagram of a system provided in accordance with the present application. In this example, a first electronic device 100 (e.g., an electronic device to be charged) may be connected to a second electronic device 200 (e.g., a power class device such as a charger, an adapter, a reverse charging device, etc.) via a third electronic device 300 (e.g., a USB cable). The first electronic device may be a terminal device. The second electronic device 200 may be any suitable type of charging apparatus, such as a charger, a Travel Adapter (TA), a rechargeable electronic device, a reverse charging device, or the like. The first electronic device 100 may include a USB socket (not shown) that is physically connected to another USB socket on the second electronic device 200 through the third electronic device 300. Although in this example, the second electronic device 200 includes a USB socket, in other examples, the third electronic device 300 may be soldered directly to the second electronic device 200, thereby bypassing the need for a USB socket. In operation, when an Alternating Current (AC) signal (e.g., 220V or 110V) is received from a wall socket, the second electronic device 200 may convert the received AC signal into a Direct Current (DC) signal and feed the DC signal to the first electronic device 100. In some implementations, the second electronic device 200 or the computer 120 may support a battery charger communication protocol. The battery charger communication protocol may be used to negotiate voltage and/or current levels between the second electronic device 200 (or computer 120) and the first electronic device 100.
In a specific charging process, when detecting that a second electronic device (a device to be charged) is connected and connected to a first electronic device (a power supply device) through a third electronic device (e.g., a cable), a processor of the first electronic device sends a charging start signal to a charging chip 14 of the first electronic device to control the charging chip to start charging.
And detecting whether the second electronic equipment is continuously switched on by the processor of the first electronic equipment, continuously charging the second electronic equipment in the continuous switching-on process, and then controlling the charging of the battery of the first electronic equipment by the charging chip in the continuous switching-on process of the second electronic equipment until the electric quantity of the battery is fully charged. And if the second electronic equipment is detected to be disconnected at any time when the step of continuously charging is executed, stopping executing charging, and when the subsequent second electronic equipment is reconnected, sending a charging starting signal from reconnection of the execution circuit to control the charging chip to start charging and re-execute the subsequent step of continuously charging.
Depending on the characteristics of the battery, the charging process from zero or low to full charge of the battery may include, for example: trickle charge (providing a small charging current to the battery at a low rate and in a constant manner), constant current charge (charging current fixed), constant voltage charge (charging voltage fixed) several stages, with the development of high current charging technology, the constant current stage may include a plurality of stages, each stage using a different current for charging.
It should be noted that the circuit structure and the charging scenario described in the embodiment of the present application are for more clearly illustrating the technical solutions in the embodiment of the present application, and do not constitute a limitation on the technical solutions provided in the embodiment of the present application.
It should be noted that "connect" in this embodiment of the present application means that electrical connection is achieved between two interfaces, and pins corresponding to each other in the two interfaces are connected one by one, but this embodiment of the present application does not limit how to connect the two interfaces specifically. For example, the connection may be a plug, a butt, or the like. Taking the insertion as an example, the interface 1 is connected to the interface 2, and the interface 1 may be inserted into the interface 2, or the interface 2 may be inserted into the interface 1.
As shown in fig. 2, the structure of the electronic device will be described by taking the first electronic device as an example. Fig. 2 is a block diagram of an example of a first electronic device 100 in accordance with various aspects of the invention. The first electronic device 100 mentioned in the embodiment of the present application may be applied to various terminal devices including a battery, including but not limited to a mobile phone, a tablet computer, a computer with a wireless transceiving function, a Virtual Reality (VR) terminal, an Augmented Reality (AR) terminal, a wireless terminal in industrial control (industrial control), a wireless terminal in self driving (self driving), a wireless terminal in remote medical (remote medical), a wireless terminal in smart grid (smart grid), a wireless terminal in transportation safety, a wireless terminal in city (smart city), a wireless terminal in smart home (smart home), and the like. The second electronic device provided by the embodiment of the application can also be a terminal device comprising a battery. In this case, the second electronic device may be used not only to charge the battery inside the electronic device, but also to supply power to the outside using the battery as a power source, that is, to perform reverse charging. The reverse charging means that an electronic device (e.g., a mobile phone, a tablet computer, etc.) can charge another electronic device (e.g., another mobile phone) by using the electric energy stored in its own battery in a wired/wireless manner (e.g., supplying electric energy in a wired or wireless manner). When the wired reverse charging mode is adopted, the device to be charged can be connected with the On The Go (OTG) in a Universal Serial Bus (USB) movable mode, so as to realize the wired reverse charging.
The terminal device mentioned in the embodiments of the present application may be a device providing voice/data connectivity to a user, for example, a handheld device, a vehicle-mounted device, etc. with a wireless connection function. Currently, some examples of terminals are: a mobile phone (mobile phone), a tablet computer, a notebook computer, a palm computer, a Mobile Internet Device (MID), a wearable device, a Virtual Reality (VR) device, an Augmented Reality (AR) device, a wireless terminal in industrial control (industrial control), a wireless terminal in self driving (self driving), a wireless terminal in remote operation (remote medical supply), a wireless terminal in smart grid (smart grid), a wireless terminal in transportation security (transportation safety), a wireless terminal in city (city), a wireless terminal in smart home (smart home), a cellular phone, a cordless phone, a session initiation protocol (session initiation protocol) mobile phone, a PDA phone, a wireless local loop (wireless local) local station, a personal digital assistant (SIP) device, and a wireless terminal with wireless communication function, A computing device or other processing device connected to a wireless modem, a vehicle-mounted device, a wearable device, a terminal device in a 5G network, or a terminal device in a Public Land Mobile Network (PLMN) for future evolution, and the like, which are not limited in this embodiment of the present application.
The terminal device may also be a User Equipment (UE), a Mobile Station (MS), a Mobile Terminal (MT), an access terminal, a subscriber unit, a subscriber station, a mobile station, a remote terminal, a mobile device, a user terminal, a wireless communication device, a user agent, or a user equipment, etc.
By way of example and not limitation, in the embodiments of the present application, the terminal device may also be a wearable device. Wearable equipment can also be called wearable intelligent equipment, is the general term of applying wearable technique to carry out intelligent design, develop the equipment that can dress to daily wearing, like glasses, gloves, wrist-watch, dress and shoes etc.. A wearable device is a portable device that is worn directly on the body or integrated into the clothing or accessories of the user. The wearable device is not only a hardware device, but also realizes powerful functions through software support, data interaction and cloud interaction. The generalized wearable smart device includes full functionality, large size, and can implement full or partial functionality without relying on a smart phone, such as: smart watches or smart glasses and the like, and only focus on a certain type of application functions, and need to be used in cooperation with other devices such as smart phones, such as various smart bracelets for physical sign monitoring, smart jewelry and the like.
In addition, in the embodiment of the present application, the terminal device may also be a terminal device in an internet of things (IoT) system, where IoT is an important component of future information technology development, and a main technical feature of the present application is to connect an article with a network through a communication technology, so as to implement an intelligent network with interconnected human-computer and interconnected objects. The terminal device of the present application may also be an on-board module, an on-board component, an on-board chip, or an on-board unit built into the vehicle as one or more components or units, and the vehicle may implement the method of the present application through the built-in on-board module, on-board component, on-board chip, or on-board unit. Therefore, the embodiment of the application can be applied to vehicle networking, such as vehicle to outside (V2X), long term evolution (LTE-V) for vehicle to vehicle communication, V2V, and the like.
The first electronic device 100 may include a processor 201, a charging unit 202, a memory 221, a USB interface 223, a Power Manager Integrated Circuit (PMIC) 224, and a battery 211.
The processor 201 may include any suitable type of processing circuitry, and the processor 201 may include an Application Processor (AP), such as a general purpose processor (e.g., an ARM-based processor, an x 86-based processor, a MIPS-based processor, etc.), a Field Programmable Gate Array (FPGA), and an Application Specific Integrated Circuit (ASIC). A modem processor, a Graphics Processing Unit (GPU), an Image Signal Processor (ISP), a controller, a memory, a video codec, a Digital Signal Processor (DSP), a baseband processor, and/or a neural-Network Processing Unit (NPU), etc. In some implementations, the processor 201 may support computing processing functions, content rendering functions in various formats (e.g., audio, image, video, etc.), a graphics engine, and so forth. The processor 201 may execute an Operating System (OS), various functions, and the like. In some implementations, the processor 201 may be constructed from a single chip with a large number of components on the chip. The components may include a logic core, memory, display system/controller, multimedia encoding/decoding codecs, 2D/3D accelerator engines, Image Signal Processors (ISPs), cameras, audio modems, various high and low speed serial/parallel connection interfaces, and the like. In some implementations, the processor 201 may be implemented as a system on a chip (SOC). The SOC may be used to process instructions and data in computer software, among other operations. The different processing units may be separate devices or may be integrated into one or more processors. Wherein the controller may be a neural center and a command center of the first electronic device 100. The controller can generate an operation control signal according to the instruction operation code and the timing signal to complete the control of instruction fetching and instruction execution. A memory may also be provided in the processor 201 for storing instructions and data. In some embodiments, the memory in the processor 201 is a cache memory. The memory may hold instructions or data that have just been used or recycled by the processor 201. If the processor 201 needs to use the instruction or data again, it can be called directly from the memory. Avoiding repeated accesses reduces the latency of the processor 201, thereby increasing the efficiency of the system.
The processor 201 may be connected with each module in the first electronic device 200, for example, as shown in fig. 2, the processor 201 may be connected with the charging unit 202 through an Inter-Integrated Circuit (I2C) bus. The processor 201 may transmit control instructions to the charging unit 202 and the like via the I2C bus.
The first electronic device 100 may further include a general processor, a mobile communication module 212, a wireless communication module (WC) 214, a Front End Module (FEM), a short range communication unit, and a Radio Frequency Integrated Circuit (RFIC).
The general-purpose processor, which may be a processor for enabling voice communication and/or data transmission, may be a separately configured processor, or may be integrated with the processor 201, and is not limited herein. The general purpose processor may also be used to compress voice data and image data, or may decompress compressed data. The communication processor may include a baseband modem, a Baseband Processor (BP), and the like. The Communication processor may be designed to operate by using one of a Global System for Mobile Communication (GSM) network, an Enhanced Data GSM Environment (EDGE) network, a Code Division Multiple Access (CDMA) network, a W-CDMA network, a Long Term Evolution (LTE) network, an Orthogonal Frequency Division Multiple Access (OFDMA) network, a Wireless Fidelity (Wi-Fi) network, a WiMax network, and a bluetooth network.
The FEM may be used to control transmission/reception of radio signals, and may separate transmission/reception signals. The FEM may be included in the mobile communication module 212 and the wireless communication module 214, or may be separate modules. The FEM may be used to filter and amplify signals, and may include a receive side front end module including a filter for filtering a receive signal and a transmit side front end module including a Power Amplifier Module (PAM) for amplifying a transmit signal.
A radio frequency integrated circuit (e.g., an RF transceiver) may receive radio frequencies from a base station and may modulate the received high frequency band to a low frequency band (i.e., baseband) that may be processed in a module (e.g., a communications processor).
The short-range communication unit may be implemented by including various communication functions unprocessed by the processor 201, such as WiFi, bluetooth, Near Field Communication (NFC), Universal Serial Bus (USB), or Global Positioning System (GPS).
Memory 221 may be used to store computer-executable program code, which includes instructions. The processor 201 executes various functional applications and data processing of the first electronic device 100 by executing instructions stored in the memory 221. The memory 221 may include a program storage area and a data storage area. Wherein the storage program area may store an operating system, an application program required for at least one function, and the like. The storage data area may store data (such as images, videos, and the like) created during the use of the first electronic device 100, and the like. In addition, the memory 221 may include a high-speed random access memory, and may further include a nonvolatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (UFS), and the like.
Although not shown, the first electronic device 100 may further include a speaker, a microphone, a camera, a display screen, a touch panel, a sensor module, an audio module, and the like. The first electronic device 100 may further include a graphics processor or an audio processor. The graphics processor may perform image information processing, acceleration, signal conversion, screen output, and the like. The audio processor may perform any suitable type of audio processing.
The sensor module may include a pressure sensor a, a gyroscope sensor B, an air pressure sensor C, a magnetic sensor D, an acceleration sensor E, a distance sensor F, a proximity light sensor G, a fingerprint sensor H, a temperature sensor J, a touch sensor K, an ambient light sensor L, a bone conduction sensor M, and the like.
Here, the touch sensor K is also referred to as a "touch panel". The touch sensor K may be disposed on the display screen, and the touch sensor K and the display screen form a touch screen, which is also called a "touch screen". The touch sensor K is used to detect a touch operation applied thereto or nearby. The touch sensor can communicate the detected touch operation to the application processor to determine the touch event type. Visual output related to the touch operation may be provided through the display screen. In other embodiments, the touch sensor K may also be disposed on the surface of the first electronic device 100, at a position different from the position of the display screen.
The display screen is used for displaying a display interface of an application in the first electronic device 100, such as a view finding interface of a camera, a chat interface of WeChat, and the like, and can also display images, videos, and the like in a gallery. The display screen includes a display panel. The display panel may adopt a Liquid Crystal Display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (active-matrix organic light-emitting diode, AMOLED), a flexible light-emitting diode (FLED), a miniature, a Micro-oeld, a quantum dot light-emitting diode (QLED), and the like. In some embodiments, the first electronic device 100 may include 1 or N display screens, N being a positive integer greater than 1.
The camera is used to capture still images, moving images, or video. In some embodiments, the number of cameras in the first electronic device 100 may be at least two. Take two as an example, one is a front camera and the other is a rear camera. The camera may include a photosensitive element such as a lens group including a plurality of lenses (convex or concave lenses) for collecting optical signals reflected by an object to be photographed (such as a user's face, a landscape, etc.) and transferring the collected optical signals to an image sensor, and an image sensor. The image sensor generates an image of an object to be photographed according to the optical signal.
In addition, the first electronic device 100 may implement an audio function through an audio module, a speaker a, a receiver B, a microphone C, an earphone interface D, an application processor, and the like. Such as music playing, recording, etc. The first electronic device 100 may receive a key input, and generate a key signal input related to user setting and function control of the first electronic device 100. The first electronic device 100 may generate a vibration alert (e.g., an incoming call vibration alert) using a motor. The indicator in the first electronic device 100 may be an indicator light, and may be used to indicate a charging status, a power change, or a message, a missed call, a notification, or the like. The SIM card interface in the first electronic device 100 is used to connect a SIM card. The SIM card can be brought into and out of contact with the first electronic device 100 by being inserted into or pulled out of the SIM card interface.
It is to be understood that the illustrated structure of the embodiment of the present invention does not specifically limit the first electronic device 100. In other embodiments of the present application, the first electronic device 100 may include more or fewer components than shown, or combine certain components, or split certain components, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The power manager module 224 may be used to regulate the power of the battery 211. For example, the processor 201 may send information, which may be, for example, the load to be processed, to the power manager module 224. The power manager module 224 may regulate the core voltage to be supplied to the processor 201 by using information provided from the processor 201.
The charging unit 202 may charge the battery 211. In some embodiments, the charging unit 202 may generate a signal for charging the battery 211. In some embodiments, the charging unit 202 may regulate (or otherwise adjust) the voltage or current fed to the battery. Additionally or alternatively, the charging unit 202 may perform a constant current charging operation and a constant voltage charging operation. The charging unit 202 may include an external port that may be electrically connected to an external device, such as a Travel Adapter (TA) or a computer. When wired charging is required, for example, when the processor 201 detects that the charging interface is connected to an external charger, the processor 201 transmits a wired charging control command to the charging unit 202, thereby instructing the charging unit 202 to convert the voltage input from the charging interface into a charging voltage for charging the battery. When wired reverse charging is required, for example, when the processor 201 detects a wired reverse charging request transmitted from an external device connected to the charging interface, the processor 201 transmits a wired reverse charging control instruction to the charging unit 202, thereby instructing the charging unit 202 to convert the voltage supplied from the battery into a charging voltage for charging the device connected to the charging interface.
The external port may be a USB port having a fast charging interface function.
Taking the example of the fast charging interface working through a USB port and cable as an example, it may be a standard a USB port of a TA connected to a micro-B or micro-AB USB socket (i.e. socket). In addition, the second electronic device 200 may be a device having a Dedicated Charging Port (DCP).
When the DCP is detected, fast charge detection may be initiated, and fast charge communication is established after detection is completed. The first electronic device 100 and the second electronic device 200 determine that a fast charge communication link can be established, and thus the first electronic device 100 and the second electronic device 200 can communicate in a fast charge communication manner. If the communication link is disconnected, the ports on both sides of the first electronic device 100 and the second electronic device 200 may be restored to corresponding default values, for example, a communication mode of normal charging.
In the embodiment of the present application, for the first electronic device 100, the second electronic device 200, and the third electronic device 300, data may be received through D + or D +, or may be transmitted through D + or D +, so that for any two electronic devices of the first electronic device 100, the second electronic device 200, and the third electronic device 300, data transmission and data reception may be independent of each other, thereby forming bidirectional communication between the electronic devices. It is also possible to transmit and receive data only through the D-line, or to transmit and receive data only through the D + line. In the data transmission process of the first electronic device 100, the second electronic device 200, and the third electronic device 300, a physical layer may be used to transmit or receive multiple bytes. Furthermore, in the data transmission process, the data packet can also comprise a check field, so that the accuracy of the data packet can be improved.
In various exemplary embodiments of the present application, the electronic device to be charged may be referred to as a master device, in this embodiment, the master device may be the first electronic device 100, and in some embodiments, the master device may be a master and a power receiver in a communication protocol, for example, may be a terminal device. The terminal device is used as a main device, plays a leading role in the communication process, and can send instructions and data through D + or D-.
The electronic device providing the charging service may be referred to as a slave device. In the embodiment of the present application, the slave devices may be the second electronic device 200 and the third electronic device 300. In some embodiments, the slave device may be an electronic identification cable and a power supply device, and perform corresponding operations after receiving the information sent by the master device. For example, the terminal sends a voltage adjusting instruction to the power supply device, and after receiving the voltage adjusting instruction, the power supply device executes a voltage adjusting operation according to the voltage adjusting instruction. For another example, the terminal sends a command for reading the current capability of the cable to the cable, and the cable replies the current capability information.
Optionally, the slave devices may be further divided into a primary slave device and a secondary slave device. In some embodiments, the master slave device may be an electronic device on a power output side in the data transmission system, such as a power supply device, a charger, an adapter, and the like, and needs to perform identification detection with the master device to perform communication so as to provide power output for the first electronic device. In some embodiments, the secondary slave device may be an electronic device that does not have power output behavior in the data transmission system, such as a third electronic device in embodiments of the present application, and the third electronic device may be a cable with a special identification, and does not need to provide power output for the first electronic device. In some embodiments, multiple secondary slaves may be supported with one and only one master and one master, with the master designating the recipient of the information when sending the information and the other non-designated recipients not responding to the current information.
The fast charge protocol layer defines a corresponding negotiation mode for the command transmitted from the master device. For example, in order to set a communication frequency for transmitting data between the master and the slave, the master may transmit an electrical signal of the corresponding communication frequency to the slave, and thus, the second electronic device 200 may return the same communication frequency as a response. If data transmission at that communication frequency cannot be supported, all possible communication frequencies of the slave device may be attempted to be transmitted so that the master device can select an appropriate communication frequency.
The fast charge protocol layer may also define corresponding bytes for the command transmitted from the master device, which is described in detail in the following embodiments.
The charging unit 202 is further discussed below with respect to fig. 3. Fig. 3 is a schematic diagram illustrating a connection between the charging unit 202 of the first electronic device 100 and the second electronic device 200 provided according to the present application. In this example, the second electronic device 200 is a charging apparatus, which may be a charger, but also a computer and/or any other type of battery charger.
As shown in fig. 3, the second electronic device 200 may include an AC power input unit 300, an AC/DC conversion unit 310, a fast charging unit 320, and a communication interface 351. Communication interface 351 may be a USB port and/or any other type of port. During charging, the input unit 300 may receive an AC signal from an outlet and feed the AC signal to the AC/DC converting unit 310. The AC/DC conversion unit 310 may convert an AC signal into a DC signal. The AC/DC conversion unit 310 may then feed the DC signal to the fast charging unit 320. The communication interface corresponds to 4 lines corresponding to the USB interface 223, and the 4 lines include: VBUS line, D-line, D + line and GND line. The VBUS line and the GND line may be used to provide the supply voltage. The D-line and the D + line may be used for data transmission between electronic devices.
In one possible implementation, the fast charging unit 320 may include a controller 321 and a switch. The controller 321 may be a protocol chip of the power supply terminal. It should be noted that the controller 321 may also control the power supply circuit and the communication line in other manners, which is only illustrated by way of a switch.
In some embodiments, the USB voltage may power the first electronic device 100 via the VBUS line and the GND line under the control of the USB controller 321. For example, the GND line may be connected to the ground line (GND) of the charging unit 203 in the second electronic device 200. In some embodiments, the controller 321 may be used to control the switches, e.g., may implement shorting the D-line and the D + line when performing protocol handshaking. In other embodiments, the controller 321 may control the switches to transmit or receive data through a communication line or an electrical signal.
As shown in fig. 3, the charging unit 202 in the first electronic device 100 may include a communication interface 350, a fast charging unit 340, and a charging circuit. Communication interface 350 may be a USB port and/or any other type of port.
In one possible implementation, the fast charging unit 340 may include a controller 341 and a switch. It should be noted that the controller 341 may also control the power supply circuit and the communication line in other manners, which is only exemplified by a switch. The controller 341 may be a protocol chip of the terminal to be charged.
In some embodiments, controller 341 may provide signals received over the Vbus line to the charging circuit. The charging circuit may generate one of a fixed voltage and a fixed current signal based on the received signal and feed the generated signal to the battery 211. In order to prevent overvoltage or overcurrent from flowing into the charging circuit, a protection circuit may be connected in front of the charging circuit. For example, the protection circuit may be an Over Voltage Protection (OVP). According to various aspects of the present application, the OVP may be implemented with a switched capacitor. In some embodiments, the protection circuit may be located between the fast charging unit 202 and the charging circuit. In other embodiments, the protection circuit may be disposed between the communication port 350 and the fast charging unit 202.
In some embodiments, the controller 341 may also control the switch to set whether to transmit the received data to the processor 201 through the D-line or the D + line, thereby enabling the controller 341 of the second electronic device 200 to communicate with the first electronic device 100.
For the third electronic device, a controller 361 may be included, and the controller 361 may be configured to record related information of the cable, for example, information about a communication protocol that may be supported, a charging current that may be supported, a charging voltage, and the like. In addition, other identification information of the cable can be recorded, and the identification information is used for the first electronic device or the second electronic device to verify the third electronic device or obtain the capability information of the third electronic device. In other embodiments, the controller 361 may also be used to control the D-and D + lines used to transmit and receive data. For example, it may be used to control a third electronic device to receive data over the D-line and to transmit data over the D + line. Or may be used to control a third electronic device to receive data over the D + line and to transmit data over the D-line. Or, the method can be used for determining the D-and D + lines used for transmitting and receiving data according to the received instruction.
The communication lines are D-and D + lines. There are various ways to transmit data between the electronic devices through the D + line and the D-line, and ways to transmit and receive data between the first electronic device 100 and the second electronic device 200 are illustrated in ways 1 to 4 below.
Mode 1, the D-line may be used to transceive data between the first electronic device 100 and the second electronic device 200. The D + line may be used to transmit a signal indicating whether the first electronic device 100 and the second electronic device 200 are connected.
Mode 2, the D + line may be used to transceive data between the first electronic device 100 and the second electronic device 200. The D-line may be used to transmit a signal indicating whether the first electronic device 100 and the second electronic device 200 are connected.
Mode 3, the D-line may be used for the first electronic device 100 to transmit data to the second electronic device 200. The D + line may be used for the first electronic device 100 to receive data transmitted by the second electronic device 200.
Mode 4, the D + line may be used for the first electronic device 100 to transmit data to the second electronic device 200. The D-line may be used for the first electronic device 100 to receive data transmitted by the second electronic device 200.
For example, the characteristic of the DC signal may be determined by communication data performed between the first electronic device 200 and the second first electronic device 100. The characteristic may include a voltage, a current level, and/or any other suitable type of characteristic. For example, the first electronic device 100 may transmit the indication information of the inputted voltage-current to the second electronic device 200. The fast charging interface 320 of the second electronic device 200 may transmit the output indication information of the voltage-current to the first electronic device 100 and output the selected indication information of the voltage-current to the charging unit 202. The indication information may be transmitted through a USB interface with the charging unit 202.
Considering that the prior art handshaking procedure for a communication protocol is time-consuming, for example, as shown in fig. 4a, the handshaking for the communication protocol requires the first electronic device to send a high level of up to 1s to the second electronic device, so that after the second electronic device detects the high level of 1s, it is confirmed to adopt the corresponding communication protocol for fast charging. The application provides a handshake method of a communication protocol. Fig. 4b is a diagram illustrating a handshaking method according to one communication protocol provided herein. In this embodiment, a first electronic device is taken as a device to be charged, a second electronic device is taken as a power supply device, and a third electronic device is taken as a charging cable as an example for explanation. The handshake method may specifically include the following steps:
step 401: after the first electronic device establishes physical connection with the second electronic device through the third electronic device, the second electronic device is determined to be the DCP device.
In some embodiments, the first electronic device and the second electronic device may perform detection of the USB BC1.2 protocol to determine that the second electronic device is a DCP device. Considering that the DCP device can better support a fast charging mode, after the detection is performed through the USB BC1.2 protocol, the fast charging process of the present application can be performed based on the DCP device, so as to ensure that the first electronic device is fast charged better. The following steps of USB BC1.2 detection are briefly introduced:
step 4011: the first electronic device detects whether the Vbus line is connected.
Step 4012: the first electronic device starts a timer and determines whether Data Connectivity Detect (DCD) is supported.
When the first electronic device is connected with a common USB interface (SDP device) or a USB interface (CDP device) supporting high current, the next step is immediately carried out without waiting for the timeout of the timer. And when the first electronic equipment does not support DCD, executing the next step after the waiting timer is overtime.
Step 4013: the first electronic device initiates a first detection.
The first electronic device applies a voltage VDP SRC on D +, and the first electronic device begins to detect the voltage on D-.
The voltage VDP _ SRC may enable the voltage on the D + line to be in a range of 0.5-0.7 v.
When the voltage detected by the first electronic device on the D-line is larger than VDAT _ REF (namely the voltage range measured on the D-line is 0.25-0.4 v), the second electronic device is determined to be a DCP device (the D + line and the D-line are short-circuited through a controller of the DCP device during the first detection period) or a CDP device (the D + line and the D-line are short-circuited through a controller of the CDP device during the first detection period).
Step 4014: the first electronic device performs secondary detection to determine whether the second electronic device is a DCP device.
The first electronic device applies a voltage VDM _ SRC (0.5-0.7 v) on the D-line and then detects the voltage on the D + line.
And when the voltage on the D + line is larger than VDAT _ REF (the voltage range measured on the D + line is 0.25-0.4 v), determining that the second electronic device is the DCP device.
In some embodiments, the DCP device shorts the D + line and the D-line upon a first detection and a second detection. In other embodiments, the second electronic device is a power supply device supporting only BC1.2, and the D + line and the D-line can be directly short-circuited by resistors inside the second electronic device.
After the second electronic device is determined to be a DCP device, the first electronic device and the second electronic device start protocol handshake detection to detect whether the other party supports the data transmission protocol of the application, so that the communication protocol of the application can be better compatible with the third electronic device and the second electronic device of the USB interface.
Step 402: the first electronic device transmits a first pulse signal to the second electronic device through a communication line (D + line or D-line).
Mode a 1: the first electronic device transmits a first pulse on the D + line.
The first pulse may be implemented in various ways, for example, the first pulse may be a pulse signal as shown in (a) of fig. 4c, in which the duration of the high level is Tdet1 and Tdet 3; the voltage value of the high level may be 3.3V and the duration of the low level may be Tdet 2. In some embodiments, Tdet1, Tdet2, and Tdet3 may be the same, and all are 1ms, or may be set to different times, and may be set according to time requirements, which is not limited herein.
For example, when t is 0ms, the first electronic device enables the pull-up resistor RP, so that a high level is generated on the D + line; taking Tdet 1-Tdet 2-Tdet 3-1 ms as an example, when t is 1-2ms, the first electronic device pulls down the voltage of the D + line, and after t is 2ms, restores the high level of the D + line, so that the first pulse with t 0-3 ms is generated. Therefore, the first electronic equipment sends the first pulse, and the second electronic equipment detects the first pulse.
Mode a 2: the first electronic device transmits a first pulse on the D-line.
The first pulse may be implemented in various ways, for example, the first pulse may be a pulse signal as shown in (a) of fig. 4d, in which the duration of the low level is Tdet1 and Tdet 3; the voltage value of the low level may be-3.3V and the duration of the high level may be Tdet 2. In some embodiments, Tdet1, Tdet2, and Tdet3 may be the same, and all are 1ms, or may be set to different times, and may be set according to time requirements, which is not limited herein.
For example, when t is 0ms, the first electronic device enables the pull-down resistor, so that a low level (e.g., -3.3V) is generated on the D-line; taking Tdet 1-Tdet 2-Tdet 3-1 ms as an example, when t is 1-2ms, the first electronic device pulls up the voltage of the D + line (for example, the voltage value is 0V), and after t is 2ms, the low level of the D + line is restored (for example, -3.3V), so that the first pulse with t being 0-3 ms is generated. Therefore, the first electronic equipment sends the first pulse, and the second electronic equipment detects the first pulse.
Step 403: and after detecting the first pulse, the second electronic equipment disconnects the D + line and the D-line and sends a first response signal through the communication line.
In connection with manner a1, as shown in fig. 4c (b), in some embodiments, when the second electronic device detects the first pulse, the first pulse may also be detected on the D-line because the D + line and the D-line are in a short circuit state. After the second electronic device detects the first pulse, the D + line and the D-line may be disconnected, and the D-line may be pulled down to a ground state as a response signal sent by the second electronic device to the first electronic device, so that the first electronic device determines that the handshake is successful according to the D-line detection response signal.
In other embodiments, the duration that the second electronic device pulls the D-line down to ground may be Tdet 5. For example, the time of Tdet5 is 1 ms. Therefore, the first electronic device can judge whether the handshake is successful only by detecting the time Tdet5, and the detection efficiency is improved.
With reference to the example of the mode a1 in step 402, the second electronic device may detect the first pulse when t is 0 to 3 ms. After the second electronic device detects the first pulse, for example, when t is 3-4 ms, the line between the D + line and the D-line is disconnected, and the D-line is pulled down, so that the level on the D-line is low after t is 4 ms.
In conjunction with manner a2, as shown in fig. 4 (b), in some embodiments, after the second electronic device detects the first pulse, the D + line and the D-line may be disconnected and the D + line may be pulled down to a ground state as a response signal sent by the second electronic device to the first electronic device, so that the first electronic device determines that the handshake was successful.
In other embodiments, the duration that the second electronic device pulls the D + line up to ground may be Tdet 5. Therefore, the first electronic device can judge whether the handshake is successful only by detecting the time Tdet5, and the detection efficiency is improved.
With reference to the example of the mode a2 in step 402, after the second electronic device detects the first pulse, for example, when t is 3 to 4ms, the line between the D + line and the D-line is disconnected, and the D + line is pulled down so that the level on the D + line is low after t is 4 ms.
Step 404: the first electronic device detects a response signal on the communication line, and determines whether the handshake is successful, if so, step 406 is executed, otherwise, step 405 is executed.
In conjunction with manner a1, in some embodiments, the first electronic device may confirm that the protocol handshake was successful when it detects that D-is low. In other embodiments, if the first electronic device detects that D-is low and the duration of the low level is Tdet5, it can confirm that the protocol handshake is successful, and improve the detection efficiency. In connection with the example of the mode a1 in step 402, when t is 2ms, the first electronic device starts low level detection of the D-line.
In conjunction with manner a2, in some embodiments, the first electronic device may confirm that the protocol handshake was successful when it detects that D + is low. In other embodiments, the first electronic device detects that D-is low and the duration of the low is Tdet5, it can confirm that the protocol handshake is successful.
Step 405: the first electronic device performs determining whether the detection frequency of step 402 exceeds 3 times, and if so, performs step 402; otherwise, go to step 407;
step 406: the first electronic device and the second electronic device complete protocol detection.
In connection with the example of the mode a1 in step 402, when t is 5ms, the first electronic device turns off the low level detection of the D-line.
In conjunction with the example of the mode a2 in step 402, when t is 5ms, the first electronic device turns off the low level detection of the D + line.
When the first electronic device determines that the handshake fails, the first electronic device may initiate a retry of handshake detection when t is 5-10 ms.
Step 407: the first electronic device releases control of D + D-and determines that the handshake failed.
Through the handshake protocol, the protocol handshake protocol can be detected on the premise that the second electronic device is determined to be the DCP device, so that the charging protocol based on the USB interface in the current market can be better compatible.
Fig. 5a is a schematic diagram of a handshaking method of another communication protocol provided in the present application. In this embodiment, a first electronic device is taken as a device to be charged, a second electronic device is taken as a power supply device, and a third electronic device is taken as a charging cable as an example for explanation. The handshake method may specifically include the following steps:
step 501: after the first electronic device establishes physical connection with the second electronic device through the third electronic device, the second electronic device is determined to be the DCP device.
For a specific implementation, reference may be made to the method in step 401, which is not described herein again.
Step 502: the first electronic device transmits a second pulse signal to the second electronic device through the communication line (D + line or D-line).
Mode b 1: the first electronic device transmits a second pulse on the D-line.
The second pulse may be implemented in various ways, for example, the second pulse may be a pulse signal as shown in (a) of fig. 5b, wherein the duration of the high level is Tdet1 and Tdet 3; the voltage value of the high level may be 3.3V and the duration of the low level may be Tdet 2. In some embodiments, Tdet1, Tdet2, and Tdet3 may be the same, and all are 1ms, or may be set to different times, and may be set according to time requirements, which is not limited herein.
For example, when t is 0ms, the first electronic device enables a pull-up resistor, so that a high level is generated on the D-line; taking Tdet 1-Tdet 2-Tdet 3-1 ms as an example, when t is 1-2ms, the first electronic device pulls up the voltage of the D-line, and after t is 2ms, the low level of the D-line is restored, so that the second pulse with t 0-3 ms is generated. Thus, the first electronic device is enabled to send the second pulse, and the second electronic device detects the second pulse.
Mode b 2: the first electronic device transmits a second pulse on the D + line.
The second pulse may be implemented in various ways, for example, the second pulse may be a pulse signal as shown in (a) of fig. 5b, in which the duration of the low level is Tdet1 and Tdet 3; the voltage value of the low level may be-3.3V and the duration of the low level may be Tdet 2. In some embodiments, Tdet1, Tdet2, and Tdet3 may be the same, and all are 1ms, or may be set to different times, and may be set according to time requirements, which is not limited herein.
For example, when t is 0ms, the first electronic device enables the pull-down resistor, so that a low level (e.g., -3.3V) is generated on the D-line; taking Tdet 1-Tdet 2-Tdet 3-1 ms as an example, when t is 1-2ms, the first electronic device pulls up the voltage of the D-line (for example, the voltage value is 0V), and after t is 2ms, the low level of the D-line is restored (for example, -3.3V), so that the second pulse with t being 0-3 ms is generated. Thereby, the first electronic device is enabled to transmit the second pulse, so that the second electronic device detects the second pulse.
Step 503: and the second electronic equipment sends a second response signal after detecting the second pulse signal.
In conjunction with mode b1, as shown in (b) of fig. 5b, in some embodiments, when the second electronic device detects the second pulse, since the D + line and the D-line are in a short circuit state, the second pulse may also be detected on the D + line. After the second electronic device detects the second pulse, the D + line and the D-line may be disconnected and the D + line may be pulled down to ground and, after Tdet4 persists, the pull-down of the D + line is released and the high level of the D + line is restored. Therefore, the electric signal of the D + line which lasts for the Tdet4 is used as a second response signal sent by the second electronic device to the first electronic device, so that the first electronic device detects the second response signal according to the D + line and determines that the handshake is successful.
With reference to the example of the method b1 in step 502, the second electronic device may detect the second pulse when t is 0-3 ms. After the second electronic device detects the second pulse, for example, when t is 3 to 4ms, the line between the D + line and the D-line is disconnected, and the D + line is pulled down for 1ms, so that when t is 4 to 5ms, the level on the D + line is low.
In conjunction with mode b2, as shown in fig. 5c (b), in some embodiments, when the second electronic device detects the second pulse, the second pulse may also be detected on the D-line because the D + line and the D-line are in a short circuit state. After the second electronic device detects the second pulse, the D + line and the D-line may be disconnected and the D-line pulled down to ground for Tdet4, and then the pull down of the D-line is released and the low level of the D-line is restored. Therefore, the electric signal lasting Tdet4 is used as a second response signal sent by the second electronic device to the first electronic device, so that the first electronic device detects the second response signal according to the D-line and determines that the handshake is successful.
With reference to the example of the method b2 in step 502, the second electronic device may detect the second pulse when t is 0-3 ms. After the second electronic device detects the second pulse, for example, when t is 3 to 4ms, the line between the D + line and the D-line is disconnected, and the D-line is pulled down for 1ms, so that when t is 4 to 5ms, the level on the D-line is low.
Step 504: the first electronic device detects the second response signal on the communication line, and determines whether the handshake is successful, if so, step 506 is executed, otherwise, step 505 is executed.
In conjunction with the method b1, if the first electronic device detects a low level on the D-line and the duration of the low level is Tdet4, it can confirm that the protocol handshake is successful. In connection with the example of the mode b1 in step 502, the first electronic device may start low level detection of the D + line when t is 2 ms.
In conjunction with the method b2, if the first electronic device detects a low level on the D + line and the duration of the low level is Tdet4, it can confirm that the protocol handshake is successful. In connection with the example of the mode b2 in step 502, the first electronic device may start the low level detection of the D-line when t is 2 ms.
Step 505: the first electronic device determines whether the detection frequency of step 502 exceeds 3 times, if yes, step 502 is executed; otherwise, go to step 507;
in connection with the example of the mode b1 in step 502, when t is 5ms, the first electronic device turns off the low level detection of the D + line.
In connection with the example of the mode b2 in step 502, when t is 5ms, the first electronic device turns off the low level detection of the D-line.
Step 506: protocol handshake detection is completed.
Step 507: the first electronic device releases control of D + D-and determines that the handshake failed.
For example, referring to fig. 5b, when the first electronic device determines that the handshake has failed, the first electronic device may initiate a retry of handshake detection when t is 5-10 ms.
Through the protocol handshake detection method in fig. 4a or fig. 5a, rapid protocol handshake can be achieved, after the master device and the slave device (second electronic device or third electronic device) are connected, detection can be completed within tens of milliseconds, and then data transmission between the electronic devices is started, so that the master device and the slave device enter a fast charge state rapidly, and charging efficiency is improved.
The application provides a data transmission method, which is a method for realizing data transmission by a D +/D-data channel based on a USB interface. With reference to fig. 1a to 3, the data transmission method can be applied to a scenario in which the second electronic device 200 performs fast charging on the first electronic device 100 through the third electronic device 300. In this embodiment, half-duplex communication is performed between the devices, and data is transmitted and received through the first data signal line in the communication line.
Problem 1: consider the prior art in which data is transferred directly using binary data on the D-bus. For example, as shown in fig. 6a, taking the first electronic device as an example of transmitting data to the second electronic device, when the data is consecutive "0" or "1", the level is not transmitted and changed in the whole symbol time, and therefore, in consecutive "0" or "1", if the communication frequency is higher, the second electronic device cannot determine the number of consecutive 0 s or consecutive 1s in the data transmitted by the first electronic device, so that clock synchronization between the first electronic device and the second electronic device cannot be achieved, and an additional transmission line may be required to transmit a clock signal or an additional clock signal may be transmitted to achieve clock synchronization between the first electronic device and the second electronic device. Therefore, only data with a low communication frequency can be transmitted, or continuous "0" or "1" data cannot be transmitted, resulting in a slow communication rate.
Based on the above problem 1, in order to ensure stability of data transmission and increase communication rate, in some embodiments, as shown in fig. 6b, the present application may transmit data based on a manchester encoding mode and receive data through a manchester decoding mode. As shown in fig. 6a, the transition of the inter-symbol time based on the data after the manchester encoding method may be represented as a clock or data. For example, a positive transition (low to high) may represent a1 and a negative transition (high to low) may represent a 0. Alternatively, a positive transition may represent a 0 and a negative transition may represent a 1. In other embodiments, as shown in fig. 6a, differential manchester encoding may be adopted, and by means of the differential manchester encoding, transitions in the generated electrical signal only represent a clock, and data is represented by whether a change in level occurs at the beginning of a symbol. For example, a change indicates 0 and no change indicates 1. Taking an example of data transmission between the first electronic device and the second electronic device as follows, a data transmission method provided by the embodiment is described, and as shown in fig. 6c, the data transmission method may specifically include:
step 601: the first electronic device detecting a connection with a second electronic device;
in step 601, if data is transmitted between the first electronic device and the third electronic device, the first electronic device detects a connection with the third electronic device.
The first electronic device is connected to the second electronic device through a third electronic device, which may include a first data signal line and a second data signal line.
Wherein the first data signal line may be a D + line, or a D-line. The second data signal line may be a D-line, or a D + line.
Step 602 a: a first message is sent over a first pin.
The first message is a message coded by Manchester, and the first pin is connected with the first data signal line.
Step 602 b: a second message is received via the first pin.
The second message is a message encoded by Manchester.
In this embodiment, half-duplex communication is performed between devices, and data is transmitted and received through the first data signal line. After the protocol handshake detection is successful, the connection state between the devices can be determined by maintaining the level state on the second data signal line and by monitoring the level state of the second data signal line.
In the method c1, as shown in fig. 6D, the second data signal line is a D + signal line, and the first data signal line is a D-signal line.
For example, the first electronic device may pull up the D + signal line to 3.3V and maintain the state to monitor the connection state among the first electronic device, the second electronic device, and the third electronic device; for example, when the first electronic device and the second electronic device are in a connection failure, the level of the D + signal line received by the second electronic device is not 3.3V, so that it can be determined that the first electronic device and the second electronic device are in a connection failure. When the first electronic device and the third electronic device are in connection failure, the level of the D + signal line received by the third electronic device is not 3.3V, so that the connection failure of the first electronic device and the third electronic device can be determined.
The first electronic device may transmit data to the second electronic device and the third electronic device through the first pin on the D + data signal line. The second electronic device or the third electronic device can also send data to the first electronic device through the first pin on the D + data signal line, thereby realizing data transmission between the devices.
In the mode c2, as shown in fig. 6e, the first data signal line is a D + signal line, and the second data signal line is a D-signal line.
For example, the first electronic device may pull the D-signal line down to-3.3V and maintain the state to monitor the connection state among the first electronic device, the second electronic device, and the third electronic device; for example, when the first electronic device and the second electronic device are in a connection failure, the level of the D + signal line received by the second electronic device is not-3.3V, so that it can be determined that the first electronic device and the second electronic device are in a connection failure. When the first electronic device and the third electronic device are in connection failure, the level of the D + signal line received by the third electronic device is not-3.3V, so that the connection failure of the first electronic device and the third electronic device can be determined.
The first electronic device may transmit data to the second electronic device and the third electronic device through the first pin on the D-data signal line. The second electronic device or the third electronic device can also send data to the first electronic device through the first pin on the D-data signal line, so that data transmission between the devices is realized.
The data structure of the first message and the second message is exemplified below.
Example 1
The first message and the second message may include a start byte and an end byte of the data packet.
In conjunction with mode c1, as shown in fig. 6f (a), in some embodiments, the start byte of a packet may be a high level pulse of continuous time length. The end byte of the data packet may be a high level pulse of a continuous length of time. For example, the start byte (SOF) of a packet may be a high-level pulse of 8 UIs. For example, the end byte (EOF) of a data packet may be a high level pulse of 4 UI.
In conjunction with mode c2, as shown in fig. 6f (b), in some embodiments, the start byte of the data packet may be a low level pulse of continuous time length. The end byte of the data packet may be a low level pulse of a continuous length of time. For example, the start byte (SOF) of a data packet may be a low-level pulse of 8 UIs (where a UI may be a length of time required for a bus to transmit one data bit, i.e., a UI is related to a frequency f at which a first electronic device communicates with a second electronic device, and T is 1/f). For example, the end byte (EOF) of a data packet may be a low level pulse of 4 UI.
Problem 2: in consideration of the fact that data transmission is carried out on a D-bus at a fixed communication frequency in the prior art, when interference exists in data transmission, the robustness of the data transmission is low, and the communication performance is poor.
Based on the above problem 2, in conjunction with the embodiment in fig. 6c, the first electronic device can select a desired communication frequency according to actual requirements. As shown in fig. 7, a method of configuring a communication frequency between a first electronic device and a second electronic device is described in detail below. The method specifically comprises the following steps:
step 701: the first electronic device sends a first signal through the first pin.
The frequency of the first signal is a first frequency; the first signal is used for negotiating that the communication frequency is the first frequency.
The first frequency may be determined by the transmitted first signal. For example, the first signal may be a 1010101010101010 sequence transmitted on the D-channel with a period T; thus, it can be determined that the first frequency of the first signal is 1/T. After the sequence, a high-level pulse may be included as an end bit of the first signal.
Step 702: and after receiving the first signal through the first pin, the second electronic equipment sends a second signal through the first pin.
The frequency of the second signal is a first frequency; the second signal is used to determine that the communication frequency is the first frequency.
With reference to the example in step 701, after the second electronic device receives the sequence, the same sequence with the same frequency is sent to the first electronic device as the second signal. Informing the first electronic device that the first signal is received and the second electronic device supports a communication frequency corresponding to the first signal;
step 703: the first electronic equipment receives a second signal through the first pin, and determines whether the second signal is received or not within a preset time window; if yes, go to step 704, otherwise go to step 705;
step 704: determining the communication frequency of the first electronic device and the second electronic device as a first frequency.
Step 705: the first frequency is updated by the second frequency, and steps 701-705 are repeatedly performed.
It should be noted that the determination of the first frequency and the second frequency may be determined according to a plurality of preset frequencies, for example, the communication frequencies f1, f2, f3 and f4 of 4 gears may be preset, and when the configuration of the communication frequency f1 fails, the communication frequencies of other gears may be selected to initiate the configuration of the communication frequency.
In some embodiments, considering that the amount of communication data between the third electronic device and the first electronic device is small, the third electronic device is mainly used for sending the capability information of the third electronic device to the first electronic device, and therefore, in this embodiment, the third electronic device may not perform the configuration of the communication frequency, and only selects a default communication frequency for communication with the first electronic device. For example, the default communication frequency may be the lowest communication frequency among the selectable frequencies. Of course, other communication frequencies may be set, and are not limited herein.
By the method, the first electronic device can send the first signal, and after the second electronic device and the third electronic device receive the first signal, the first frequency of the first signal is determined to be used for communication, so that preparation is made for subsequent data transmission.
Problem 3: in the prior art, only point-to-point communication between a first electronic device and a second electronic device can be supported on a D-line, communication between multiple devices cannot be supported, and a scenario that the first electronic device, the second electronic device, and a third electronic device are required to communicate when the third electronic device is still present in a system cannot be adapted.
Based on the above problem, in the embodiment of the present application, different identifiers of electronic devices may be defined, and when the first message or the second message is sent, the identifier of the corresponding electronic device may be carried, so as to implement data transmission between multiple devices.
It is considered that in this embodiment, data is transmitted and received only through the first data signal line. Therefore, it is necessary to carry the identifiers of the sender and the receiver in the first message and the second message to distinguish the plurality of electronic devices.
In some embodiments, the identity of the different electronic devices may be represented by role-coded information. The role coding information can be carried by physical header information.
In one possible implementation, the first message includes: a third identifier; the third identification is used for indicating a receiver of the first message and a sender of the first message; the second message includes: a fourth identification; the fourth identification is used for indicating a receiver of the second message and a sender of the second message; the receiver of the first message or the sender of the second message is any one of: a second electronic device, a third electronic device.
For example, a Role Code (Role Code), which may be composed of 8-bit data bits, the upper four bits identify the Role of the data sender and the lower four bits identify the Role of the data receiver. The details are shown in Table 2.
TABLE 2
Figure BDA0002748559160000311
Figure BDA0002748559160000321
For another example, the number of bytes occupied by the character code may be determined according to a plurality of electronic devices connected to the communication system, for example, to save the number of bytes, the number of bytes occupied by the character code may be set to 4 bits. The high 2 bits identify the role of the sender of the data and the low 2 bits identify the role of the receiver of the data. Alternatively, the lower 2 bits identify the role of the sender of the data and the upper 2 bits identify the role of the receiver of the data. Taking the role of the sender of identification data with high 2 bits and the role of the receiver of identification data with low 2 bits as an example, it can be expressed as table 3.
TABLE 3
Figure BDA0002748559160000322
Take the example that the first message is sent to the second electronic device, and the second message is a message fed back to the first electronic device by the second electronic device. By adding the third identifier to the first message, the second electronic device may be caused to determine that the recipient of the first message is itself, and when the sender in the third identifier determines that the identifier is fed back to the sender subsequently, the identifier carried in the sent second message is the identifier of the first electronic device, i.e., the fourth identity is included in the sent second message, may cause the first electronic device to determine that the recipient of the second message is the first electronic device, and when the sender in the fourth identifier is the second electronic device, determining the subsequent feedback to the sender, the identifier carried in the sent message is the identifier of the second electronic device, so that the non-specified electronic device (for example, the third electronic device) is ensured not to respond to the first message, and the non-specified electronic device (for example, the third electronic device) does not respond to the second message, thereby realizing the communication of the plurality of electronic devices on the single bus.
In other embodiments, the information related to the role code may be sent through a physical layer before the first message or the second message is sent, so that the first electronic device, the second electronic device, and the third electronic device determine the identifiers corresponding to the roles of the data sender and the recipient, so as to implement multi-device communication on a single bus for subsequent transceiving of the first message and the second message.
Problem 4: in consideration of the fact that in the prior art, the communication mode is performed in a mode that a master device asks a slave device (a second electronic device or a third electronic device) to answer, the slave device (the second electronic device or the third electronic device) can only respond to the master device, and active communication cannot be performed. That is, only after the first electronic device sends a message to the second electronic device, the second electronic device feeds back a corresponding message, and in a scenario where the second electronic device needs to actively report related information, such as an abnormality, the first electronic device may not be notified in time, which may cause a problem that the charging of the first electronic device is abnormal, or even a corresponding device of the first electronic device is damaged. Based on the problem 4, in the embodiment of the present application, the slave device is allowed to actively send a message. Data transmission is realized among a plurality of electronic devices through D + or D-, and the data transmission is used for sending commands among the devices, reporting and acquiring information. Consider the problem of a plurality of electronic devices sharing a first data signal line to transmit messages. A plurality of devices in the system may simultaneously apply for the right to use the bus, and in order to avoid bus collision, applicants needing to occupy the bus in the system need to be reasonably controlled and managed. In consideration of whether the first electronic device is the master device or the second electronic device, the priority of the first electronic device in transmitting data using the first data signal line may be set to high, the priority of the second electronic device in transmitting data using the first data signal line may be set to medium, and the priority of the third electronic device in transmitting data using the first data signal line may be set to low. In the embodiment of the present application, a method for arbitrating data transmission is provided, which is illustrated in fig. 8a below.
As shown in fig. 8a (a), in some embodiments, after the first electronic device sends the first message through the first pin, the first data signal line is used for the first electronic device to receive the message within the first time window.
It should be noted that the slave device (the second electronic device or the third electronic device) may determine that the first message is completely transmitted when receiving the end field of the first message transmitted by the first electronic device. That is, after the first electronic device has sent the first message, the slave device may possess the first data signal line by initiating communication.
As shown in fig. 8a (b), in some embodiments, after the first electronic device receives the second message through the first pin, the first data signal line is used for the electronic device to receive the message within a second time window.
As shown in (c) of fig. 8a, after the first electronic device determines that the current time exceeds the second time window, the first data signal line is used for the electronic device to send a message. That is, if the slave device (the second electronic device or the third electronic device) does not use the first data signal line within the second time window, ownership of the first data signal line will revert back to the first electronic device.
It should be noted that, in some embodiments, to avoid excessive delay, the slave device may end sending the message after the second time window expires regardless of whether the slave device (the second electronic device or the third electronic device) completes sending the data, and the ownership of the first data signal line returns to the first electronic device. In other embodiments, when it is determined that the data transmission from the slave device (the second electronic device or the third electronic device) is not completed, a third time window may be set accordingly, and the window length of the third time window is longer than that of the second time window, so as to ensure that the data transmission from the slave device is completed as much as possible.
Further, in some application scenarios, when the state of the slave device (second electronic device or third electronic device) changes and the state information of the slave device (second electronic device or third electronic device) needs to be reported in time, if the current right of use of the first data signal line is the first electronic device, the state of the slave device (second electronic device or third electronic device) may not be reported to the first electronic device in time. Therefore, in this embodiment of the present application, a data transmission method may also be provided, as shown in fig. 8b, specifically including:
step 801: the second electronic device or the third electronic device sends a first interrupt signal when the first data signal line is idle.
When an error event or an abnormal event occurs in the second electronic device or the third electronic device, for example, the second electronic device has conditions of excessive current, poor contact, voltage fluctuation, and the like, at this time, the second electronic device needs to send current state information of the second electronic device to the first electronic device in time, and may send a first interrupt signal to trigger a process of interrupting data sending by the first electronic device.
In some embodiments, the first interrupt signal may be a pulse, and the width of the pulse may be a pulse width that is distinguishable from other messages, so that the first electronic device may be caused to distinguish the first interrupt signal from the signal of the message of normal communication by the pulse width.
Step 802: and after receiving the first interrupt signal, the first electronic device receives a third message reported by the second electronic device or the third electronic device.
In some embodiments, after receiving the first interrupt signal, the first electronic device may send a query message to the second electronic device or the third electronic device, where the query message is used to query current state information of the second electronic device or the third electronic device to obtain an abnormal event or an error event of the second electronic device or the third electronic device.
In other embodiments, after the second electronic device or the third electronic device sends the first interrupt signal, the third message may be directly sent to the second electronic device or the third electronic device, so that the first device obtains an abnormal event or an error event of the second electronic device or the third electronic device according to the sent third message.
By the method, the second electronic device and the third electronic device can actively report respective state information, a passive mode that a slave device (the second electronic device or the third electronic device) only responds to a master device in the prior art is avoided, and the flexibility of charging control and the charging safety are improved.
Considering that the first electronic device is disconnected from the second electronic device when the first data signal line is abnormal, for example, during high-current charging, at this time, the high current may cause irreversible damage to the first electronic device capturing the second electronic device, and at this time, the second electronic device may detect a pulling-out motion of the third electronic device within a microsecond time, quickly close an output path of energy, and stop a charging mode of quick charging. Accordingly, the data transmission mode also needs to be restored to the data transmission mode in the normal charging mode. In the embodiment of the application, the reset signal can be sent by the first electronic device, so that the reset of the communication modes of the second electronic device and the third electronic device is realized.
As shown in fig. 8c, a timing diagram of the first RESET signal (T _ RESET) sent at the first electronic device. The first electronic device can send a first reset signal through the first pin; the first reset signal is used for indicating a receiver of the first reset signal to reset; the pulse width of the first reset signal has a correlation with a receiver.
In some embodiments, the first reset signal may be a reset pulse; the reset pulse may be a pulse signal that drives the first data signal line to a high level for a preset time. The preset time may be a time length much longer than the data signal or the time window occupied by the present application. For example, the preset time may be 1 s.
And after the second electronic equipment receives the first reset signal, the second electronic equipment restores the state of the second electronic equipment to the default state according to the reset protocol. And after the third electronic equipment receives the first reset signal, the third electronic equipment restores the state of the third electronic equipment to the default state according to the reset protocol.
In order to improve the data transmission quality on the communication link, in the embodiment of the present application, the data packet may further include communication data error check. The communication data error check may be a cyclic redundancy check. The CRC may be generated and checked by the physical layer or the protocol layer.
For example, as shown in fig. 8d, the data frame includes 3 data frames, the 1 st data frame includes a data frame of a data packet header, the 2 nd data frame includes a data frame of control information, and the 3 rd data frame is a data frame of a cyclic redundancy check. The transmitting end transmits all data with the length of 8 bits (one byte) and automatically counts, and adds a parity check bit for the end of each byte. Thus, the data sender would count and add a Cyclic Redundancy Check (CRC) to the end of each data packet transmitted over the protocol.
In some embodiments, a cyclic redundancy check field may be added to all data transmitted by the first electronic device to the second electronic device and transmitted by the second electronic device to the first electronic device.
In other embodiments, as shown in fig. 8e, N +3 data frames are included, the 1 st data frame includes a data frame of a data packet header, the 2 nd data frame includes a data frame of data description information, and the 3 rd to N +2 th data frames are data contents; the (N + 3) th data frame is a cyclic redundancy check data frame. A Cyclic Redundancy Check (CRC) may be performed only for the data field, excluding parity bits. The data transmitter counts a Cyclic Redundancy Check (CRC) and adds it to the end of the data packet. The receiving end needs to calculate the Cyclic Redundancy Check (CRC) of the received data and compare with the Cyclic Redundancy Check (CRC) bytes received by the data packet to check the data.
Based on the above problem 1, the present application provides a data transmission method, which is a method for realizing data transmission based on a D +/D-data channel of a USB interface. With reference to fig. 1a to 3, the data transmission method can be applied to a scenario in which the second electronic device 200 performs fast charging on the first electronic device 100 through the third electronic device 300. The communication mode between the devices is full duplex communication. In the embodiment of the application, a full-duplex communication mode is adopted, so that the problem that the clock needs to be sent synchronously when the first electronic equipment sends data to the second electronic equipment can be solved. As shown in fig. 9a, the specific steps may include:
step 901: detecting a connection with a second electronic device and/or a third electronic device;
the first electronic device is connected to the second electronic device through a third electronic device, which may include a first data signal line and a second data signal line. Wherein the first data signal line may be a D + line, or a D-line. The second data signal line may be a D-line, or a D + line.
In some embodiments, the determination of whether the first electronic device transmits data using the D + line or the D-line as the first data signal line may be various. The manner of communication between the first electronic device and the second electronic device is illustrated below in the manner d1-d 3.
In the mode D1, the first electronic device and the second electronic device determine whether the first data signal line is a D + line or a D-line in a preset mode. For example, in the communication protocol for fast charging, a default communication mode is determined, and a first data signal line of an electronic device to be charged (a first electronic device) is a D-line, and a second data signal line of the electronic device to be charged (the first electronic device) is a D + line. Correspondingly, the first data signal line of the power supply device is a D + line. The second data signal line of the power supply device is a D-line.
In the manner d2, the first electronic device and the second electronic device may determine the first data signal line and the second data signal line corresponding to the first electronic device by negotiation before communication, so that the first data signal line and the second data signal line corresponding to the second electronic device are determined accordingly. In some embodiments, the first electronic device may determine that the first data signal line is a D + line or a D-line after the protocol handshake is completed. Therefore, after the second electronic device receives the negotiation instruction, the data signal line is determined to be the data signal line for receiving the first electronic device, that is, the data signal line is determined to be the second data signal line of the second electronic device. In other embodiments, the negotiation instruction may be initiated by the second electronic device, so that the negotiation is determined to be completed through a negotiation response fed back by the first electronic device, and thus, the respective first data signal line and the second data signal line are determined according to a negotiation result.
It should be noted that, in some embodiments, the negotiation instruction may be data sent by the first electronic device to the second electronic device, so as to reduce the sending of the instruction. The negotiation instruction may also be an instruction for performing negotiation alone, and is not limited herein.
In the manner d3, the first electronic device and the second electronic device may switch the first data signal line and the second data signal line during communication.
In some embodiments, the instruction may be an instruction for switching lines initiated by a first electronic device to a second electronic device, for example, when a first data signal line of the first electronic device is currently a D-line, a switching instruction may be sent to the second electronic device through the D-line, and after the second electronic device receives the switching instruction through the D-line, the second electronic device determines that a data signal line communicating with the first electronic device needs to be switched, so as to determine whether to switch the D-line to a second data signal line of the second electronic device as needed, and when it is determined that the second electronic device may switch the D-line to the second data signal line of the second electronic device and switch the D + line to a first data signal line of the second electronic device, the second electronic device may send a switching response to the first electronic device through the switched first data signal line (D + line) of the second electronic device, to determine that the handover is complete. When the second electronic device determines that the D-line is not agreed to be switched to the second data signal line of the second electronic device, or when the D-line is not supported to be switched to the second data signal line of the second electronic device, the second electronic device sends a switching response to the first electronic device through the first data signal line (D-line) of the original second electronic device to indicate that the switching is not agreed to be switched, or the switching fails, and in the subsequent communication, the second electronic device sends data through the D + line and receives the data through the D-line. The first electronic device sends data through the D-line and receives data through the D + line.
In other embodiments, when it is determined that the second electronic device can switch the D-line to the second data signal line of the second electronic device and switch the D + line to the first data signal line of the second electronic device, the second electronic device sends a switching response to the first electronic device through the first data signal line (D-line) of the second electronic device to determine that the switching is completed. In subsequent communications, the first electronic device transmits data over the D + line and receives data over the D-line. The second electronic device sends data through the D-line and receives data through the D + line.
When the second electronic device determines that the D-line is not allowed to be switched to the second data signal line of the second electronic device, or when the D-line is not allowed to be switched to the second data signal line of the second electronic device, the second electronic device sends a switching response to the first electronic device through the first data signal line (D-line) of the original second electronic device to determine that the switching fails.
In other embodiments, the second electronic device may also initiate a switching instruction, so that the completion of the switching is determined through a negotiation response fed back by the first electronic device, and thus, the respective first data signal line and the second data signal line are determined according to the switching result.
For the communication between the first electronic device and the third electronic device, the communication manner between the first electronic device and the second electronic device is exemplified in the following manner e1-e 4.
In the mode e1, the first electronic device and the third electronic device determine, in a preset mode, that the first data signal line of the first electronic device is a D + line or a D-line, and the first data signal line of the third electronic device is a D-line or a D + line. For example, in the communication protocol for fast charging, a default communication mode is determined, and a first data signal line of an electronic device to be charged (a first electronic device) is a D-line, and a second data signal line of the electronic device to be charged (the first electronic device) is a D + line. Accordingly, the first data signal line of the cable is a D + line. The second data signal line of the cable is a D-line.
In the manner e2, the first electronic device and the third electronic device may determine the first data signal line and the second data signal line corresponding to the first electronic device by negotiation before the first electronic device communicates with the third electronic device, so that the first data signal line and the second data signal line corresponding to the third electronic device are determined accordingly.
In some embodiments, the first electronic device may determine that the first data signal line is a D + line or a D-line after the protocol handshake is completed. Therefore, after the third electronic device receives the negotiation instruction, the data signal line is determined to be the data signal line for receiving the first electronic device, that is, the data signal line is determined to be the second data signal line of the third electronic device.
In other embodiments, a negotiation instruction may be initiated by the third electronic device, so that the negotiation is determined to be completed through a negotiation response fed back by the first electronic device, and thus, the respective first data signal line and the second data signal line are determined according to a negotiation result.
It should be noted that the negotiation instruction may be an instruction sent by the first electronic device to the second electronic device to detect the third electronic device, so as to reduce the sending of the instruction. The negotiation instruction may also be an instruction for performing negotiation alone, and is not limited herein.
In the mode e3, the first electronic device and the third electronic device may determine the first data signal line and the second data signal line corresponding to the third electronic device by negotiation after the first electronic device and the second electronic device determine the first data signal line and the second data signal line.
In some embodiments, after the first electronic device determines the first data signal line and the second data signal line for communicating with the second electronic device, the first electronic device may send a negotiation instruction to the third electronic device through the determined first data signal line (D + line or D-line), and at this time, after receiving the negotiation instruction, the third electronic device determines that the data signal line is a data signal line for receiving the first electronic device.
Or after the second electronic device determines the first data signal line and the second data signal line for communicating with the first electronic device, the second electronic device may send a negotiation instruction to the third electronic device through the determined first data signal line (D + line or D-line), and at this time, after receiving the negotiation instruction, the third electronic device determines that the data signal line is a data signal line for receiving the second electronic device.
In the above method, the communication method between the third electronic device and the first electronic device may be independent of the communication method between the third electronic device and the first electronic device. For example, the communication mode between the third electronic device and the first electronic device may be set before the communication between the third electronic device and the first electronic device. Before the communication between the third electronic device and the second electronic device, a communication mode between the third electronic device and the second electronic device is set.
Alternatively, consider a scenario in which there may be a conflict, for example, the first electronic device sends a first negotiation instruction to the third electronic device, and the second electronic device sends a second negotiation instruction to the third electronic device. The first negotiation instruction conflicts with a first data signal line of the third electronic device indicated by the second negotiation instruction, and at this time, the third electronic device may determine a communication mode, so as to reply to the first electronic device and the second electronic device correspondingly. For example, the third electronic device determines that the first data signal line and the second data signal line are determined in a manner corresponding to the first negotiation instruction. The negotiation success may be replied to the first electronic device and the negotiation failure may be replied to the second electronic device. Thereby, the first electronic device and the second electronic device are informed of the corresponding negotiation results.
The manner in which the third electronic device determines the first data signal line and the second data signal line may be determined according to a priority of communication between the third electronic device and the first electronic device or the second electronic device, for example, when the priority of communication between the first electronic device and the third electronic device is higher, the determination may be performed according to a first negotiation instruction of the first electronic device, and when the priority of communication between the second electronic device and the third electronic device is higher, the determination may be performed according to a second negotiation instruction of the second electronic device.
The priority of the communication between the third electronic device and the first electronic device or the second electronic device may be determined according to the current electronic device with which the third electronic device preferentially communicates, or may be a preset priority, which is not limited herein.
Step 902 a: sending a first message through a first pin; the first pin is connected with a first data signal line.
Step 902 b: receiving a second message through a second pin; the second pin is connected with a second data signal line.
Wherein the first message and the second message are used to set charging of an electronic device.
In combination with the mode a1 or the mode b1, in a possible mode f1, the second data signal line is a D + signal line, and the first data signal line is a D-signal line. At the moment, the first pin is connected with the negative signal data line; the second pin is connected with the positive signal data line. As shown in fig. 9b, the first electronic device transmits data on D-and receives data on D +; the second electronic device receives data on D-and transmits data on D +.
In combination with the mode a2 or the mode b2, in a possible mode f2, the first data signal line is a D-signal line, and the second data signal line is a D + signal line. At this time, the first pin is a pin connected with a positive signal data line; the second pin is connected with the negative signal data line. As shown in fig. 9c, the first electronic device transmits data on D + and receives data on D-; the second electronic device receives data on D + and transmits data on D-.
For a third electronic device, the third electronic device may receive data on D + and transmit data on D-. Alternatively, the third electronic device receives data on D + and transmits data on D-. For example, in FIG. 9b, a third electronic device may receive data on D-and transmit data on D +. In other embodiments, the third electronic device may further switch the communication mode of the third electronic device through the controller of the third electronic device. For example, the communication mode may be switched by setting a switch to switch a data transmission pin of the third electronic device to a D + line and a data reception pin of the third electronic device to a D-line, so as to switch the communication mode of the third electronic device to receive data on the D-line and transmit data on the D + line. In fig. 9c, the third electronic device receives data on D + and transmits data on D-. In other embodiments, the third electronic device may further switch the communication mode of the third electronic device through the controller of the third electronic device. For example, the communication mode may be switched by setting a switch to switch a data transmission pin of the third electronic device to a D-line and a data reception pin of the third electronic device to a D + line, so as to switch the communication mode of the third electronic device to receive data at D + and transmit data at D-. In fig. 9D, the third electronic device may be configured with 2 data receiving modules RX1 and RX2 and 2 data transmitting modules TX1 and TX2 to implement 2 transceiver modes switching, for example, configured to receive data on D + and transmit data on D-through the receiving module RX1 and the transmitting module TX 1. The setting may be performed by determining the D-data signal line as a received line after the D-reception of the control command, and accordingly setting the receiving module RX1 to be enabled and the transmitting module TX1 to be enabled accordingly. It may also be arranged to receive data on D-and to transmit data on D + via the receive module RX2 and the transmit module TX 2. The setting may be performed by determining D + as a data signal line as a receiving line after D + receives the control command, and accordingly setting the receiving module RX2 to be enabled and the transmitting module TX2 to be enabled accordingly. (for example, the switching may be realized by a switch as shown in fig. 9d, but of course, the switching may also be realized by other manners, which is not limited herein).
In step 902a, in conjunction with either mode a1 or b1, as shown in FIG. 9e (a), the first electronic device signals a logic "0" by pulling the first data signal line low, indicating the beginning of the transmission of the character. After the data transmission is completed, the end of the transmission is indicated by sending a logic "1" signal.
In some embodiments, the first electronic device may set the first data signal line to a high level when the first data signal line is in an idle state, and set a time (for example, a time of one data bit) corresponding to a start field of the first data signal line to be pulled down as the start field of the first message after confirming that the first message starts to be transmitted (the transmission instruction is received) to start communication. And then, sequentially sending the data in the first message from the low order to the high order, and sending the end field of the first message after the data in the first message is sent. In some embodiments, the end field may be a time (e.g., one data bit time) corresponding to pulling up the end field of the first data signal line to determine that one data frame in the first message is sent.
In step 902a, in conjunction with either mode a2 or b2, as shown in FIG. 9e (b), the first electronic device signals a logic "0" by pulling the first data signal line high, indicating the beginning of the transmission of the character. After the data transmission is completed, the end of the transmission is indicated by sending a logic "1" signal.
In some embodiments, the first electronic device may set the first data signal line to a low level (e.g., -3.3V) when the first data signal line is in an idle state, and after confirming that the first message starts to be sent (the sending instruction is received), pull up the first data signal line to 0V for a time corresponding to the start field (e.g., a time of one data bit) to serve as the start field of the first message, so as to start communication. And then, sequentially sending the data in the first message from the low order to the high order, and sending the end field of the first message after the data in the first message is sent. In some embodiments, the end field may be a time (e.g., one data bit time) corresponding to pulling down the end field of the first data signal line to determine that one data frame in the first message is sent.
For example, a data frame may include a 1-bit start field, an 8-bit data field, and a 1-bit stop field. When the first message includes only one data frame, it may be considered that the current first message transmission is completed, and when the first message includes a plurality of data frames, each data frame in the first message may be sequentially transmitted until each data frame in the first message is completely transmitted.
In step 902b, in combination with the manner a1 or b1, in some embodiments, the first electronic device may determine that there is data transmission when the second data signal line is in an idle state, may determine that the second data signal line is at a high level, and when a falling edge of the second data signal line is detected, may determine that the second message starts to be received, and may sequentially receive one frame of data frames in the second message from a low bit to a high bit, and after it is determined that the data frame of the preset byte is completely received, determine that the second data signal line is at a high level, thereby determining that the reception of one data frame is completed.
In step 902b, in combination with the manner a2 or b2, the first electronic device may determine that there is data transmission when the second data signal line is in an idle state, the second data signal line is at a low level (e.g., -3.3V), when a rising edge of the second data signal line is detected, may determine that the second message starts to be received, sequentially receives one frame of data frames in the second message from a low bit to a high bit, and determines that the second data signal line is at the low level after it is determined that the data of the preset byte is completely received, thereby determining that the reception of one data frame is completed.
As shown in fig. 9f, the structure of one data frame may include a start field (labeled S in the figure), a data field, and a stop field (labeled E in the figure). The interval between different data is denoted as I. For example, in a data link, a frame of data includes 10 bits (1bit start field +8bit data field +1bit stop field), and at the protocol layer, a data may include a plurality of 10bit data frames according to different information commands.
For example, the control command may include 5 data frames as shown in (a) of fig. 9 f. The data field of the 1 st data frame is a communication frequency (training) field, the data field of the 2 nd data frame is a high-order message header field, the data field of the 3 rd data frame is a low-order message header field, the data field of the 4 th data frame is a control command field, and the data field of the 5 th data frame is a CRC check field.
The data command may include 4+ N data frames as shown in (b) of fig. 9 f. The data field of the 1 st data frame is a communication frequency field, the data field of the 2 nd data frame is a high-order message header field, the data field of the 3 rd data frame is a low-order message header field, the data fields of the 4 th data frame to the 3+ N data frame are data fields, and the data field of the 4+ N data frame is a CRC (cyclic redundancy check) field.
The data may also be a custom command, which may include 6+ N data frames, for example, as shown in (c) of fig. 9 f. The data field of the 1 st data frame is a communication frequency field, the data field of the 2 nd data frame is a high-order message header field, the data field of the 3 rd data frame is a low-order message header field, the data field of the 4 th data frame is a high-order manufacturer information field, the data field of the 5 th data frame is a low-order manufacturer information field, the data fields of the 6 th to 5+ N data frames are data fields, and the data field of the 6+ N data frame is a CRC (cyclic redundancy check) field.
The format of the command field is only an example, and the data packet may also have data frames corresponding to other fields, which is not described herein again.
Based on the above-mentioned problem 2, it is considered that in the prior art, data transmission is performed on the D-bus at a fixed communication frequency, and when there is interference in data transmission, the robustness of data transmission is low and the communication performance is poor. In connection with the embodiment in fig. 9a, the first electronic device may select a desired communication frequency according to actual requirements. As shown in fig. 10a, a method of configuring a communication frequency between a first electronic device and a second electronic device is described in detail below. The method specifically comprises the following steps:
step 1001 a: and the first electronic equipment sends a first message after sending a first signal through the first pin.
The frequency of the first signal is a first frequency.
The first frequency may be determined by the transmitted first signal. For example, as shown in fig. 10b, the first signal may be 0xAA or 0x55 data transmitted on the D-channel, and the communication frequency of the first signal is determined by receiving 0xAA or 0x55 data; after the data, a level pulse may be further included as an end bit of the first signal.
Step 1002 a: and after the second electronic equipment or the third electronic equipment receives the first signal through the first pin, the first message is received.
And determining the communication frequency of the second message as the frequency of the second signal through the first signal.
Step 1001 b: and after the second electronic equipment or the third electronic equipment sends the second signal through the second pin, sending a second message.
And determining the communication frequency of the second message as the frequency of the second signal through the second signal.
Step 1002 b: and the first electronic equipment receives a second message after receiving the second signal through the second pin.
And determining the communication frequency of the second message as the frequency of the second signal through the second signal.
By the method, the first electronic device can send the first signal, and after the second electronic device and the third electronic device receive the first signal, the first electronic device determines to perform communication at the first frequency of the first signal.
Problem 3, consider that in the prior art, only peer-to-peer communication between a first electronic device and a second electronic device can be supported on a D-line, communication between multiple devices cannot be supported, and a scenario that the first electronic device, the second electronic device, and a third electronic device need to communicate when the third electronic device is still present in a system cannot be adapted.
Based on the above problem, in the embodiment of the present application, different identifiers of electronic devices may be defined, and when the first message or the second message is sent, the identifier of the corresponding electronic device may be carried, so as to implement data transmission between multiple devices.
It is considered that in this embodiment, taking the first electronic device as an example, the first message is transmitted through the first data signal line, and the second message is received through the second data signal line. Therefore, only the first message and the second message need to carry the identification of the receiving party to distinguish the plurality of electronic devices of the possible receiving party.
In some embodiments, the identity of the different electronic devices may be represented by role-coded information. The role coding information can be carried by physical header information.
In one possible implementation, the first message includes: a first identifier; the first identification is used for indicating a receiver of the first message; the second message includes: a second identifier; the second identification is used for indicating a receiver of the second message; the receiver of the first message is any one of the following: a second electronic device, a third electronic device.
For example, a Role Code (Role Code) may consist of 4 bits of data, with the upper 2 bits identifying the Role of the recipient of the data, or the lower 2 bits identifying the Role of the recipient of the data.
For example, the high 2 bits identify the role of data receiver, in the data packet, the first byte is the header field,
the data packet header field may carry an identification of the data recipient. For example, as shown in table 4.
TABLE 4
Figure BDA0002748559160000411
In the case of the problem 4, it is considered that in the related art, the communication mode is performed in accordance with a mode in which the master device answers the slave device (the second electronic device or the third electronic device), and the slave device (the second electronic device or the third electronic device) can only respond to the master device and cannot perform active communication. That is, only after the first electronic device sends a message to the second electronic device, the second electronic device feeds back a corresponding message, and in a scenario where the second electronic device needs to actively report related information, such as an abnormality, the first electronic device may not be notified in time, which may cause a problem that the charging of the first electronic device is abnormal, or even a corresponding device of the first electronic device is damaged.
Based on problem 4, in connection with the embodiment in fig. 9a, the slave device is allowed to actively send a message. Data transmission is realized among a plurality of electronic devices through D + or D-, and the data transmission is used for sending commands among the devices, reporting and acquiring information. Consider the problem of a plurality of electronic devices sharing a first data signal line to transmit messages. The data transmission between the third electronic device and the first electronic device may be performed first, and after it is determined that the data transmission between the third electronic device and the first electronic device is completed, only the data transmission between the first electronic device and the second electronic device is started. This is illustrated below in connection with fig. 11 a.
Step 1101: after the handshake detection is finished, the first electronic equipment sends a detection instruction of the third electronic equipment;
step 1102: the counter is reset.
Step 1103: the first electronic device determines whether a third electronic device exists, if not, step 1108 is executed, and if so, step 1104 is executed;
step 1104: the first electronic device and the third electronic device start communication according to a set flow, and the second electronic device prohibits active communication initiation in the process.
Step 1105: the first electronic device determining whether communication between the first electronic device and the third electronic device is completed; if yes, go to step 1108; if not, go to step 1106;
step 1106: the first electronic device determines whether the communication between the first electronic device and the third electronic device exceeds a preset time, if yes, step 1107 is executed; if not, go to step 1104;
step 1106: judging whether the counter is larger than a preset threshold (for example, the preset threshold is 3); if yes, go to step 1108; if not, go to step 1109;
step 1108: the first electronic device initiates communication with the second electronic device.
Step 1109: the count of the counter is incremented.
By means of the counter, it can be guaranteed that communication between the first electronic device and the third electronic device is completed within the number of times of the preset threshold value and within the preset time, and then communication between the first electronic device and the second electronic device is conducted.
Considering that when the first data signal line or the second data signal line is abnormal, for example, when a large current is charged, the first electronic device is disconnected from the second electronic device, at this time, the large current may cause irreversible damage to the first electronic device capturing the second electronic device, at this time, the second electronic device may detect the pulling-out action of the third electronic device within a microsecond-level time, quickly close the output path of the energy, and stop the charging mode of the quick charging. Accordingly, the data transmission mode also needs to be restored to the data transmission mode in the normal charging mode. In the embodiment of the application, the reset signal can be sent by the first electronic device, so that the reset of the communication modes of the second electronic device and the third electronic device is realized.
As shown in fig. 11b, a timing diagram of the second reset signal transmitted at the first electronic device. The first electronic device can send a second reset signal through the first pin; the second reset signal is used for indicating a receiver of the second reset signal to reset; the pulse width of the second reset signal has a relationship with the receiver.
In some embodiments, the second reset signal may be a reset pulse; the reset pulse may be a pulse signal that drives the first data signal line to a low level for a preset time. For example, the preset time corresponding to the second electronic device may be 1 ms. The preset time may be a time length much longer than the data signal or the time window occupied by the present application.
And after the second electronic equipment receives the second reset signal, the second electronic equipment restores the state of the second electronic equipment to the default state according to the reset protocol. And after the third electronic equipment receives the second reset signal, the third electronic equipment restores the state of the third electronic equipment to the default state according to the reset protocol.
When the power supply equipment executes the reset command, if the previous command sequence is in operation, the reset command is issued only after the previous command sequence is finished. The pulse width of the second reset signal may be different for the second electronic device or the third electronic device, for example, the time length of the second reset signal of the third electronic device may be 1ms, and the time length of the second reset signal of the second electronic device may be 2 ms. In another possible implementation manner, the second reset signal may also be determined according to the current communication frequency, for example, the time length of the second reset signal of the first electronic device may be N cycles (the cycle T corresponding to the communication frequency f between the first electronic device and the second electronic device) and is not limited herein.
In order to improve the data transmission quality on the communication link, in the embodiment of the present application, the data packet may further include communication data error check. The method may refer to the data error checking method in the above embodiments, and details are not repeated herein.
As shown in fig. 12, based on the same concept, an electronic device 1200 according to an embodiment of the present application as shown in fig. 12 includes: a processing module 1201 and a transceiver module 1202.
In one possible embodiment, the electronic device 1200 may be a first electronic device. The electronic device 1200 is connected to the second electronic device through a third electronic device including a first data signal line and a second data signal line.
The processing module 1201 is configured to detect, through the transceiver module 1201, a connection with the second electronic device; the processing module 1201 is configured to send a first message through a first pin of the transceiver module 1201; the first pin is connected with a first data signal line; receiving a second message through a second pin of the transceiving module 1201; the second pin is connected with a second data signal line; the first message and the second message are used for setting charging of the first electronic device.
In a possible implementation manner, the first pin is a pin connected to a negative signal data line; the second pin is connected with the positive signal data line.
In a possible implementation manner, the first pin is a pin connected to a positive signal data line; the second pin is connected with the negative signal data line.
In a possible implementation manner, the processing module 1201 is configured to detect, through the first pin or the second pin, a connection with a second electronic device, and determine that the second electronic device is a DCP device with a dedicated charging interface; sending a first pulse signal through the first pin of the transceiver module 1201; and detecting an electric signal of the second electronic equipment through the second pin to confirm that the second electronic equipment supports a quick charging mode.
In a possible implementation manner, the second pin is a pin connected to a positive signal data line, and the electrical signal is a second response signal;
in a possible implementation manner, the second pin is a pin connected to a negative signal data line, and the electrical signal is a first response signal.
In one possible implementation, the first message includes: a first identifier; the first identification is used for indicating a receiver of the first message; the second message includes: a second identifier; the second identification is used for indicating a receiver of the second message.
In a possible implementation manner, the receiver of the first message is a chip of the third electronic device, and the receiver of the second message is the first electronic device;
in a possible implementation manner, the receiver of the first message is the second electronic device; and the receiver of the second message is the first electronic equipment.
In a possible implementation manner, the processing module 1201 is configured to send a first signal through a first pin of the transceiver module 1201 before sending the first message through the first pin; the frequency of the first signal is a first frequency; the first signal is used for indicating that the frequency of the first message is the first frequency.
In a possible implementation manner, the processing module 1201 is configured to receive a second signal through the second pin of the transceiver module 1201; the frequency of the second signal is a second frequency; the second signal is used for indicating that the frequency of the second message is the second frequency.
In one possible implementation, the first message includes at least one of: at least one data frame, a cyclic redundancy check field; wherein one data frame includes: a start field, an end field, a header field, and a data field.
In one possible implementation, the header field includes the first identifier.
In a possible implementation manner, the processing module 1201 is configured to send a start signal before sending the first message through the first pin of the transceiver module 1201; the starting signal is a low level signal; the processing module 1201 is configured to send a termination signal after sending the first message through the first pin of the transceiver module 1201; the end signal is a high level signal.
In a possible implementation manner, the processing module 1201 is configured to receive a start signal before receiving the second message through the second pin of the transceiver module 1201; the starting signal is a low level signal; the processing module 1201 is configured to receive a second message through a second pin of the transceiver module 1201, and then receive an end signal; the end signal is a high level signal.
In a possible implementation manner, the processing module 1201 is configured to send a first reset signal through a first pin of the transceiver module 1201; the first reset signal is used for indicating a receiver of the first reset signal to reset; the pulse width of the first reset signal has a correlation with a receiver.
In another possible embodiment, the processing module 1201 is configured to detect, through the transceiver module 1201, a connection with the second electronic device; sending a first message through a first pin of the transceiving module 1201; or, receiving a second message through the first pin; wherein the first message and the second message are messages encoded by Manchester; the first pin is connected with a first data signal line; the first message and the second message are used for setting charging of the first electronic device.
In a possible implementation manner, the first pin is a pin connected to a negative signal data line; or, the first pin is a pin connected with a positive signal data line.
In a possible implementation manner, the processing module 1201 is configured to detect, through the first pin and the second pin of the transceiver module 1201, a connection with a second electronic device, and determine that the second electronic device is a DCP device with a dedicated charging interface; the processing module 1201 is configured to send a first pulse signal through the first pin of the transceiver module 1201; the processing module 1201 is configured to detect an electrical signal of the second electronic device through the second pin of the transceiver module 1201, and determine whether to charge the battery of the first electronic device through a fast charging mode.
In a possible implementation manner, the second pin is a pin connected to a positive signal data line, and the electrical signal is a second pulse signal;
in a possible implementation manner, the second pin is a pin connected to a negative signal data line, and the electrical signal is a low level signal.
In one possible implementation, the first message includes: a third identifier; the third identification is used for indicating a receiver of the first message and a sender of the first message; the second message includes: a fourth identification; the fourth identifier is used for indicating a receiver of the second message and a sender of the second message; the receiver of the first message or the sender of the second message is any one of: the second electronic device, the third electronic device.
In a possible implementation manner, the processing module 1201 is configured to send a first signal through the first pin of the transceiver module 1201; the frequency of the first signal is a first frequency; the first signal is used for negotiating that the communication frequency is the first frequency.
In a possible implementation manner, the processing module 1201 is configured to receive a second signal through the first pin of the transceiver module 1201; the frequency of the second signal is a first frequency; the second signal is used to determine that the communication frequency is the first frequency.
In one possible implementation, the frequency of the first message and the second message is the first frequency.
In one possible implementation, the first message includes at least one data frame; the data frame is any one of: header information, data information, control information, cyclic redundancy check; wherein one data frame includes: a start field, a data field, and an end field.
In a possible implementation manner, the processing module 1201 is configured to, after sending a first message through a first pin of the transceiver module 1201, further configured to, within a first time window, use the first data signal line for the first electronic device to receive the message.
In a possible implementation manner, the processing module 1201 is configured to determine, after receiving a second message through the first pin of the transceiver module 1201, that the first data signal line is used for the first electronic device to receive the message in a second time window.
In a possible implementation manner, the processing module 1201 is configured to, after receiving a second message through the first pin of the transceiver module 1201, determine that the current time exceeds the second time window, where the first data signal line is used for the first electronic device to send a message.
In a possible implementation manner, the processing module 1201 is configured to send a first reset signal through a first pin of the transceiver module 1201; the first reset signal is used for indicating a receiver of the first reset signal to reset; the pulse width of the first reset signal has a correlation with a receiver.
In one possible embodiment, electronic device 1200 may be a second electronic device. The second electronic device is connected with the first electronic device through a third electronic device, and the third electronic device comprises a first data signal line and a second data signal line.
In some embodiments, the processing module 1201 is configured to determine, through the transceiving module 1201, a connection with the first electronic device; the processing module 1201 is configured to receive a first message through a first pin of the transceiver module 1201; the first pin is connected with a first data signal line; the processing module 1201 is configured to send a second message through a second pin of the transceiver module 1201; the second pin is connected with a second data signal line; the first message and the second message are used for setting charging of the first electronic device.
In a possible implementation manner, the first pin is a pin connected to a negative signal data line; the second pin is connected with the positive signal data line.
In a possible implementation manner, the first pin is a pin connected to a positive signal data line; the second pin is connected with the negative signal data line.
In a possible implementation manner, the processing module 1201 is configured to receive, through a first pin or a second pin of the transceiver module 1201, a detection from the first electronic device, where the detection is used by the first electronic device to determine that the second electronic device is a DCP device with a dedicated charging interface;
the processing module 1201 is configured to receive a first pulse signal from the first electronic device through a first pin of the transceiver module 1201; the processing module 1201 is configured to send an electrical signal to the first electronic device through the second pin of the transceiver module 1201, and confirm that the battery of the first electronic device is charged through the fast charging mode.
In a possible implementation manner, the second pin is a pin connected to a positive signal data line, and the electrical signal is a second pulse signal; the second pin is connected with the negative signal data line, and the electric signal is a low level signal.
In one possible implementation, the first message includes: a first identifier; the first identification is used for indicating a receiver of the first message; the second message includes: a second identifier; the second identification is used for indicating a receiver of the second message.
In a possible implementation manner, the receiver of the first message is the second electronic device; and the receiver of the second message is the first electronic equipment.
In a possible implementation manner, when the receiver of the first message is the chip of the third electronic device, the second message is not sent to the first electronic device.
In a possible implementation manner, the processing module 1201 is configured to send a second signal through a second pin of the transceiver module 1201 before sending the second message through the second pin; the frequency of the second signal is a second frequency; the second signal is used for indicating that the frequency of the second message is the second frequency.
In a possible implementation manner, the processing module 1201 is configured to receive a first signal through the first pin of the transceiver module 1201; the frequency of the first signal is a first frequency; the first signal is used for indicating that the frequency of the first message is the first frequency.
In one possible implementation, the first message includes at least one data frame; the data frame is any one of: header information, data information, control information, cyclic redundancy check; wherein one data frame includes: a start field, a data field, and an end field.
In a possible implementation manner, the processing module 1201 is configured to send a start signal before sending the second message through the second pin of the transceiver module 1201; the starting signal is a low level signal; the processing module 1201 is configured to send a second message through the second pin of the transceiver module 1201, and then send an end signal; the end signal is a high level signal.
In a possible implementation manner, the processing module 1201 is configured to receive a start signal before receiving the first message through the first pin of the transceiving module 1201; the starting signal is a low level signal; the processing module 1201 is configured to receive a termination signal after receiving the first message through the first pin of the transceiver module 1201; the end signal is a high level signal.
In a possible implementation manner, the processing module 1201 is configured to receive a first reset signal through the first pin of the transceiver module 1201; the pulse width of the first reset signal is related to the second electronic equipment;
the processing module 1201 is configured to reset the second electronic device according to the first reset signal.
In a possible implementation manner, the processing module 1201 is configured to receive a second reset signal through the first pin of the transceiver module 1201; the pulse width of the second reset signal is related to the third electronic device; the processing module 1201 is further configured to ignore the second reset signal.
In other embodiments, the processing module 1201 is configured to determine, through the transceiving module 1201, a connection with the first electronic device; sending a second message through a first pin of the transceiving module 1201; or, receiving a first message through a first pin of the transceiver module 1201; the first pin is connected with a first data signal line; wherein the first message and the second message are messages encoded by Manchester; the first message and the second message are used for setting charging of the first electronic device.
In a possible implementation manner, the first pin is a pin connected to a negative signal data line; or, the first pin is a pin connected with a positive signal data line.
In a possible implementation manner, the processing module 1201 is configured to receive, through a first pin and a second pin of the transceiver module 1201, a detection from the first electronic device, where the detection is used by the first electronic device to determine that the second electronic device is a DCP device with a dedicated charging interface; receiving a first pulse signal from the first electronic device through the first pin; and sending an electric signal to the first electronic equipment through the second pin to confirm whether to charge the battery of the first electronic equipment in a quick charging mode.
In a possible implementation manner, the second pin is a pin connected to a positive signal data line, and the electrical signal is a second pulse signal;
the second pin is connected with the negative signal data line, and the electric signal is a low level signal.
In one possible implementation, the first message includes: a third identifier; the third identification is used for indicating a receiver of the first message and a sender of the first message;
the second message includes: a fourth identification; the fourth identifier is used for indicating a receiver of the second message and a sender of the second message; the sender of the first message or the receiver of the second message is any one of: the first electronic device, the third electronic device.
In a possible implementation manner, the processing module 1201 is configured to receive a first signal through a first pin of the transceiver module 1201; the frequency of the first signal is a first frequency; the first signal is used for negotiating that the communication frequency is the first frequency.
In a possible implementation manner, the processing module 1201 is configured to send a second signal through a first pin of the transceiver module 1201; the frequency of the second signal is a first frequency; the first signal is used to determine that the communication frequency is the first frequency.
In one possible implementation, the frequency of the first message and the second message is the first frequency.
In one possible implementation, the first message includes at least one of: at least one data frame, a cyclic redundancy check field; wherein one data frame includes: a start field, an end field, a header field, and a data field.
In a possible implementation manner, the processing module 1201 is configured to, after receiving a first message through a first pin of the transceiver module 1201, confirm that the first data signal line is used by the second electronic device or the third electronic device to send a message within a first time window.
In a possible implementation manner, the processing module 1201 is configured to, after sending the second message through the first pin of the transceiving module 1201, confirm that the first data signal line is used by the second electronic device or the third electronic device to send the message within a second time window.
In a possible implementation manner, the processing module 1201 is configured to determine that the first data signal line is used for the second electronic device or the third electronic device to receive a message after the current time exceeds the second time window after the first pin of the transceiving module 1201 sends a second message.
In a possible implementation manner, the processing module 1201 is configured to receive a first reset signal through a first pin of the transceiver module 1201; the pulse width of the first reset signal is related to the second electronic equipment; and resetting the charging mode according to the first reset signal.
In a possible implementation manner, the processing module 1201 is configured to receive a second reset signal through a first pin of the transceiver module 1201; the pulse width of the second reset signal is related to the third electronic device; ignoring the second reset signal.
In one possible embodiment, electronic device 1200 may be a third electronic device. The third electronic device is used for connecting the second electronic device and the first electronic device, and the third electronic device comprises a first data signal line and a second data signal line.
A processing module 1201, configured to receive a first message through a first pin of the transceiver module 1201; the first pin is connected with a first data signal line; the processing module 1201 is configured to send a second message through a second pin of the transceiver module 1201; the second pin is connected with a second data signal line; the first message and the second message are used for setting charging of the first electronic device.
In a possible implementation manner, the first pin is a pin connected to a negative signal data line; the second pin is connected with the positive signal data line.
In a possible implementation manner, the first pin is a pin connected to a positive signal data line; the second pin is connected with the negative signal data line.
In one possible implementation, the first message includes: a first identifier; the first identification is used for indicating a receiver of the first message; the second message includes: a second identifier; the second identification is used for indicating a receiver of the second message.
In a possible implementation manner, the receiver of the first message is the third electronic device; and the receiver of the second message is the first electronic equipment.
In a possible implementation manner, when the receiver of the first message is the second electronic device, the processing module 1201 is configured to determine not to send the second message to the first electronic device.
In a possible implementation manner, the processing module 1201 is configured to receive a first signal through a first pin of the transceiver module 1201; the frequency of the first signal is a first frequency; the first signal is used for indicating that the frequency of the first message is the first frequency;
the processing module 1201 is configured to send a first signal through a second pin of the transceiver module 1201 before sending a second message through the second pin; the frequency of the first signal is a second frequency; the first signal is used for indicating that the frequency of the first message is the second frequency.
In one possible implementation, the first message includes at least one data frame; the data frame is any one of: header information, data information, control information, cyclic redundancy check; wherein one data frame includes: a start field, a data field, and an end field.
In a possible implementation manner, the processing module 1201 is configured to send a start signal before sending the second message through the second pin of the transceiver module 1201; the starting signal is a low level signal; the processing module 1201 is configured to send a second message through the second pin of the transceiver module 1201, and then send an end signal; the end signal is a high level signal.
In a possible implementation manner, the processing module 1201 is configured to receive a start signal before receiving the first message through the first pin of the transceiver module 1201; the starting signal is a low level signal; the processing module 1201 is configured to receive a termination signal after receiving the first message through the first pin of the transceiver module 1201; the end signal is a high level signal.
In a possible implementation manner, the processing module 1201 is configured to receive a second reset signal through a first pin of the transceiver module 1201; the pulse width of the second reset signal is related to the third electronic device; and resetting according to the second reset signal.
In a possible implementation manner, the processing module 1201 is configured to receive a first reset signal through the first pin of the transceiver module 1201; the pulse width of the first reset signal is related to the second electronic equipment; a processing module 1201 configured to ignore the first reset signal.
In other embodiments, the processing module 1201 is configured to send a second message through the first pin of the transceiver module 1201; or, receiving a first message through a first pin of the transceiver module 1201; the first pin is connected with a first data signal line; wherein the first message and the second message are messages encoded by Manchester; the first message and the second message are used for setting charging of the first electronic device.
In a possible implementation manner, the first pin is a pin connected to a negative signal data line; or, the first pin is a pin connected with a positive signal data line.
In one possible implementation, the first message includes: a third identifier; the third identification is used for indicating a receiver of the first message and a sender of the first message;
the second message includes: a fourth identification; the fourth identifier is used for indicating a receiver of the second message and a sender of the second message; the sender of the first message or the receiver of the second message is any one of: the first electronic device, the third electronic device.
In one possible implementation, the frequency of the first message and the second message is the first frequency.
In one possible implementation, the first message includes at least one of: at least one data frame, a cyclic redundancy check field; wherein one data frame includes: a start field, an end field, a header field, and a data field.
In a possible implementation manner, the processing module 1201 is configured to, after receiving a first message through a first pin of the transceiving module 1201, further determine that the first data signal line is used by the second electronic device or the third electronic device to send a message within a first time window.
In a possible implementation manner, the processing module 1201 is configured to, after sending a second message through the first pin of the transceiving module 1201, further determine that the first data signal line is used by the second electronic device or the third electronic device to send a message within a second time window.
In a possible implementation manner, the processing module 1201 is configured to determine that the first data signal line is used for the third electronic device or the second electronic device to receive a message after the current time exceeds the second time window after the first pin of the transceiving module 1201 sends a second message.
In a possible implementation manner, the processing module 1201 is configured to receive a first reset signal through a first pin of the transceiver module 1201; the pulse width of the first reset signal is related to the third electronic device; and resetting the charging mode according to the first reset signal.
In a possible implementation manner, the processing module 1201 is configured to receive, through the first pin of the transceiver module 1201, a second reset signal; the pulse width of the second reset signal is related to the second electronic device; ignoring the second reset signal.
Based on the same inventive concept, as shown in fig. 13, a schematic structural diagram of an electronic device provided in the present application is shown.
In one possible embodiment, the electronic device in fig. 13 may be a first electronic device. The first electronic device may include: a processor 1310 and a communication interface 1330. Processor 1310 may be a baseband processor, which may include one or more Central Processing Units (CPUs). The first electronic device may also be a component having the functions of the first electronic device in the embodiment of the present application, for example, when the first electronic device is a system on chip, the communication interface 1330 may be an input/output interface of the system on chip (for example, a baseband chip), and the processor may be a processor of the system on chip and may include one or more central processing units. Optionally, a memory 1320 may also be included. Wherein the memory 1320 stores computer instructions or programs and the processor 1310 may execute the computer instructions or programs stored in the memory 1320. When the computer instructions or programs stored in the memory 1320 are executed, the processor 1310 is configured to perform operations of the first electronic device other than transceiving operations in the embodiments of the present application, and the communication interface 1330 is configured to perform transceiving operations of the first electronic device in the embodiments of the present application. Alternatively, the first electronic device may not include the memory 1320, for example, the memory is located outside the first electronic device, when the computer instructions or programs stored in the external memory are executed, the processor 1310 is configured to perform other operations of the first electronic device in the above embodiments except for the transceiving operation, and the communication interface 1330 is configured to perform the transceiving operation of the first electronic device in the embodiments of the present application.
In one possible embodiment, the electronic device in fig. 13 may be a second electronic device. The second electronic device may include: a processor 1310 and a communication interface 1330. Processor 1310 may be a baseband processor, which may include one or more Central Processing Units (CPUs). The second electronic device may also be a component having the functions of the second electronic device in the embodiment of the present application, for example, when the second electronic device is a system on a chip, the communication interface 1330 may be an input/output interface of the system on a chip (for example, a baseband chip), and the processor may be a processor of the system on a chip and may include one or more central processing units. Optionally, a memory 1320 may also be included. Wherein the memory 1320 stores computer instructions or programs and the processor 1310 may execute the computer instructions or programs stored in the memory 1320. When the computer instructions or programs stored in the memory 1320 are executed, the processor 1310 is configured to perform operations of the second electronic device other than transceiving operations in the embodiments of the present application, and the communication interface 1330 is configured to perform transceiving operations of the second electronic device in the embodiments of the present application. Alternatively, the second electronic device may not include the memory 1320, for example, the memory is located outside the second electronic device, when the computer instructions or the program stored in the external memory are executed, the processor 1310 is configured to perform the operations of the second electronic device other than the transceiving operations in the above embodiments, and the communication interface 1330 is configured to perform the transceiving operations of the second electronic device in the embodiments of the present application.
In one possible embodiment, the electronic device in fig. 13 may be a third electronic device. The third electronic device may include: a processor 1310 and a communication interface 1330. Processor 1310 may be a baseband processor, which may include one or more Central Processing Units (CPUs). The third electronic device may also be a component having the functions of the third electronic device in the embodiment of the present application, for example, when the third electronic device is a system on a chip, the communication interface 1330 may be an input/output interface of the system on a chip (for example, a baseband chip), and the processor may be a processor of the system on a chip and may include one or more central processing units. Optionally, a memory 1320 may also be included. Wherein the memory 1320 stores computer instructions or programs and the processor 1310 may execute the computer instructions or programs stored in the memory 1320. When the computer instructions or programs stored in the memory 1320 are executed, the processor 1310 is configured to perform operations of the third electronic device in the embodiment of the present application other than transceiving operations, and the communication interface 1330 is configured to perform transceiving operations of the third electronic device in the embodiment of the present application. Alternatively, the third electronic device may not include the memory 1320, for example, the memory is located outside the third electronic device, when the computer instructions or the program stored in the external memory are executed, the processor 1310 is configured to perform the operations of the third electronic device other than the transceiving operations in the above embodiments, and the communication interface 1330 is configured to perform the transceiving operations of the third electronic device in the embodiments of the present application.
Embodiments of the present application further provide a computer storage medium, which is used to store a computer program, and when the computer program runs on a computer, the computer is caused to execute the method described in any one of the possible embodiments in fig. 4a to fig. 11 a.
Embodiments of the present application also provide a computer program product including instructions for storing a computer program, which, when executed on a computer, causes the computer to execute the method described in any one of the possible embodiments in fig. 4 a-11 a.
It should be understood that the processor mentioned in the embodiments of the present application may be a CPU, and may also be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
It will also be appreciated that the memory referred to in the embodiments of the application may be either volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The non-volatile memory may be a read-only memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an electrically Erasable EPROM (EEPROM), or a flash memory. Volatile memory can be Random Access Memory (RAM), which acts as external cache memory. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), double data rate SDRAM, enhanced SDRAM, SLDRAM, Synchronous Link DRAM (SLDRAM), and direct rambus RAM (DR RAM).
It should be noted that when the processor is a general-purpose processor, a DSP, an ASIC, an FPGA or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component, the memory (memory module) is integrated in the processor.
It should be noted that the memory described herein is intended to comprise, without being limited to, these and any other suitable types of memory.
It should be understood that, in the various embodiments of the present application, the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above description is only for the specific implementation of the present application, but the scope of the embodiments of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the embodiments of the present application, and all the changes or substitutions should be covered by the scope of the embodiments of the present application. Therefore, the protection scope of the embodiments of the present application shall be subject to the protection scope of the claims.

Claims (42)

1. A data transmission method is applied to first electronic equipment, the first electronic equipment is connected with second electronic equipment through third electronic equipment, the third electronic equipment comprises a first data signal line and a second data signal line, and the method comprises the following steps:
detecting a connection with the second electronic device;
sending a first message through a first pin; the first pin is connected with a first data signal line;
receiving a second message through a second pin; the second pin is connected with a second data signal line; the first message and the second message are used for setting charging of the first electronic device.
2. The method of claim 1, wherein the first pin is a pin connected to a negative signal data line; the second pin is connected with the positive signal data line; or,
the first pin is connected with a positive signal data line; the second pin is connected with the negative signal data line.
3. The method according to any one of claims 1-2, further comprising:
detecting connection with second electronic equipment through the first pin or the second pin, and determining that the second electronic equipment is a special charging interface DCP (digital data processing) equipment;
sending a first pulse signal through the first pin;
and detecting an electric signal of the second electronic equipment through the second pin to confirm that the second electronic equipment supports a quick charging mode.
4. The method of claim 3, wherein the second pin is a pin connected to a positive signal data line, and the electrical signal is a second response signal; or,
the second pin is connected with the negative signal data line, and the electric signal is a first response signal.
5. The method according to any one of claims 1 to 4,
the first message includes: a first identifier; the first identification is used for indicating a receiver of the first message;
the second message includes: a second identifier; the second identification is used for indicating a receiver of the second message.
6. The method of claim 5,
the receiver of the first message is a chip of the third electronic equipment, and the receiver of the second message is the first electronic equipment; or,
the receiver of the first message is the second electronic equipment; and the receiver of the second message is the first electronic equipment.
7. The method according to any of claims 1-6, wherein prior to sending the first message over the first pin, further comprising:
sending a first signal through the first pin; the frequency of the first signal is a first frequency; the first signal is used for indicating that the frequency of the first message is the first frequency.
8. The method of any of claims 1-7, wherein receiving the second message over the second pin comprises:
receiving a second signal through the second pin; the frequency of the second signal is a second frequency; the second signal is used for indicating that the frequency of the second message is the second frequency.
9. The method according to any of claims 1-8, wherein the first message comprises at least one of: at least one data frame, a cyclic redundancy check field; wherein one data frame includes: a start field, an end field, a header field, and a data field.
10. The method according to any of claims 1-9, wherein prior to sending the first message over the first pin, further comprising:
sending a starting signal; the starting signal is a low level signal;
after the first message is sent through the first pin, the method further includes:
sending an end signal; the end signal is a high level signal.
11. The method according to any of claims 1-10, wherein prior to receiving the second message over the second pin, further comprising:
receiving a start signal; the starting signal is a low level signal;
after receiving the second message through the second pin, the method further includes:
receiving an end signal; the end signal is a high level signal.
12. The method according to any one of claims 1-11, further comprising:
sending a first reset signal through the first pin; the first reset signal is used for indicating a receiver of the first reset signal to reset; the pulse width of the first reset signal has a correlation with a receiver.
13. A data transmission method is applied to second electronic equipment, the second electronic equipment is connected with first electronic equipment through third electronic equipment, the third electronic equipment comprises a first data signal line and a second data signal line, and the method comprises the following steps:
determining a connection with the first electronic device;
receiving a first message through a first pin; the first pin is connected with a first data signal line;
sending a second message through a second pin; the second pin is connected with a second data signal line; the first message and the second message are used for setting charging of the first electronic device.
14. The method of claim 13, wherein the first pin is a pin connected to a negative signal data line; the second pin is connected with the positive signal data line; or,
the first pin is connected with a positive signal data line; the second pin is connected with the negative signal data line.
15. The method according to any one of claims 13-14, further comprising:
receiving, by the first pin or the second pin, a detection from the first electronic device, the detection being used by the first electronic device to determine that the second electronic device is a proprietary charging interface (DCP) device;
receiving a first pulse signal from the first electronic device through the first pin;
and sending an electric signal to the first electronic device through the second pin to confirm that the battery of the first electronic device is charged in a quick charging mode.
16. The method of claim 15, wherein the second pin is a pin connected to a positive signal data line, and the electrical signal is a second pulse signal;
the second pin is connected with the negative signal data line, and the electric signal is a low level signal.
17. The method according to any one of claims 13 to 16,
the first message includes: a first identifier; the first identification is used for indicating a receiver of the first message;
the second message includes: a second identifier; the second identification is used for indicating a receiver of the second message.
18. The method of claim 17,
the receiver of the first message is the second electronic equipment; and the receiver of the second message is the first electronic equipment.
19. The method of claim 17, further comprising:
and when the receiver of the first message is the chip of the third electronic equipment, the second message is not sent to the first electronic equipment.
20. The method according to any of claims 13-19, wherein prior to sending the second message over the second pin, further comprising:
sending a second signal through the second pin; the frequency of the second signal is a second frequency; the second signal is used for indicating that the frequency of the second message is the second frequency.
21. The method of any of claims 13-20, wherein receiving the first message over the first pin comprises:
receiving a first signal through the first pin; the frequency of the first signal is a first frequency; the first signal is used for indicating that the frequency of the first message is the first frequency.
22. The method of any of claims 13-21, wherein the first message comprises at least one data frame; the data frame is any one of: header information, data information, control information, cyclic redundancy check; wherein one data frame includes: a start field, a data field, and an end field.
23. The method according to any of claims 13-22, wherein prior to sending the second message over the second pin, further comprising:
sending a starting signal; the starting signal is a low level signal;
after the sending the second message through the second pin, the method further includes:
sending an end signal; the end signal is a high level signal.
24. The method of any of claims 13-23, wherein prior to receiving the first message over the first pin, further comprising:
receiving a start signal; the starting signal is a low level signal;
after receiving the first message through the first pin, the method further includes:
receiving an end signal; the end signal is a high level signal.
25. The method according to any one of claims 13-23, further comprising:
receiving a first reset signal through the first pin; the pulse width of the first reset signal is related to the second electronic equipment;
and resetting the second electronic equipment according to the first reset signal.
26. The method according to any one of claims 13-23, further comprising:
receiving a second reset signal through the first pin; the pulse width of the second reset signal is related to the third electronic device;
ignoring the second reset signal.
27. A data transmission method is applied to a third electronic device, wherein the third electronic device is used for connecting a second electronic device and a first electronic device, and the third electronic device comprises a first data signal line and a second data signal line, and the method comprises the following steps:
receiving a first message through a first pin; the first pin is connected with a first data signal line;
sending a second message through a second pin; the second pin is connected with a second data signal line; the first message and the second message are used for setting charging of the first electronic device.
28. The method of claim 27, wherein the first pin is a pin connected to a negative signal data line; the second pin is connected with the positive signal data line; or,
the first pin is connected with a positive signal data line; the second pin is connected with the negative signal data line.
29. The method of any one of claims 27-28,
the first message includes: a first identifier; the first identification is used for indicating a receiver of the first message;
the second message includes: a second identifier; the second identification is used for indicating a receiver of the second message.
30. The method of claim 29,
the receiver of the first message is the third electronic device; and the receiver of the second message is the first electronic equipment.
31. The method of claim 30, further comprising:
and when the receiver of the first message is the second electronic equipment, the second message is not sent to the first electronic equipment.
32. The method of any of claims 27-31, wherein receiving the first message over the first pin comprises:
receiving a first signal through the first pin; the frequency of the first signal is a first frequency; the first signal is used for indicating that the frequency of the first message is the first frequency;
before the sending the second message through the second pin, the method further includes:
sending a first signal through the second pin; the frequency of the first signal is a second frequency; the first signal is used for indicating that the frequency of the first message is the second frequency.
33. The method of any of claims 27-32, wherein the first message comprises at least one data frame; the data frame is any one of: header information, data information, control information, cyclic redundancy check; wherein one data frame includes: a start field, a data field, and an end field.
34. The method of any of claims 27-33, wherein prior to sending the second message over the second pin, further comprising:
sending a starting signal; the starting signal is a low level signal;
after the sending the second message through the second pin, the method further includes:
sending an end signal; the end signal is a high level signal.
35. The method of any of claims 27-33, wherein prior to receiving the first message over the first pin, further comprising:
receiving a start signal; the starting signal is a low level signal;
after receiving the first message through the first pin, the method further includes:
receiving an end signal; the end signal is a high level signal.
36. The method according to any one of claims 27-35, further comprising:
receiving a second reset signal through the first pin; the pulse width of the second reset signal is related to the third electronic device;
and resetting according to the second reset signal.
37. The method according to any one of claims 27-36, further comprising:
receiving a first reset signal through the first pin; the pulse width of the first reset signal is related to the second electronic equipment;
ignoring the first reset signal.
38. An electronic device, wherein the electronic device comprises memory and one or more processors; wherein the memory is to store computer program code comprising computer instructions; the computer instructions, when executed by the processor, cause the electronic device to perform the method of any of claims 1-12.
39. An electronic device, wherein the electronic device comprises memory and one or more processors; wherein the memory is to store computer program code comprising computer instructions; the computer instructions, when executed by the processor, cause the electronic device to perform the method of any of claims 13 to 25.
40. An electronic device, wherein the electronic device comprises memory and one or more processors; wherein the memory is to store computer program code comprising computer instructions; the computer instructions, when executed by the processor, cause the electronic device to perform the method of any of claims 26-37.
41. A data transmission system comprising a first electronic device as claimed in any one of claims 1 to 12, a second electronic device as claimed in any one of claims 13 to 25 and a third electronic device as claimed in any one of claims 26 to 37.
42. A computer readable storage medium, characterized in that the computer readable storage medium comprises program instructions which, when run on an electronic device, cause the electronic device to perform the method of any of claims 1 to 12, or cause the electronic device to perform the method of any of claims 13 to 25, or cause the electronic device to perform the method of any of claims 26 to 37.
CN202011175402.7A 2020-07-15 2020-10-28 Data transmission method and device Active CN113949116B (en)

Priority Applications (8)

Application Number Priority Date Filing Date Title
EP21842808.4A EP4181341A4 (en) 2020-07-15 2021-07-15 Data transmission method employing charging cable, and electronic devices
CN202210012459.8A CN114297127B (en) 2020-07-15 2021-07-15 Data transmission method based on charging cable and electronic equipment
CN202180003825.7A CN114631244A (en) 2020-07-15 2021-07-15 Data transmission method based on charging cable and electronic equipment
PCT/CN2021/106599 WO2022012644A1 (en) 2020-07-15 2021-07-15 Data transmission method employing charging cable, and electronic devices
CN202211602263.0A CN115864582A (en) 2020-07-15 2021-07-15 Data transmission method based on charging cable and electronic equipment
US18/014,529 US20230261477A1 (en) 2020-07-15 2021-07-15 Charging cable-based data transmission method and electronic device
CN202211613029.8A CN115912567A (en) 2020-07-15 2021-07-15 Data transmission method based on charging cable and electronic equipment
CN202210012219.8A CN114297126B (en) 2020-07-15 2021-07-15 Data transmission method based on charging cable and electronic equipment

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2020106828942 2020-07-15
CN202010682894 2020-07-15

Publications (2)

Publication Number Publication Date
CN113949116A true CN113949116A (en) 2022-01-18
CN113949116B CN113949116B (en) 2024-05-10

Family

ID=79327237

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011175402.7A Active CN113949116B (en) 2020-07-15 2020-10-28 Data transmission method and device

Country Status (1)

Country Link
CN (1) CN113949116B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115562895A (en) * 2022-04-07 2023-01-03 荣耀终端有限公司 Method and device for recovering abnormality of electronic device
WO2024001105A1 (en) * 2022-06-27 2024-01-04 Oppo广东移动通信有限公司 Communication detection method and apparatus, device, system, and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104967200A (en) * 2015-08-05 2015-10-07 青岛海信移动通信技术股份有限公司 Quick-charging method and mobile terminal
CN107508354A (en) * 2017-09-07 2017-12-22 维沃移动通信有限公司 A kind of charging method and mobile terminal
CN111404219A (en) * 2014-08-05 2020-07-10 德州仪器公司 Method for fast USB charging, electronic device and charger device
CN114297127A (en) * 2020-07-15 2022-04-08 华为技术有限公司 Data transmission method based on charging cable and electronic equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111404219A (en) * 2014-08-05 2020-07-10 德州仪器公司 Method for fast USB charging, electronic device and charger device
CN104967200A (en) * 2015-08-05 2015-10-07 青岛海信移动通信技术股份有限公司 Quick-charging method and mobile terminal
CN107508354A (en) * 2017-09-07 2017-12-22 维沃移动通信有限公司 A kind of charging method and mobile terminal
CN114297127A (en) * 2020-07-15 2022-04-08 华为技术有限公司 Data transmission method based on charging cable and electronic equipment
CN114297127B (en) * 2020-07-15 2022-11-01 华为技术有限公司 Data transmission method based on charging cable and electronic equipment

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115562895A (en) * 2022-04-07 2023-01-03 荣耀终端有限公司 Method and device for recovering abnormality of electronic device
CN115562895B (en) * 2022-04-07 2023-10-20 荣耀终端有限公司 Abnormality recovery method and device for electronic equipment
WO2024001105A1 (en) * 2022-06-27 2024-01-04 Oppo广东移动通信有限公司 Communication detection method and apparatus, device, system, and storage medium

Also Published As

Publication number Publication date
CN113949116B (en) 2024-05-10

Similar Documents

Publication Publication Date Title
CN114297127B (en) Data transmission method based on charging cable and electronic equipment
US10671135B2 (en) Intelligent mobile power supply and method for USB data communication therewith
WO2022012644A1 (en) Data transmission method employing charging cable, and electronic devices
CN112789866B (en) Audio data transmission method and equipment applied to TWS earphone single-ear and double-ear switching
KR102215085B1 (en) Charging apparatus and operating method thereof
US10389153B2 (en) Charging control method and mobile terminal
WO2016179817A1 (en) Quick charging method, power adapter and mobile terminal
CN111601199A (en) Wireless earphone box and system
CN113949116B (en) Data transmission method and device
CN103685953A (en) Shooting device, mobile terminal and watch
CN113329381B (en) Method for establishing Bluetooth connection and electronic equipment
WO2024037134A1 (en) Communication method and related apparatus
EP4283826A1 (en) Charging circuit, charging control method and electronic device
WO2023185685A1 (en) Charging method, electronic device, computer-readable storage medium, and chip system
CN107124012B (en) Charging method, device, charger, terminal and system
WO2017049549A1 (en) Mobile terminal, power supply adapter, and upgrading method thereof
CN114490491A (en) Data transmission method and device based on charging cable
CN112018831A (en) Charging control method, charging control device and electronic equipment
WO2024148811A1 (en) Terminal device, and external device access detection system
CN216625389U (en) Wireless charging equipment
EP4050754B1 (en) Power supply system, and electronic device
CN113489079B (en) Terminal device and charging system
CN116088787B (en) Audio stream processing method and related device
CN117134009B (en) Charging method and electronic equipment
WO2024120297A1 (en) Electronic device and charging system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant