Method and device for solving UFCS bus conflict, electronic equipment and storage medium
By releasing and reacquisition of bus permissions in the target electronic device, the bus conflict problem between the charging device and the power supply device under the UFCS protocol is solved, and the smooth progress of the charging process and the stability of communication is achieved.
Patent Information
- Application Number
- CN202311169800.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-11
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2043-09-11
AI Technical Summary
When using the next generation of Fusion Fast Charging Protocol (UFCS), bus conflicts between charging devices and powered devices lead to communication failure.
By implementing the processing module and the sending module in the target electronic device, if a bus conflict is detected between the charging device and the power supply device, the bus permission is released, the bus permission is regained after the preset time is delayed, and the target operation command is sent.
Effectively coordinate the message retransmission mechanism of charging equipment and power supply equipment, resolve bus conflicts, avoid UFCS communication failure, and ensure the smooth progress of the charging process.
Smart Images

Figure CN119603096A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of charging, and in particular to a method, device, electronic device and storage medium for resolving UFCS bus conflicts. Background Art
[0002] The new generation of the Universal Fast Charging Specification (UFCS) uses D+ (data plus, DP, positive) and D- (data minus, DM, negative) data channels for communication. However, there is a problem of simultaneous data transmission on the D+ and D- data channels, causing bus conflicts and resulting in communication failures. Summary of the invention
[0003] The embodiments of the present application provide a method, device, electronic device and storage medium for resolving UFCS bus conflicts, which are used to orderly coordinate the message retransmission mechanism of the charging device and the power supply device when there is a bus conflict between the power supply device and the charging device using the UFCS protocol, resolve the bus conflict, and avoid UFCS communication failure.
[0004] The first aspect of the present application provides a method for resolving UFCS bus conflicts, which may include: when the power supply device externally connected to the charging device is a new generation of UFCS power supply device that uses the integrated fast charging protocol, if there is a bus conflict between the charging device and the power supply device, the target electronic device releases the bus authority, reacquires the bus authority after a preset delay, and sends a command for the target operation, and the target electronic device includes the charging device or the power supply device.
[0005] A second aspect of the present application provides a device for resolving UFCS bus conflicts, the device being applied to a target electronic device, and the device may include:
[0006] A processing module, for releasing the bus authority and reacquiring the bus authority after a preset delay if a bus conflict exists between the charging device and the power supply device when the power supply device connected to the charging device is a new generation UFCS power supply device;
[0007] The sending module is used to send a command for a target operation, where the target electronic device includes the charging device or the power supply device.
[0008] A third aspect of the present application provides an electronic device, which may include:
[0009] A memory storing executable program code;
[0010] a processor and a transceiver coupled to the memory;
[0011] The processor and the transceiver are used to correspondingly execute the method as described in the first aspect of the present application.
[0012] Another aspect of an embodiment of the present application provides a computer-readable storage medium, comprising instructions, which, when executed on a processor, enables the processor to execute the method described in the first aspect of the present application.
[0013] Yet another aspect of an embodiment of the present application discloses a computer program product. When the computer program product is run on a computer, the computer is enabled to execute the method described in the first aspect of the present application.
[0014] Another aspect of an embodiment of the present application discloses an application publishing platform, which is used to publish a computer program product. When the computer program product runs on a computer, the computer executes the method described in the first aspect of the present application.
[0015] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:
[0016] In an embodiment of the present application, when the power supply device connected to the charging device is a new generation of UFCS power supply device that uses the fast charging protocol, if there is a bus conflict between the charging device and the power supply device, the target electronic device releases the bus authority, reacquires the bus authority after a preset delay, and sends a target operation command, and the target electronic device includes the charging device or the power supply device. When there is a bus conflict between the power supply device and the charging device using the UFCS protocol, the message retransmission mechanism of the charging device and the power supply device can be coordinated in an orderly manner, and the target operation command can be resent after a preset delay to resolve the bus conflict and avoid UFCS communication failure. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments and the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application, and other drawings can be obtained based on these drawings.
[0018] Figure 1A A typical hardware diagram for UFCS using D positive and D negative data channels for communication;
[0019] Figure 1B A schematic diagram of the data frame structure of a communication packet sent by a charging device to a power supply device;
[0020] Figure 1C A schematic diagram of the charging device and the power supply device transmitting data on the D+ and D- data channels at the same time;
[0021] Figure 2A A schematic diagram of an embodiment of a method for resolving UFCS bus conflicts in an embodiment of the present application;
[0022] Figure 2B A flow chart of a method for resolving UFCS bus conflicts in an embodiment of the present application;
[0023] Figure 3 A schematic diagram of an embodiment of a device for resolving UFCS bus conflicts in an embodiment of the present application;
[0024] Figure 4 This is a schematic diagram of an embodiment of an electronic device in an embodiment of the present application;
[0025] Figure 5 This is a schematic diagram of an embodiment of a charging device in an embodiment of the present application;
[0026] Figure 6 This is a schematic diagram of an embodiment of a power supply device in an embodiment of the present application. DETAILED DESCRIPTION
[0027] The embodiments of the present application provide a method, device, electronic device and storage medium for resolving UFCS bus conflicts, which are used to orderly coordinate the message retransmission mechanism of the charging device and the power supply device when there is a bus conflict between the power supply device and the charging device using the UFCS protocol, resolve the bus conflict, and avoid UFCS communication failure.
[0028] In order to make the technical personnel in the technical field better understand the scheme of the present application, the technical scheme in the embodiment of the present application will be described below in conjunction with the drawings in the embodiment of the present application. Obviously, the described embodiment is only a part of the embodiment of the present application, not all of the embodiments. Based on the embodiments in the present application, they should all fall within the scope of protection of the present application.
[0029] The following is a brief description of some of the terms involved in this application, as follows:
[0030] 1. Short circuit: When an electrician accidentally connects the neutral wire and the live wire together, a partial short circuit occurs in the circuit (a short circuit means that the effective resistance in the circuit is zero. This will cause the circuit breaker to trip or burn out the fuse). If not handled promptly or improperly, the circuit (including electronic components) may be damaged at the least, or electric shock may occur at the worst, causing fire or personal injury.
[0031] 2. BC1.1 defines more power sources for charging. There are three main types of power sources, and the Universal Serial Bus (USB) port classification is as follows:
[0032] 1) Standard Downstream Port (SDP)
[0033] This is a typical port commonly seen on desktop and laptop computers. This port has 15kΩ pull-down resistors on the D+ and D- data lines. The current limit is: 2.5mA when suspended, 100mA when connected, and 500mA when connected and configured for higher power. It is actually a normal USB mode. When the USB is in this mode, it can charge external devices (mobile phone charging, power bank) and also play the role of data connection (U disk, mobile phone upload / download).
[0034] 2) Charging Downstream Port (CDP)
[0035] This port supports both high-current charging and data transmission that is fully compatible with USB 2.0. The port has 15kΩ pull-down resistors required for D+ and D- communication, and also has internal circuitry that switches during the charger detection phase. The internal circuitry allows portable devices to distinguish CDP from other types of ports. It is actually a USB interface with fast charging function (1.5A). When the USB is in this mode, it can perform fast charging and also serve as a data connection.
[0036] 3) Dedicated Charging Port (DCP)
[0037] This port does not support any data transfer, but can provide more than 1.5A of current. The D+ and D- data lines of the port are shorted. This type of port supports higher charging capacity wall chargers and car chargers without enumeration. It is actually a simple charger. When the USB is in this mode, it can only charge but not connect to data.
[0038] 3. The BC1.2 protocol uses the D+D- pins, which do not affect each other's functions. As the most basic charging protocol, BC1.2 uses the USB2.0 data lines D+ (DP) and D- (DM) as protocol identification handshake lines.
[0039] 4. High level and low level refer to two different voltage states used in digital circuits. In digital circuits, electrical signals can only be divided into two states: high level and low level, corresponding to high voltage and low voltage respectively. For example, in a 5V system, the high level is usually a voltage between 3.3V and 5V, and the low level is usually a voltage between 0V and 1.6V. It should be noted here that high level and low level are not specific voltage values but voltage values in a specific system. Therefore, in different systems, the specific voltage values corresponding to high level and low level may be different.
[0040] In electronics and automation control, there are analog signals and digital signals. In digital circuits, digital signals are binary, that is, there are only 0 and 1 signals. High and low levels are used to represent different data, and their functions are as follows:
[0041] The high level represents "1", that is, the highest bit in binary. The high level is generally stipulated to be 3.5~5V.
[0042] The low level represents "0", that is, the other bits of binary. The low level is generally stipulated to be 0~0.25V.
[0043] By transmitting data in the form of high level or low level, logical operations and data transmission in digital circuits can be achieved.
[0044] With the rapid development of fast charging technology for terminal devices in recent years, especially in terms of charging speed, charging safety, and intelligent charging management, the fast charging experience has been widely recognized by the majority of users and has become a standard feature of smart terminal devices such as mobile phones.
[0045] However, the fast charging industry has long faced the problem of incompatibility of protocols: different brands of terminal devices and adapters cannot effectively identify each other, and can only achieve low-power charging. On the one hand, the user's fast charging experience is greatly restricted and limited, and the incompatibility problem has become a major pain point for users; on the other hand, due to the lack of unified charging standards, the risks and costs of upstream and downstream manufacturers in the industry chain to develop universal fast charging power chips and accessories are relatively high. The inconsistency of technical standards will also hinder the long-term development of green energy and circular economy in terminal equipment. Therefore, it is necessary to formulate a converged fast charging standard for terminal equipment to solve the problem of incompatibility of interoperable fast charging, and serve as the basis for the long-term evolution of fast charging technology, promote the interoperability of manufacturers' fast charging technology in existing terminal equipment in the industry, and at the same time guide and standardize the product development and production of equipment manufacturers (upstream and downstream industry chains) to create fast, safe and compatible charging for terminal equipment users. The new generation of converged fast charging protocol (Universal Fast Charging Specification, UFCS) protocol came into being. UFCS uses D+D- data channels for communication. Such as Figure 1A FIG. 1 is a typical hardware diagram of UFCS using D positive and D negative data channels for communication.
[0046] The D+ data line at the power supply device end is the data sender, and the D- data line is the data receiver; the D+ data line at the charging device end is the data receiver, and the D- data line is the data sender; both the D+ and D- data lines at the cable end support data sending and receiving, and the initial state is data receiving.
[0047] Communication with the cable only occurs in the process of identifying the cable just after it is inserted. The cable is basically not involved in the subsequent UFCS communication process. It can be understood that the D+D- data line directly connects the power supply device (such as an adapter) and the charging device (such as a mobile phone). The process of establishing UFCS fast charging: the charging device sends a high and low sequence level to the power supply device through the D- data line and then pulls down D-. After receiving the high and low level sequence, the power supply device pulls up D+ and releases the resistance of the D+D- short circuit. If D+D- is not disconnected, the charging device can detect that D+ is pulled high, then it is considered that the adapter is a UFCS adapter. The subsequent charging device interacts with the power supply device by sending communication packets. Figure 1B The figure shows a schematic diagram of a data frame structure in which a charging device sends a communication packet to a power supply device.
[0048] No matter the adapter or the mobile phone sends a data packet to the other party, the other party must at least reply with an acknowledgement (ack) packet after receiving the data packet. Some instructions may require multiple data packets to be considered a complete process. For example, the mobile phone sends a request data packet to request charging voltage and current to the adapter, the adapter replies with an ack data packet, and then the adapter sends an acceptance data packet to the mobile phone, the mobile phone replies with an ack data packet, and then the adapter adjusts the voltage and current (OK), and sends a power-ready data packet to the mobile phone, the mobile phone replies with an ack data packet, and this series of operations is considered a complete operation, that is, the operation cannot be interrupted (unless there are special abnormal circumstances, such as a hardware reset mechanism). That is, the UFCS protocol uses D+D- for half-duplex communication, and the instructions are continuous. The mobile phone and the adapter can send data packets to each other, which may cause bus conflicts and communication failures (in most cases, the mobile phone sends data packets to the adapter to interact with the adapter, but sometimes the adapter will also actively send the current adapter status information data packet, such as the adapter adjusts its voltage and current output mode, and will actively send a power change data packet to the mobile phone).
[0049] like Figure 1C , which is a schematic diagram of a charging device and a power supply device transmitting data on the D+ and D- data channels at the same time. There is a problem of transmitting data simultaneously on the D+ and D- data channels, causing bus conflicts and thus communication failures.
[0050] In the embodiment of the present application, the charging device is a terminal device, and the terminal device can be a mobile phone, a tablet computer, a computer with wireless transceiver function, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a wireless terminal device in industrial control, a wireless terminal device in self driving, a wireless terminal device in remote medical, a wireless terminal device in a smart grid, a wireless terminal device in transportation safety, a wireless terminal device in a smart city, or a wireless terminal device in a smart home, etc.
[0051] As an example but not limitation, in the embodiments of the present application, the terminal device may also be a wearable device. Wearable devices may also be referred to as wearable smart devices, which are a general term for wearable devices that are intelligently designed and developed using wearable technology for daily wear, such as glasses, gloves, watches, clothing, and shoes. A wearable device is a portable device that is worn directly on the body or integrated into the user's clothes or accessories. Wearable devices are not only hardware devices, but also powerful functions achieved through software support, data interaction, and cloud interaction. Broadly speaking, wearable smart devices include full-featured, large-sized, and fully or partially independent of smartphones, such as smart watches or smart glasses, as well as devices that only focus on a certain type of application function and need to be used in conjunction with other devices such as smartphones, such as various types of smart bracelets and smart jewelry for vital sign monitoring.
[0052] In an embodiment of the present application, when the power supply device externally connected to the charging device is a new generation of UFCS power supply device, if there is a bus conflict between the charging device and the power supply device, the target electronic device releases the bus authority, reacquires the bus authority after a preset delay, and sends a command for the target operation, and the target electronic device includes the charging device or the power supply device.
[0053] Exemplarily, the charging device is described by taking a mobile phone and the power supply device is described by taking an adapter as an example. When the adapter connected to the mobile phone is a UFCS protocol adapter, if a bus conflict is detected between the mobile phone and the adapter, the mobile phone or the adapter releases the bus authority, and after a preset delay, the bus authority can be reacquired and the target operation command can be sent. When a bus conflict occurs between a power supply device and a charging device using the UFCS protocol, the message retransmission mechanism of the charging device and the power supply device can be coordinated in an orderly manner, and the target operation command can be resent after a preset delay, thereby resolving the bus conflict and avoiding UFCS communication failure.
[0054] In an optional implementation, when the power supply device connected to the charging device is a new generation of UFCS power supply device with a fusion fast charging protocol, if there is a bus conflict between the charging device and the power supply device, the target electronic device releases the bus authority, reacquires the bus authority after a preset delay, and sends a command for the target operation. The target electronic device includes the charging device or the power supply device, and may include the following: Figure 2A Steps 201 and 202 are shown. Figure 2A As shown, it is a schematic diagram of an embodiment of a method for resolving UFCS bus conflicts in an embodiment of the present application, which may include:
[0055] 201. When the power supply device externally connected to the charging device is a UFCS power supply device, when the target electronic device obtains bus authority and sends a command for the target operation, it is determined whether there is a bus conflict between the charging device and the power supply device.
[0056] In an optional implementation, when the power supply device externally connected to the charging device is a UFCS power supply device, the target electronic device obtains bus permissions and sends a command for the target operation, and then determines whether there is a bus conflict between the charging device and the power supply device. This may include: when the power supply device externally connected to the charging device is a dedicated charging port DCP power supply device, the charging device determines whether the power supply device is a UFCS power supply device; when the power supply device is a UFCS power supply device, the target electronic device obtains bus permissions and sends a command for the target operation, and then determines whether there is a bus conflict between the charging device and the power supply device.
[0057] In an optional implementation, when the power supply device externally connected to the charging device is a dedicated charging port DCP power supply device, the charging device determines whether the power supply device is a UFCS power supply device; when the power supply device is a UFCS power supply device, when the target electronic device obtains bus authority and sends a command for a target operation, it is determined whether there is a bus conflict between the charging device and the power supply device, which may include: when the power supply device externally connected to the charging device is a DCP power supply device, after the charging device sends a high and low level pulse sequence to the power supply device on the D negative data channel, the charging device sets the level of the D negative data channel to a low level so that the level of the D positive data channel becomes a low level; when the charging device detects that the level of the D positive data channel changes from a low level to a high level, it determines that the power supply device is a UFCS power supply device, and when the target electronic device obtains bus authority and sends a command for a target operation, it is determined whether there is a bus conflict between the charging device and the power supply device.
[0058] For example, when the mobile phone is connected to an external adapter, the DCP adapter will be first identified through the BC1.2 protocol. The UFCS adapter is re-identified based on the DCP adapter, and the D+D- of the DCP adapter is short-circuited. The mobile phone will send a high-low level pulse sequence on the D- data channel, and set the level of the D- data channel to a low level after sending. Since D+D- is short-circuited, the level of the D+ data channel is also pulled down to a low level; after the adapter receives the high-low level pulse sequence, it releases the short connection of D+D- and pulls up the level of the D+ data channel to a high level. If the mobile phone detects that the level of the D+ data channel is pulled up, it is considered that the adapter is a UFCS adapter; if the level of the D+ data channel is not detected to be pulled up, it is considered that the adapter is not a UFCS adapter, and other fast charging protocols are tried.
[0059] When the adapter is a UFCS adapter, the UFCS fast charging protocol is used. In order to avoid UFCS bus conflicts, bus permissions are defined, and the minimum unit for obtaining bus permissions is a certain operation of the UFCS protocol. That is, a certain operation of the UFCS protocol is regarded as a minimum unit (ie, basic unit) that occupies the bus. For example, the ping operation and the operation of obtaining device information are both regarded as the minimum unit that occupies the bus. Exemplarily, the ping operation includes two commands: the ping command and the ack command; the operation of obtaining device information includes four commands: the getDeviceInfo command + ack command + deviceInfo command + ack command. Once an operation obtains bus permissions, the bus permissions are obtained throughout the life cycle of the operation until the last command is executed (except for special hardware reset situations).
[0060] 202. If there is a bus conflict between the charging device and the power supply device, the target electronic device releases the bus authority, reacquires the bus authority after a preset delay, and sends a command for the target operation.
[0061] In an optional implementation, when the power supply device connected to the charging device is a new generation of integrated fast charging protocol UFCS power supply device, the target electronic device obtains bus authority and sends the command of the target operation, and determines whether there is a bus conflict between the charging device and the power supply device, which may include: when the power supply device connected to the charging device is a UFCS power supply device, the target electronic device obtains bus authority and sends the command of the target operation, and determines whether there is a bus conflict according to whether the D positive data channel and the D negative data channel have data transmission at the same time;
[0062] If there is a bus conflict between the charging device and the power supply device, the target electronic device releases the bus authority, which may include: if the D positive data channel and the D negative data channel have data transmission at the same time, there is a bus conflict between the charging device and the power supply device, the target electronic device releases the bus authority, re-acquires the bus authority after a preset delay, and sends a command for the target operation.
[0063] In an optional implementation, when the power supply device connected to the charging device is a new generation of integrated fast charging protocol UFCS power supply device, when the target electronic device obtains bus authority and sends the command of the target operation, it is determined whether there is a bus conflict between the charging device and the power supply device, which may include: when the power supply device connected to the charging device is a UFCS power supply device, when the target electronic device obtains bus authority and sends the command of the target operation, reading the UFCS chip register mark, and determining whether there is a bus conflict according to the UFCS chip register mark;
[0064] If there is a bus conflict between the charging device and the power supply device, the target electronic device releases the bus permission, which may include: when the UFCS chip register is marked as a specific mark, there is a bus conflict between the charging device and the power supply device, the target electronic device releases the bus permission, re-acquires the bus permission after a preset delay, and sends a command for the target operation, wherein the specific mark is used to indicate that the D positive data channel and the D negative data channel have data transmission at the same time.
[0065] In an optional implementation, the preset duration is greater than the hardware reset duration.
[0066] It should be noted that no matter which command of the target operation is sent previously, each command included in the target operation is resent after delaying for a preset time.
[0067] Exemplarily, the specific anti-collision mechanism is introduced by taking the target electronic device as an adapter as an example. The adapter operates the UFCS protocol including receiving data control and sending data control. If the UFCS data reception is interrupted, it triggers the entry of the receiving data control logic. If the UFCS state changes and data needs to be actively sent, the sending data control logic is entered. When the adapter detects that the UFCS data reception is interrupted, the UFCS chip register mark is read at this time to determine whether there is a bus conflict (the chip will determine whether there is data transmitted on the D+D- data channel at the same time and set the register mark, for example, if there is data transmitted on the D+D- data channel at the same time, the register mark is set to 1); if there is a bus conflict, the bus permission is released and the preset time is delayed, for example, after 2ms, the UFCS data is resent. It can be understood that 2ms is set here because the hardware reset is 1ms, and this time can be greater than 1ms. Therefore, the preset time can also be set to 3ms, 4ms, etc.
[0068] Exemplarily, a specific anti-collision mechanism is introduced by taking the target electronic device as a mobile phone as an example. When the mobile phone detects that the UFCS data reception is interrupted, the UFCS chip register mark is read at this time to determine whether there is a bus conflict (the chip will determine whether there is data transmitted on the D+D- data channel at the same time and set the register mark, for example, there is data transmitted on the D+D- data channel at the same time, and the register mark is set to 1); if there is a bus conflict, the bus permission is released and the preset time is delayed, for example, after 10ms, the UFCS data is resent. It can be understood that 10ms is set here because the hardware resets 1ms, and this time can be greater than 1ms. However, because in most cases the mobile phone actively sends data to the adapter, a bus conflict basically occurs when the adapter actively sends data to the mobile phone suddenly, so the length of the adapter retransmission needs to be set smaller, and then the mobile phone sets a preset time of 10ms, which can leave 8ms for the mobile phone to process the data sent by the adapter.
[0069] In an optional implementation, if there is a bus conflict between the charging device and the power supply device, the target electronic device releases the bus permission, reacquires the bus permission after a preset delay, and sends a command for the target operation, which may include: if there is a bus conflict between the charging device and the power supply device, the target electronic device releases the bus permission, reacquires the bus permission after a preset delay, and sends a command for the target operation through the UFCS chip.
[0070] It is understandable that the target electronic device software in the present application does not handle bus conflicts, and the bus conflicts are detected by the UFCS chip, and the command resending mechanism included in the operation is performed by the UFCS chip firmware.
[0071] 203. If there is no bus conflict between the charging device and the power supply device, the target electronic device communicates normally.
[0072] In an optional implementation, if there is no bus conflict between the charging device and the power supply device, the target electronic device communicates normally, which may include: if there is no bus conflict between the charging device and the power supply device, the target electronic device determines whether the bus is locked based on the first data bit received; if the bus is not locked, after the target electronic device obtains the bus permission, it determines whether the command in the current data packet is the last command of the target operation; if the bus is locked, the target electronic device determines whether the command in the current data packet is the last command of the target operation; if it is the last command of the target operation, the target electronic device determines that the target operation is completed and releases the bus permission; if it is not the last command of the target operation, the target electronic device continues to hold the bus permission.
[0073] For example, if there is no bus conflict between the mobile phone and the adapter, and then UFCS receives the first data bit, it is necessary to determine whether the bus on the adapter side is locked (lock means being locked by the operation, i.e. obtaining bus rights, and unlock means releasing bus rights). If the first data bit received determines that the bus is not locked, it is a new operation, and then it is necessary to obtain bus rights. If a complete communication packet is received and it is parsed to see which command it belongs to, then it is determined whether the command is the last command of the target operation. If it is, it indicates that the target operation basic unit is completed and the bus rights need to be released (unlock); otherwise, the operation basic unit continues to be maintained and the bus operation rights continue to be held.
[0074] In an optional implementation, the method may also include: when the UFCS state changes, the target electronic device determines whether the power supply device requires a hardware reset; when the power supply device requires a hardware reset, the target electronic device performs a hardware reset and releases bus permissions; when the power supply device does not require a hardware reset, the target electronic device determines whether the command in the current data packet is the first command of the target operation, and if so, the target electronic device determines whether the bus is in an idle state; if the bus is not in an idle state, the target electronic device waits until the bus is in the idle state and obtains bus permissions; if the bus is in an idle state, the target electronic device determines whether the command in the current data packet is the last command of the target operation; if the command in the current data packet is the last command of the target operation, the target electronic device releases the bus permissions; if the command in the current data packet is not the last command of the target operation, the target electronic device continues to hold the bus permissions.
[0075] For example, if the adapter actively sends UFCS data, it is determined whether a hardware reset of the adapter is currently required. If a hardware reset is required, D+ can be actively pulled down (the mobile phone pulls down D-) for 1ms to perform a hardware reset, and the bus permission is directly released (unlocked) regardless of the previous bus state; if a hardware reset is not required, it is determined whether the command of the current data packet is the first command of an operation. If so, it is determined whether the bus is in an idle state (that is, whether the bus is unlocked). If it is not in an idle state, it is determined until the bus is in an idle state again, and the bus permission is obtained; then it is determined whether it is the last command of an operation. If so, the bus permission needs to be released; if it is between the first and last commands, the basic unit of the operation is continued to be maintained, and the bus permission is continued to be held.
[0076] like Figure 2B As shown, it is a flow chart of the method for resolving UFCS bus conflicts in an embodiment of the present application. The technical solution of the present application designs a bus conflict resolution method based on UFCS. This method can solve the problem of bus conflicts caused by the power supply device and the charging device transmitting data at the same time on D+D- in the UFCS protocol; that is, after a bus conflict occurs, the message retransmission mechanism of the charging device and the power supply device can be coordinated in an orderly manner to avoid UFCS communication failure, and can ensure that the UFCS fast charging protocol can operate normally on the adapter end and the mobile phone end.
[0077] In an embodiment of the present application, when the power supply device connected to the charging device is a UFCS power supply device, the target electronic device determines whether there is a bus conflict between the charging device and the power supply device when obtaining bus authority and sending the command of the target operation; if there is a bus conflict between the charging device and the power supply device, the target electronic device releases the bus authority, re-obtains the bus authority after a preset delay, and sends the command of the target operation; when the power supply device and the charging device in the UFCS protocol have a bus conflict, the message retransmission mechanism of the charging device and the power supply device can be coordinated in an orderly manner, and the command of the target operation can be re-sent after a preset delay to resolve the bus conflict and avoid UFCS communication failure. If there is no bus conflict between the charging device and the power supply device, the target electronic device communicates normally.
[0078] Under normal circumstances, the charging device basically initiates a data packet to the power supply device. During testing, the interaction between the charging device and the power supply device can allow the power supply device to enter the UFCS test mode, and then the power supply device will actively initiate a data packet to the charging device. At this time, the charging device also actively sends a communication packet to the adapter. Use an oscilloscope to check the order of the interaction frames between the power supply device and the charging device and whether a bus conflict will occur and whether it complies with the solution of this application.
[0079] like Figure 3 FIG. 1 is a schematic diagram of an embodiment of a device for resolving UFCS bus conflicts in an embodiment of the present application. The device is applied to a target electronic device, and the device may include:
[0080] The processing module 301 is used for releasing the bus authority and reacquiring the bus authority after a preset delay if a bus conflict exists between the charging device and the power supply device when the power supply device connected to the charging device is a new generation UFCS power supply device;
[0081] The sending module 302 is used to send a command for a target operation, where the target electronic device includes the charging device or the power supply device.
[0082] In an optional implementation, the processing module 301 is specifically used to determine whether there is a bus conflict between the charging device and the power supply device when the power supply device externally connected to the charging device is a UFCS power supply device by obtaining bus permissions and sending a command for the target operation; if there is a bus conflict between the charging device and the power supply device, the bus permissions are released.
[0083] In an optional implementation, the processing module 301 is specifically used to determine whether there is a bus conflict when the power supply device externally connected to the charging device is a UFCS power supply device, by obtaining bus authority and sending the command of the target operation according to whether the D positive data channel and the D negative data channel have data transmission at the same time; if the D positive data channel and the D negative data channel have data transmission at the same time, there is a bus conflict between the charging device and the power supply device, and the bus authority is released.
[0084] In an optional implementation, the processing module 301 is specifically used to, when the power supply device externally connected to the charging device is a UFCS power supply device, obtain bus authority, read the UFCS chip register mark when sending the command of the target operation, and determine whether there is a bus conflict according to the UFCS chip register mark; when the UFCS chip register mark is a specific mark, there is a bus conflict between the charging device and the power supply device, and the bus authority is released, and the specific mark is used to indicate that the D positive data channel and the D negative data channel have data transmission at the same time.
[0085] In an optional implementation, the processing module 301 is specifically used to determine whether the power supply device externally connected to the charging device is a UFCS power supply device when the power supply device is a dedicated charging port DCP power supply device; when the power supply device is a UFCS power supply device, by obtaining bus permissions and sending a command for a target operation, it is determined whether there is a bus conflict between the charging device and the power supply device.
[0086] In an optional implementation, the processing module 301 is also used to determine whether the bus is locked based on the first data bit received if there is no bus conflict between the charging device and the power supply device; if the bus is not locked, after obtaining the bus permission, determine whether the command in the current data packet is the last command of the target operation; if the bus is locked, determine whether the command in the current data packet is the last command of the target operation; if it is the last command of the target operation, determine that the target operation is completed and release the bus permission; if it is not the last command of the target operation, continue to hold the bus permission.
[0087] In an optional implementation, the processing module 301 is also used to determine whether the power supply device requires a hardware reset when the UFCS state changes; if the power supply device requires a hardware reset, perform a hardware reset and release bus permissions; if the power supply device does not need a hardware reset, determine whether the command in the current data packet is the first command of the target operation, and if so, determine whether the bus is in an idle state; if the bus is not in an idle state, wait until the bus is in the idle state and obtain bus permissions; if the bus is in an idle state, determine whether the command in the current data packet is the last command of the target operation; if the command in the current data packet is the last command of the target operation, release the bus permissions; if the command in the current data packet is not the last command of the target operation, continue to hold the bus permissions.
[0088] In an optional implementation, the processing module 301 is specifically configured to, if there is a bus conflict between the charging device and the power supply device, cause the target electronic device to release the bus authority, and reacquire the bus authority after a preset delay time;
[0089] The sending module 302 is specifically configured to send the target operation command through the UFCS chip.
[0090] In an optional implementation, the preset duration is greater than the hardware reset duration.
[0091] like Figure 4 As shown, it is a schematic diagram of an embodiment of an electronic device in the present application, which may include Figure 3 The device for resolving UFCS bus conflicts is shown.
[0092] like Figure 5 The figure is a schematic diagram of an embodiment of a charging device in an embodiment of the present application. The charging device is a terminal device and may include:
[0093] Combine the following Figure 5 A detailed introduction to the various components of the mobile phone in the terminal device:
[0094] The RF circuit 510 can be used for receiving and sending signals during information transmission or calls. In particular, after receiving the downlink information of the base station, it is sent to the processor 580 for processing; in addition, the designed uplink data is sent to the base station. Generally, the RF circuit 510 includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (Low Noise Amplifier, LNA), a duplexer, etc. In addition, the RF circuit 510 can also communicate with the network and other devices through wireless communication. The above wireless communication can use any communication standard or protocol, including but not limited to Global System of Mobile communication (Global System of Mobile communication, GSM), General Packet Radio Service (General Packet Radio Service, GPRS), Code Division Multiple Access (Code Division Multiple Access, CDMA), Wideband Code Division Multiple Access (Wideband Code Division Multiple Access, WCDMA), Long Term Evolution (Long Term Evolution, LTE), email, Short Messaging Service (SMS), etc.
[0095] The memory 520 can be used to store software programs and modules. The processor 580 executes various functional applications and data processing of the mobile phone by running the software programs and modules stored in the memory 520. The memory 520 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory 520 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0096] The input unit 530 can be used to receive input digital or character information, and to generate key signal input related to the user settings and function control of the mobile phone. Specifically, the input unit 530 may include a touch panel 531 and other input devices 532. The touch panel 531, also known as a touch screen, can collect the user's touch operation on or near it (such as the user's operation on the touch panel 531 or near the touch panel 531 using any suitable object or accessory such as a finger, stylus, etc.), and drive the corresponding connection device according to a pre-set program. Optionally, the touch panel 531 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it to the processor 580, and can receive and execute commands sent by the processor 580. In addition, the touch panel 531 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch panel 531, the input unit 530 may also include other input devices 532. Specifically, other input devices 532 may include but are not limited to one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, etc.
[0097] The display unit 540 can be used to display information input by the user or information provided to the user and various menus of the mobile phone. The display unit 540 may include a display panel 541. Optionally, the display panel 541 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc. Further, the touch panel 531 may cover the display panel 541. When the touch panel 531 detects a touch operation on or near it, it is transmitted to the processor 580 to determine the type of touch event. Subsequently, the processor 580 provides a corresponding visual output on the display panel 541 according to the type of touch event. Although in Figure 5 In the embodiment, the touch panel 531 and the display panel 541 are used as two independent components to realize the input and output functions of the mobile phone, but in some embodiments, the touch panel 531 and the display panel 541 can be integrated to realize the input and output functions of the mobile phone.
[0098] The mobile phone may also include at least one sensor 550, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 541 according to the brightness of the ambient light, and the proximity sensor may turn off the display panel 541 and / or the backlight when the mobile phone is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used for applications that identify the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors that can be configured in the mobile phone, such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., they will not be repeated here.
[0099] The audio circuit 560, the speaker 561, and the microphone 562 can provide an audio interface between the user and the mobile phone. The audio circuit 560 can transmit the received audio data to the speaker 561 after converting the received audio data into an electrical signal, which is converted into a sound signal for output; on the other hand, the microphone 562 converts the collected sound signal into an electrical signal, which is received by the audio circuit 560 and converted into audio data, and then the audio data is output to the processor 580 for processing, and then sent to another mobile phone through the RF circuit 510, or the audio data is output to the memory 520 for further processing.
[0100] Wi-Fi is a short-range wireless transmission technology. The mobile phone can help users send and receive emails, browse web pages and access streaming media through the Wi-Fi module 570, which provides users with wireless broadband Internet access. Figure 5 A Wi-Fi module 570 is shown, but it is understandable that it is not an essential component of the mobile phone and can be omitted as needed without changing the essence of the invention.
[0101] The processor 580 is the control center of the mobile phone. It uses various interfaces and lines to connect various parts of the entire mobile phone. By running or executing software programs and / or modules stored in the memory 520, and calling data stored in the memory 520, it executes various functions of the mobile phone and processes data, thereby monitoring the mobile phone as a whole. Optionally, the processor 580 may include one or more processing units; preferably, the processor 580 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 580.
[0102] The mobile phone also includes a power source 590 (such as a battery) for supplying power to various components. Preferably, the power source can be logically connected to the processor 580 through a power management system, so that the power management system can manage charging, discharging, power consumption and other functions.
[0103] Although not shown, the mobile phone may also include a camera, a Bluetooth module, etc., which will not be described in detail here.
[0104] In the embodiment of the present application, the processor 580 is used to release the bus authority and reacquire the bus authority after a preset delay if there is a bus conflict between the charging device and the power supply device when the power supply device externally connected to the charging device is a new generation of integrated fast charging protocol UFCS power supply device;
[0105] The RF circuit 510 is used to send a target operation command, where the target electronic device includes the charging device or the power supply device.
[0106] In an optional implementation, the processor 580 is specifically used to determine whether there is a bus conflict between the charging device and the power supply device when the power supply device externally connected to the charging device is a UFCS power supply device by obtaining bus permissions and sending a command for the target operation; if there is a bus conflict between the charging device and the power supply device, the bus permissions are released.
[0107] In an optional implementation, the processor 580 is specifically used to determine whether there is a bus conflict when the power supply device externally connected to the charging device is a UFCS power supply device, by obtaining bus authority and sending the command of the target operation according to whether the D positive data channel and the D negative data channel have data transmission at the same time; if the D positive data channel and the D negative data channel have data transmission at the same time, there is a bus conflict between the charging device and the power supply device, and the bus authority is released.
[0108] In an optional implementation, the processor 580 is specifically used to, when the power supply device externally connected to the charging device is a UFCS power supply device, obtain bus authority and send the command of the target operation, read the UFCS chip register mark, and determine whether there is a bus conflict according to the UFCS chip register mark; when the UFCS chip register mark is a specific mark, there is a bus conflict between the charging device and the power supply device, and the bus authority is released, and the specific mark is used to indicate that the D positive data channel and the D negative data channel have data transmission at the same time.
[0109] In an optional implementation, the processor 580 is specifically used to determine whether the power supply device externally connected to the charging device is a UFCS power supply device when the power supply device is a dedicated charging port DCP power supply device; when the power supply device is a UFCS power supply device, by obtaining bus permissions and sending a command for a target operation, it is determined whether there is a bus conflict between the charging device and the power supply device.
[0110] In an optional implementation, the processor 580 is further used to determine whether the bus is locked based on the first data bit received if there is no bus conflict between the charging device and the power supply device; if the bus is not locked, after obtaining the bus permission, determine whether the command in the current data packet is the last command of the target operation; if the bus is locked, determine whether the command in the current data packet is the last command of the target operation; if it is the last command of the target operation, determine that the target operation is completed and release the bus permission; if it is not the last command of the target operation, continue to hold the bus permission.
[0111] In an optional implementation, the processor 580 is also used to determine whether the power supply device requires a hardware reset when the UFCS state changes; if the power supply device requires a hardware reset, perform a hardware reset and release bus permissions; if the power supply device does not need a hardware reset, determine whether the command in the current data packet is the first command of the target operation, and if so, determine whether the bus is in an idle state; if the bus is not in an idle state, wait until the bus is in the idle state and obtain bus permissions; if the bus is in an idle state, determine whether the command in the current data packet is the last command of the target operation; if the command in the current data packet is the last command of the target operation, release the bus permissions; if the command in the current data packet is not the last command of the target operation, continue to hold the bus permissions.
[0112] In an optional implementation, the processor 580 is specifically configured to, if there is a bus conflict between the charging device and the power supply device, cause the target electronic device to release the bus authority, and reacquire the bus authority after a preset delay time;
[0113] The RF circuit 510 is specifically used to send the command of the target operation through the UFCS chip.
[0114] In an optional implementation, the preset duration is greater than the hardware reset duration.
[0115] like Figure 6 FIG. 1 is a schematic diagram of an embodiment of a power supply device in an embodiment of the present application, which may include:
[0116] A memory 601 storing executable program codes;
[0117] A processor 602 and a transceiver 603 coupled to the memory 601;
[0118] In the embodiment of the present application, the processor 602 is used to release the bus authority and reacquire the bus authority after a preset delay if there is a bus conflict between the charging device and the power supply device when the power supply device externally connected to the charging device is a new generation of integrated fast charging protocol UFCS power supply device;
[0119] The transceiver 603 is used to send a target operation command, where the target electronic device includes the charging device or the power supply device.
[0120] In an optional implementation, the processor 602 is specifically used to determine whether there is a bus conflict between the charging device and the power supply device when sending a command for the target operation by obtaining bus permissions when the power supply device externally connected to the charging device is a UFCS power supply device; if there is a bus conflict between the charging device and the power supply device, the bus permissions are released.
[0121] In an optional implementation, the processor 602 is specifically used to determine whether there is a bus conflict when the power supply device externally connected to the charging device is a UFCS power supply device, by obtaining bus authority and sending the command of the target operation according to whether the D positive data channel and the D negative data channel have data transmission at the same time; if the D positive data channel and the D negative data channel have data transmission at the same time, there is a bus conflict between the charging device and the power supply device, and the bus authority is released.
[0122] In an optional implementation, the processor 602 is specifically configured to, when the power supply device externally connected to the charging device is a UFCS power supply device, obtain bus authority and, when sending the command for the target operation, read the UFCS chip register mark, and determine whether there is a bus conflict according to the UFCS chip register mark; when the UFCS chip register mark is a specific mark, there is a bus conflict between the charging device and the power supply device, and the bus authority is released, and the specific mark is used to indicate that the D positive data channel and the D negative data channel have data transmission at the same time.
[0123] In an optional implementation, the processor 602 is specifically used to determine whether the power supply device externally connected to the charging device is a UFCS power supply device when the power supply device is a dedicated charging port DCP power supply device; when the power supply device is a UFCS power supply device, by obtaining bus permissions and sending a command for a target operation, it is determined whether there is a bus conflict between the charging device and the power supply device.
[0124] In an optional implementation, the processor 602 is further used to determine whether the bus is locked based on the first data bit received if there is no bus conflict between the charging device and the power supply device; if the bus is not locked, after obtaining the bus permission, determine whether the command in the current data packet is the last command of the target operation; if the bus is locked, determine whether the command in the current data packet is the last command of the target operation; if it is the last command of the target operation, determine that the target operation is completed and release the bus permission; if it is not the last command of the target operation, continue to hold the bus permission.
[0125] In an optional implementation, the processor 602 is also used to determine whether the power supply device requires a hardware reset when the UFCS state changes; if the power supply device requires a hardware reset, perform a hardware reset and release bus permissions; if the power supply device does not need a hardware reset, determine whether the command in the current data packet is the first command of the target operation, and if so, determine whether the bus is in an idle state; if the bus is not in an idle state, wait until the bus is in the idle state and obtain bus permissions; if the bus is in an idle state, determine whether the command in the current data packet is the last command of the target operation; if the command in the current data packet is the last command of the target operation, release the bus permissions; if the command in the current data packet is not the last command of the target operation, continue to hold the bus permissions.
[0126] In an optional implementation, the processor 602 is specifically configured to, if there is a bus conflict between the charging device and the power supply device, cause the target electronic device to release the bus authority, and reacquire the bus authority after a preset delay time;
[0127] The transceiver 603 is specifically configured to send the target operation command through the UFCS chip.
[0128] In an optional implementation, the preset duration is greater than the hardware reset duration.
[0129] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (Digital Subscriber Line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a server, data center, etc. that contains one or more available media integrated. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (eg, a solid state disk (SSD)).
[0130] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0131] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0132] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0133] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0134] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk.
[0135] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for resolving UFCS bus conflicts, characterized in that: include: When the power supply device external to the charging device is a new generation of UFCS power supply device, if there is a bus conflict between the charging device and the power supply device, the target electronic device releases the bus authority, reacquires the bus authority after a preset delay, and sends a command for the target operation, and the target electronic device includes the charging device or the power supply device.
2. The method according to claim 1, characterized in that In the case where the power supply device externally connected to the charging device is a new generation UFCS power supply device, if there is a bus conflict between the charging device and the power supply device, the target electronic device releases the bus authority, including: In the case where the power supply device externally connected to the charging device is a UFCS power supply device, when the target electronic device obtains bus authority and sends a command for the target operation, it is determined whether there is a bus conflict between the charging device and the power supply device; If there is a bus conflict between the charging device and the power supply device, the target electronic device releases the bus authority.
3. The method according to claim 2, characterized in that In the case where the power supply device externally connected to the charging device is a new generation UFCS power supply device, when the target electronic device obtains bus authority and sends a command for the target operation, it is determined whether there is a bus conflict between the charging device and the power supply device, including: In the case where the power supply device external to the charging device is a UFCS power supply device, when the target electronic device obtains bus authority and sends the command for the target operation, it is determined whether there is a bus conflict according to whether the D positive data channel and the D negative data channel have data transmission at the same time; If there is a bus conflict between the charging device and the power supply device, the target electronic device releases the bus authority, including: If the D positive data channel and the D negative data channel have data transmission at the same time, there is a bus conflict between the charging device and the power supply device, and the target electronic device releases the bus authority.
4. The method according to claim 2, characterized in that: In the case where the power supply device externally connected to the charging device is a new generation UFCS power supply device, when the target electronic device obtains bus authority and sends a command for the target operation, it is determined whether there is a bus conflict between the charging device and the power supply device, including: In the case where the power supply device external to the charging device is a UFCS power supply device, the target electronic device obtains bus authority and reads the UFCS chip register mark when sending the target operation command, and determines whether there is a bus conflict according to the UFCS chip register mark; If there is a bus conflict between the charging device and the power supply device, the target electronic device releases the bus authority, including: When the UFCS chip register is marked as a specific mark, there is a bus conflict between the charging device and the power supply device, and the target electronic device releases the bus authority. The specific mark is used to indicate that the D positive data channel and the D negative data channel have data transmission at the same time.
5. The method according to any one of claims 2 to 4, characterized in that: In the case where the power supply device externally connected to the charging device is a UFCS power supply device, when the target electronic device obtains bus authority and sends a command for the target operation, determining whether there is a bus conflict between the charging device and the power supply device includes: In the case where the power supply device externally connected to the charging device is a dedicated charging port DCP power supply device, the target electronic device determines whether the power supply device is a UFCS power supply device; In the case that the power supply device is a UFCS power supply device, when the target electronic device obtains bus authority and sends a target operation command, it is determined whether there is a bus conflict between the charging device and the power supply device.
6. The method according to any one of claims 1 to 4, characterized in that The method further comprises: If there is no bus conflict between the charging device and the power supply device, the target electronic device determines whether the bus is locked according to the first data bit received; If the bus is not locked, the target electronic device obtains the bus permission and determines whether the command in the current data packet is the last command of the target operation; If the bus is locked, the target electronic device determines whether the command in the current data packet is the last command of the target operation; If it is the last command of the target operation, the target electronic device determines that the target operation is completed and releases the bus authority; If it is not the last command of the target operation, the target electronic device continues to hold the bus authority.
7. The method according to any one of claims 1 to 4, characterized in that The method further comprises: In the case where the UFCS state changes, the target electronic device determines whether the power supply device needs a hardware reset; When the power supply device needs a hardware reset, the target electronic device performs a hardware reset to release the bus authority; In the case where the power supply device does not need a hardware reset, the target electronic device determines whether the command in the current data packet is the first command of the target operation, and if so, the target electronic device determines whether the bus is in an idle state; If the bus is not in the idle state, the target electronic device waits until the bus is in the idle state to obtain the bus authority; If the bus is in an idle state, the target electronic device determines whether the command in the current data packet is the last command of the target operation; If the command in the current data packet is the last command of the target operation, the target electronic device releases the bus authority; If the command in the current data packet is not the last command of the target operation, the target electronic device continues to hold the bus authority.
8. The method according to any one of claims 1 to 4, characterized in that If there is a bus conflict between the charging device and the power supply device, the target electronic device releases the bus authority, reacquires the bus authority after a preset delay, and sends a command for the target operation, including: If there is a bus conflict between the charging device and the power supply device, the target electronic device releases the bus authority, reacquires the bus authority after a preset delay, and sends a command for the target operation through the UFCS chip.
9. The method according to any one of claims 1 to 4, characterized in that: The preset duration is greater than the hardware reset duration.
10. A device for resolving UFCS bus conflicts, characterized in that: The device is applied to a target electronic device, and the device comprises: A processing module, for releasing the bus authority and reacquiring the bus authority after a preset delay if a bus conflict exists between the charging device and the power supply device when the power supply device connected to the charging device is a new generation UFCS power supply device; The sending module is used to send a command for a target operation, where the target electronic device includes the charging device or the power supply device.
11. An electronic device, characterized in that: include: A memory storing executable program code; a processor and a transceiver coupled to the memory; The processor and the transceiver are used to correspondingly execute the method according to any one of claims 1 to 9.
12. A computer-readable storage medium comprising instructions, which, when executed on a processor, causes the processor to perform the method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Method and device for detecting jar packet conflict, equipment and storage medium
CN115202718A
Charging method and device and electronic equipment
CN115986887A
Charge control method, charge control apparatus and storage medium
US20220393496A1
Devices and methods of LWA power consumption reduction and RLF prevention
WO2017111788A1