USB transmission automatic compensation method, device and equipment

Adaptive compensation parameter adjustment is achieved in the USB signal extender through custom communication methods, which solves the problem that the USB signal extender cannot adapt to the differences in different wire lengths and attenuation impedances, ensuring stable transmission of USB signals.

CN120407491AActive Publication Date: 2025-08-01LONTIUM SEMICON CORP
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510912658.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-02
Publication Date
2025-08-01
Estimated Expiration
2045-07-02

AI Technical Summary

Technical Problem

The existing USB signal extenders cannot adapt to USB cables of different lengths and attenuation impedances, resulting in some cables not being able to work stably.

Method used

Through custom communication between the first signal enhancement chip and the second signal enhancement chip, USB test data packets are sent alternately in high-speed and low-speed modes, appropriate compensation parameter values are determined, and adaptive adjustment is realized.

Benefits of technology

Ensure that the USB signal operates stably on wires of different lengths and attenuation impedances, and realizes long-distance USB transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120407491A_ABST
    Figure CN120407491A_ABST
Patent Text Reader

Abstract

The invention discloses a USB transmission automatic compensation method, device and equipment, and is used for adaptively adjusting a compensation parameter value in USB transmission, the method is applied to a first signal enhancement chip, and the method comprises the following steps: sending a USB test data packet to a second signal enhancement chip according to a first mode, so that the second signal enhancement chip sends a USB test data packet to the second signal enhancement chip according to different compensation parameter values; receiving a USB test data packet, and determining a target compensation parameter value of which the data receiving accuracy exceeds an accuracy threshold; the first mode is a transmission mode of which the transmission rate is greater than a first speed threshold; receiving a target compensation parameter value sent by a second signal enhancement chip according to a second mode; the second mode is a transmission mode of which the transmission rate is smaller than a second speed threshold; determining a final compensation parameter value from the target compensation parameter values; and sending the final compensation parameter value to a second signal enhancement chip according to a second mode, so that the second signal enhancement chip configures and uses the final compensation parameter value for communication.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of signal processing, and in particular, to a method, device, and equipment for automatic compensation of USB (Universal Serial Bus) transmission. Background Art

[0002] The Universal Serial Bus (USB) is a serial bus standard and also a technical specification for input / output interfaces, which is widely used in information communication products such as personal computers and mobile devices. As a high-speed signal, according to the provisions of the USB protocol, the maximum transmission distance supported by the USB signal sent from the sending end without any signal enhancement is 5 meters. In actual use, the length of the USB often exceeds the 5-meter limit, and can even reach 40 meters or more.

[0003] To enhance the signal driving ability, it is necessary to add a USB signal enhancement chip to compensate the USB signal to achieve long-distance transmission of the USB signal. However, existing products usually adopt a fixed compensation method and cannot adapt to different lengths of wire; even for wires of the same length, due to certain differences in the attenuation impedance of the wire, some wires may not be able to work stably. Summary of the Invention

[0004] In view of this, embodiments of this application provide a method, device, and equipment for automatic compensation of USB transmission to adaptively adjust the compensation parameter value in USB transmission.

[0005] To solve the above problems, the technical solutions provided by the embodiments of this application are as follows: In a first aspect, embodiments of this application provide a method for automatic compensation of Universal Serial Bus (USB) transmission. The method is applied to a first signal enhancement chip and includes: Sending a USB test data packet to a second signal enhancement chip according to a first mode, so that the second signal enhancement chip receives the USB test data packet according to different compensation parameter values and determines a target compensation parameter value whose data reception correct rate exceeds a correct rate threshold; the first mode is a transmission mode with a transmission rate greater than a first speed threshold; Receiving the target compensation parameter value sent by the second signal enhancement chip according to a second mode; the second mode is a transmission mode with a transmission rate less than a second speed threshold, and the first speed threshold is greater than the second speed threshold; Determining a final compensation parameter value from the target compensation parameter values; Sending the final compensation parameter value to the second signal enhancement chip according to the second mode, so that the second signal enhancement chip configures and uses the final compensation parameter value for communication.

[0006] In a possible implementation, before sending a USB test data packet to a second signal enhancement chip according to a first mode, the method further includes: Sending a handshake signal to the second signal enhancement chip according to a second mode, and receiving a verification result signal of the handshake signal sent by the second signal enhancement chip according to the second mode; If the verification result signal is correct, configuring the first signal enhancement chip and the second signal enhancement chip to switch to the first mode.

[0007] In a possible implementation, after sending the handshake signal to the second signal enhancement chip according to the second mode, the method further includes: Starting a timer; If the verification result signal of the handshake signal is not received after the timer times out, or the verification result signal is abnormal, determining that the connection between the first signal enhancement chip and the second signal enhancement chip is abnormal.

[0008] In a possible implementation, the step of if the verification result signal is correct, configuring the first signal enhancement chip and the second signal enhancement chip to switch to the first mode includes: If the verification result signal is correct, sending a first configuration signal to the second signal enhancement chip according to the second mode, so that the second signal enhancement chip sends a response signal of the first configuration signal and switches to the first mode; After receiving the response signal of the first configuration signal sent by the second signal enhancement chip according to the second mode, configuring the first signal enhancement chip to switch to the first mode.

[0009] In a possible implementation, the step of sending a USB test data packet to a second signal enhancement chip according to a first mode, so that the second signal enhancement chip receives the USB test data packet according to different compensation parameter values, and determining a target compensation parameter value with a data reception correct rate exceeding a correct rate threshold includes: Sending a USB test data packet to the second signal enhancement chip according to the first mode using target sending parameters, so that the second signal enhancement chip receives the USB test data packet according to different compensation parameter values, and determining a target compensation parameter value corresponding to the target sending parameters with a data reception correct rate exceeding the correct rate threshold.

[0010] In a possible implementation, the step of receiving the target compensation parameter value sent by the second signal enhancement chip according to the second mode includes: Receive the target compensation parameter values corresponding to different target transmission parameters sent by the second signal enhancement chip according to the second mode.

[0011] In a possible implementation manner, determining the final compensation parameter value from the target compensation parameter values includes: Select any target transmission parameter from the target compensation parameter values corresponding to different target transmission parameters; Determine the target transmission parameter value as the final transmission parameter value, and determine the target compensation parameter value corresponding to the target transmission parameter value as the final compensation parameter value.

[0012] In a second aspect, an embodiment of the present application provides a device for automatic compensation of Universal Serial Bus (USB) transmission. The device is applied to a first signal enhancement chip, and the device includes: A first transmission unit, configured to send a USB test data packet to a second signal enhancement chip according to a first mode, so that the second signal enhancement chip receives the USB test data packet according to different compensation parameter values and determines a target compensation parameter value whose data reception correct rate exceeds a correct rate threshold; the first mode is a transmission mode with a transmission rate greater than a first speed threshold; A first reception unit, configured to receive the target compensation parameter value sent by the second signal enhancement chip according to a second mode; the second mode is a transmission mode with a transmission rate less than a second speed threshold, and the first speed threshold is greater than the second speed threshold; A first determination unit, configured to determine a final compensation parameter value from the target compensation parameter values; A second transmission unit, configured to send the final compensation parameter value to the second signal enhancement chip according to the second mode, so that the second signal enhancement chip configures and uses the final compensation parameter value for communication.

[0013] In a third aspect, an embodiment of the present application provides a device for automatic compensation of Universal Serial Bus (USB) transmission, including: a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the method for automatic compensation of USB transmission as described in any one of the above is implemented.

[0014] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions run on a terminal device, the terminal device is caused to execute the method for automatic compensation of USB transmission as described in any one of the above.

[0015] Therefore, the embodiments of the present application have the following beneficial effects: In the embodiment of the present application, the first signal enhancement chip sends USB test data packets to the second signal enhancement chip in high-speed mode, and the second signal enhancement chip receives the USB test data packets according to different compensation parameter values. The target compensation parameter values with a reception correct rate exceeding the correct rate threshold are recorded and sent to the first signal enhancement chip in low-speed mode. The first signal enhancement chip determines the final compensation parameter value from the received target compensation parameter values and synchronizes it to the second signal enhancement chip, and then the second signal enhancement chip is configured to use the final compensation parameter value when receiving data. Through the above-mentioned custom communication process between the first signal enhancement chip and the second signal enhancement chip, an appropriate compensation parameter value can be adaptively determined. For wires of different lengths or wires of the same length, during mass production or use, the compensation parameter values can be adaptively determined to ensure stable operation of the wire during USB transmission. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 It is a schematic diagram of the USB automatic compensation architecture in the embodiment of the present application; Figure 2 It is a schematic diagram of the signal communication of USB automatic compensation in the embodiment of the present application; Figure 3 It is a flowchart of a method for automatic compensation of USB transmission provided by the embodiment of the present application; Figure 4 It is a schematic diagram of establishing a connection between the first signal enhancement chip and the second signal enhancement chip in the embodiment of the present application; Figure 5 It is a schematic diagram of the automatic EQ process in the embodiment of the present application; Figure 6 It is a schematic diagram of a device for automatic compensation of USB transmission provided by the embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0017] To make the above-mentioned objects, features, and advantages of the embodiments of the present application more obvious and understandable, the embodiments of the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0018] To facilitate the understanding and explanation of the technical solutions provided by the embodiments of the present application, the background technology of the embodiments of the present application will be described first.

[0019] As a high-speed signal, according to the regulations of the USB protocol, the maximum transmission distance supported by the USB signal sent from the sending end without any signal enhancement is 5 meters. In actual use, the length of the USB often exceeds the 5-meter limit, and even reaches 40 meters or more.

[0020] To enhance the signal driving ability, a USB signal enhancement chip needs to be added to compensate for the USB signal and achieve long-distance transmission of the USB signal. In the existing USB signal extenders, two USB signal enhancement chips can be installed, which are respectively connected to the USB sending end (HOST) and the USB receiving end (DEV). A relatively long USB cable can be connected between the two USB signal enhancement chips, so as to achieve long-distance transmission of the USB signal through the USB signal extender. However, the existing USB signal extenders usually configure fixed compensation parameter values for the USB signal enhancement chips, that is, adopt the fixed EQ (Equalization) method, and cannot adapt to USB cables of different lengths; even for USB cables of the same length, due to certain differences in the attenuation impedance of the cables, some cables may not work stably.

[0021] Since the USB protocol does not specify a method for automatic EQ, and automatic EQ needs to be implemented using a private protocol, the embodiments of the present application provide a method, device, and equipment for automatic compensation of USB transmission to achieve custom communication for automatic EQ. Specifically, it can include two stages: in the first stage, the connection between the first signal enhancement chip and the second signal enhancement chip is established through low-speed custom communication; in the second stage, the appropriate compensation parameter values are determined through USB test data packets (i.e., USB-like data), and the communication between the first signal enhancement chip and the second signal enhancement chip and the determination of the final parameters are achieved through low-speed custom communication. Thus, through the automatic EQ technology, it can adapt to different cable lengths to ensure the normal operation of the USB; through the automatic EQ technology, it can adapt to the differences in attenuation impedance of cables of the same length to ensure the normal operation of the USB.

[0022] To facilitate the understanding of the method for automatic compensation of USB transmission provided by the embodiments of the present application, the following is combined with Figure 1-2 the following scenario example for illustration.

[0023] The embodiments of the present application can be applied to the first signal enhancement chip in a USB signal extender. The USB signal extender can include a first signal enhancement chip and a second signal enhancement chip. The first signal enhancement chip can be any signal enhancement chip in the USB signal extender. In the following embodiments, for the convenience of description, it is exemplified that the first signal enhancement chip is connected to the USB sending end (HOST), and the second signal enhancement chip is connected to the USB receiving end (DEV).

[0024] See Figure 1As shown in the figure, this is a schematic diagram of the architecture of USB automatic compensation provided by an embodiment of the present application. The first signal enhancement chip and the second signal enhancement chip can achieve automatic EQ through the custom communication in the embodiment of the present application to enhance the USB signal and ensure normal operation of USB communication even in the case of long cables. In practical applications, the connection between the HOST and Port 1 (PORT1) of the first signal enhancement chip is a standard USB length cable (for example, a USB cable less than or equal to a preset length threshold), and no signal enhancement is required; the connection between the DEV and Port 1 (PORT1) of the second signal enhancement chip is a standard USB length cable, and no signal enhancement is required; the connection between Port 2 (PORT2) of the first signal enhancement chip and Port 2 (PORT2) of the second signal enhancement chip is a USB extension cable (for example, a USB cable greater than the preset length threshold), and signal enhancement is required. The first signal enhancement chip and the second signal enhancement chip can perform custom communication for USB automatic compensation in the embodiment of the present application.

[0025] See Figure 2 As shown in the figure, this is a schematic diagram of signal communication for USB automatic compensation provided by an embodiment of the present application. Since USB is a half-duplex communication method, at the Port 2 (PORT2) end of the first signal enhancement chip, both the intensity of the transmitted signal needs to be enhanced and the intensity of the received signal needs to be compensated; the same is true for the Port 2 (PORT2) end of the second signal enhancement chip. In actual use, to simplify the processing logic, the first signal enhancement chip and the second signal enhancement chip can use the same transmission parameter TX and the same reception parameter RX. Among them, the transmission parameter can include SW and PRE. SW refers to the signal amplitude parameter, and PRE refers to the pre-emphasis parameter. The reception parameter includes the compensation parameter EQ, and EQ is an equalizer used to compensate the high-frequency part of the received signal.

[0026] Those skilled in the art can understand that Figure 1-2 The schematic framework diagram shown is only an example in which the implementation manner of the present application can be realized. The scope of application of the implementation manner of the present application is not limited by any aspect of this framework.

[0027] To facilitate understanding of the embodiments of the present application, a method for automatic compensation of USB transmission provided by the embodiments of the present application will be described below with reference to the accompanying drawings.

[0028] See Figure 3 As shown in the figure, this is a flowchart of a method for automatic compensation of USB transmission provided by an embodiment of the present application. As Figure 3 shown, the method may include S301 - S304: S301: Send a USB test data packet to the second signal enhancement chip according to the first mode, so that the second signal enhancement chip receives the USB test data packet according to different compensation parameter values, and determines the target compensation parameter value whose data reception correct rate exceeds the correct rate threshold. Among them, the first mode is a transmission mode with a transmission rate greater than the first speed threshold.

[0029] In the embodiment of the present application, since the attenuation of low-speed signal long-distance transmission is small, the connection between the first signal enhancement chip and the second signal enhancement chip can be established first through low-speed custom communication. For the relevant description of this stage, please refer to the subsequent embodiments and will not be elaborated here.

[0030] After the connection between the first signal enhancement chip and the second signal enhancement chip is established, class-USB communication can be carried out, that is, the first signal enhancement chip sends a USB test data packet to the second signal enhancement chip according to the first mode. The first mode is a transmission mode with a transmission rate greater than the first speed threshold, that is, a high-speed mode. Matching the USB standard communication rate, the USB test data packet is sent in the high-speed mode. The communication format of the USB test data packet meets the communication format of the USB signal and can be fixed data defined in advance.

[0031] The second signal enhancement chip traverses different compensation parameter values and receives the USB test data packet according to different compensation parameter values respectively. Since the USB test data packet is fixed data agreed in advance, the second signal enhancement chip can determine the data reception correct rate of each compensation parameter value, determine the target compensation parameter value whose data reception correct rate exceeds the correct rate threshold from each compensation parameter value and record it. For example, the data reception correct rate using the compensation parameter value 1 is 95%, the data reception correct rate using the compensation parameter value 2 is 92%, the data reception correct rate using the compensation parameter value 3 is 88%, and the correct rate threshold is 90%, then the compensation parameter values 1 and 2 are the target compensation parameter values. Among them, the correct rate threshold can be set according to the actual situation, and the specific value of the correct rate threshold in the embodiment of the present application is not limited.

[0032] S302: Receive the target compensation parameter value sent by the second signal enhancement chip according to the second mode. Among them, the second mode is a transmission mode with a transmission rate less than the second speed threshold, and the first speed threshold is greater than the second speed threshold.

[0033] After the second signal enhancement chip receives the USB test data packet according to different compensation parameter values, it can switch to the second mode to send the recorded target compensation parameter value. The second mode is a transmission mode with a transmission rate less than the second speed threshold, that is, a low-speed mode, and the first speed threshold is greater than the second speed threshold to ensure the stability of the transmission of the target compensation parameter value.

[0034] After the first signal enhancement chip finishes sending the USB test data packet, it can also switch to the second mode, receive the target compensation parameter value sent by the second signal enhancement chip and record it. After receiving the target compensation parameter value, it can also reply to the second signal enhancement chip with confirmation data in the second mode, indicating that the target compensation parameter value has been received.

[0035] S303: Determine the final compensation parameter value from the target compensation parameter values.

[0036] The first signal enhancement chip can determine the final compensation parameter value from the target compensation parameter values. Since the target compensation parameter values are all compensation parameter values with a data reception correct rate exceeding the correct rate threshold, the target compensation parameter value can be randomly selected, or the target compensation parameter value with a middle value can be selected as the final compensation parameter value.

[0037] S304: Send the final compensation parameter value to the second signal enhancement chip according to the second mode, so that the second signal enhancement chip can configure to use the final compensation parameter value for communication.

[0038] The first signal enhancement chip also needs to synchronously send the final compensation parameter value to the second signal enhancement chip through the second mode. The second signal enhancement chip replies to the first signal enhancement chip with confirmation data in the second mode, indicating that the final compensation parameter value has been received, and configures to use the final compensation parameter value for communication.

[0039] Then the first signal enhancement chip and the second signal enhancement chip can switch to the normal USB communication state, the automatic EQ is completed, and normal USB transmission can be performed.

[0040] In the embodiment of the present application, the first signal enhancement chip sends a USB test data packet to the second signal enhancement chip through the high-speed mode, and the second signal enhancement chip receives the USB test data packet according to different compensation parameter values. Record the target compensation parameter values with a reception correct rate exceeding the correct rate threshold and send them to the first signal enhancement chip through the low-speed mode. The first signal enhancement chip determines the final compensation parameter value from the received target compensation parameter values and synchronizes it to the second signal enhancement chip, so that the second signal enhancement chip is configured to use the final compensation parameter value when receiving data. Then, through the above custom communication process of the first signal enhancement chip and the second signal enhancement chip, a suitable compensation parameter value can be adaptively determined. For wires of different lengths, or wires of the same length, during mass production or use, the compensation parameter value can be adaptively determined to ensure the stable operation of the wire during USB transmission.

[0041] The following continues to expand and illustrate the specific implementation process of establishing the connection between the first signal enhancement chip and the second signal enhancement chip.

[0042] In a possible implementation, before sending the USB test data packet to the second signal enhancement chip in S301 according to the first mode, it may further include: A1: Send a handshake signal to the second signal enhancement chip according to the second mode, and receive the verification result signal of the handshake signal sent by the second signal enhancement chip according to the second mode.

[0043] The low-speed signal has small attenuation during long-distance transmission and is suitable as a handshake signal. The first signal enhancement chip sends a handshake signal to the second signal enhancement chip in the second mode through low-speed custom communication to confirm whether the first signal enhancement chip and the second signal enhancement chip are physically connected properly. In practical applications, the communication format, such as the communication header, communication data, and communication verification method, can be defined with reference to the prior art. The rate of the second mode can adopt relatively low rates such as 10Kbps (bit per second) and 9600bps. At the same time, to improve the anti-interference ability, it can be transmitted through the DP (Data Positive) and DM (Data Minus) differential modes.

[0044] The handshake signal can be pre-agreed fixed data. Then, the second signal enhancement chip can verify the handshake signal, generate the verification result signal of the handshake signal, and send the verification result signal to the first signal enhancement chip using the second mode. The verification result signal includes the result of whether the verification is correct. If it is correct, the verification result signal is correct; if it is incorrect, the verification result signal is abnormal.

[0045] A2: If the verification result signal is correct, configure the first signal enhancement chip and the second signal enhancement chip to switch to the first mode.

[0046] If the verification result signal received by the first signal enhancement chip is correct, the first signal enhancement chip and the second signal enhancement chip can be configured to switch to the first mode, and S301 is triggered to execute.

[0047] In a possible implementation, the specific implementation of A2 to configure the first signal enhancement chip and the second signal enhancement chip to switch to the first mode if the verification result signal is correct may include: A21: If the verification result signal is correct, send a first configuration signal to the second signal enhancement chip according to the second mode, so that the second signal enhancement chip sends a response signal of the first configuration signal and switches to the first mode.

[0048] A22: After receiving the response signal of the first configuration signal sent by the second signal enhancement chip according to the second mode, configure the first signal enhancement chip to switch to the first mode.

[0049] In practical applications, if the verification result signal received by the first signal enhancement chip is correct, the first signal enhancement chip sends a first configuration signal to the second signal enhancement chip through the low-speed second mode, which is used to configure the second signal enhancement chip to switch to the first mode. After receiving the first configuration signal, the second signal enhancement chip first sends a response signal to the first configuration signal through the second mode, and then switches to the first mode. After receiving the response signal of the first configuration signal, the first signal enhancement chip also configures and switches to the first mode.

[0050] The first signal enhancement chip and the second signal enhancement chip communicate through low-speed custom communication to determine that a connection can be established, and switch to the high-speed mode after the connection is established to realize subsequent adaptive determination of the compensation parameter value.

[0051] In a possible implementation, after A1 sends a handshake signal to the second signal enhancement chip according to the second mode, it may further include: B1: Start a timer.

[0052] B2: If the verification result signal of the handshake signal is not received after the timer times out, or the verification result signal is abnormal, it is determined that the connection between the first signal enhancement chip and the second signal enhancement chip is abnormal.

[0053] After the first signal enhancement signal actively sends a handshake signal, it starts a timer to monitor whether the reply of the second signal enhancement signal times out. When the verification result signal of the handshake signal is not received after the timer times out, or the verification result signal is abnormal, that is, the handshake fails, the first signal enhancement chip can determine that the connection between the first signal enhancement chip and the second signal enhancement chip is abnormal, output an error code, and prompt to check the hardware connection in time.

[0054] See Figure 4 As shown in the figure, a schematic diagram of establishing a connection between the first signal enhancement chip and the second signal enhancement chip in the first stage is shown, which may include: S401: The first signal enhancement chip sends a handshake signal to the second signal enhancement chip. After the first signal enhancement chip and the second signal enhancement chip are powered on, the default is the second mode, and the first signal enhancement chip actively sends low-speed custom communication data, that is, the handshake signal.

[0055] S402: The first signal enhancement chip starts a timer. It is used to monitor whether the reply of the second signal enhancement chip times out.

[0056] S403: The second signal enhancement chip sends a verification result signal to the first signal enhancement chip. That is, after receiving the handshake signal, the second signal enhancement chip performs verification and parsing, generates a verification result signal of whether the verification passes, and then returns the verification result signal of whether the verification passes to the first signal enhancement chip.

[0057] S404: When the first signal enhancement chip does not receive the verification result signal or the verification result signal is abnormal when the timer times out, it determines that the connection is abnormal. It can also reduce the communication rate, resend the handshake signal to the second signal enhancement chip, and restart the timer for each transmission. If the timer times out without receiving the verification result signal or the verification result signal is abnormal after multiple retransmissions, it is confirmed that the physical connection between the first signal enhancement chip and the second signal enhancement chip is abnormal, and the abnormal code needs to be actively reported to prompt checking the hardware connection.

[0058] S405: When the verification result signal is correct, the first signal enhancement chip sends the first configuration signal. The first signal enhancement chip can also resend the handshake signal to the second signal enhancement chip and restart the timer for each transmission. If the verification result signal remains correct after multiple retransmissions, it is considered that the physical connection between the first signal enhancement chip and the second signal enhancement chip is reliable, and the first signal enhancement chip and the second signal enhancement chip are configured to switch to the second mode. Specifically, the first configuration signal can be sent to the second signal enhancement chip according to the second mode.

[0059] S406: The second signal enhancement chip switches to the first mode.

[0060] S407: The second signal enhancement chip sends a response signal to the first configuration signal sent by the first signal enhancement chip.

[0061] S408: The first signal enhancement chip switches to the first mode. That is, after the first signal enhancement chip receives the response signal, the first signal enhancement chip is configured to switch to the first mode.

[0062] Thus, the connection between the first signal enhancement chip and the second signal enhancement chip is established, and it switches to the first mode to prepare for subsequent automatic EQ.

[0063] During the process of automatic EQ in the second stage of the embodiment of the present application, the transmission parameters can also be determined.

[0064] In a possible implementation, S301 sends a USB test data packet to the second signal enhancement chip according to the first mode, so that the second signal enhancement chip receives the USB test data packet according to different compensation parameter values, and the specific implementation of determining the target compensation parameter value whose data reception correct rate exceeds the correct rate threshold may include: According to the first mode, use the target transmission parameters to send a USB test data packet to the second signal enhancement chip, so that the second signal enhancement chip receives the USB test data packet according to different compensation parameter values, and determine the target compensation parameter value corresponding to the target transmission parameters whose data reception correct rate exceeds the correct rate threshold.

[0065] In a possible implementation manner, the specific implementation of S302 receiving the target compensation parameter value sent by the second signal enhancement chip according to the second mode may include: Receiving the target compensation parameter values corresponding to different target transmission parameters sent by the second signal enhancement chip according to the second mode.

[0066] In practical applications, after the first signal enhancement chip and the second signal enhancement chip switch to the first mode and enter the high-speed automatic EQ stage, the transmission parameters and compensation parameters are first initialized. In the embodiments of the present application, taking the transmission parameters including SW and PRE as an example for illustration, the target transmission parameters are any set of values of SW and PRE. The first signal enhancement chip can configure SW and PRE to the minimum value when initializing the transmission parameters, and can configure the compensation parameters to the minimum value when initializing the compensation parameters. Similarly, the second signal enhancement chip can configure SW and PRE to the minimum value when initializing the transmission parameters.

[0067] The first signal enhancement chip first uses the initial transmission parameters as the target transmission parameters to send USB test packets. The second signal enhancement chip traverses the compensation parameter values, receives the USB test packets respectively, and the target compensation parameter values with the data reception correct rate exceeding the correct rate threshold can be recorded first. After the compensation parameter values are scanned, it is configured to the second mode (low-speed mode), and all the target compensation parameter values corresponding to the target transmission parameters are sent to the first signal enhancement chip. The first signal enhancement chip switches to the second mode and receives all the target compensation parameter values corresponding to the target transmission parameters.

[0068] After a period of delay, the first signal enhancement chip and the second signal enhancement chip switch to the first mode. The first signal enhancement chip increases the transmission parameter by one level and uses it as the target transmission parameter to send USB test packets again. The second signal enhancement chip traverses the compensation parameter values, receives the USB test packets respectively, and the target compensation parameter values with the data reception correct rate exceeding the correct rate threshold can be recorded first. After the compensation parameter values are scanned, it is configured to the second mode (low-speed mode), and all the target compensation parameter values corresponding to the target transmission parameters are sent to the first signal enhancement chip. The first signal enhancement chip switches to the second mode and receives all the target compensation parameter values corresponding to the target transmission parameters.

[0069] And so on, the first signal enhancement chip sends USB test packets according to each target transmission parameter, and obtains the target compensation parameter values corresponding to each target transmission parameter.

[0070] In a possible implementation manner, the specific implementation of S303 determining the final compensation parameter value from the target compensation parameter values may include: Selecting any target transmission parameter from the target compensation parameter values corresponding to different target transmission parameters; Determine the target transmission parameter value as the final transmission parameter value, and determine the target compensation parameter value corresponding to the target transmission parameter value as the final compensation parameter value.

[0071] From the combination of the target transmission parameter and the target compensation parameter value received by the first signal enhancement chip, a set of target transmission parameter and the corresponding target compensation parameter value can be determined as the final transmission parameter value and the final compensation parameter value respectively. For example, the target transmission parameter and the corresponding target compensation parameter value can be randomly selected as the final transmission parameter value and the final compensation parameter value respectively, or the target transmission parameter and the corresponding target compensation parameter value with a middle value can be selected as the final transmission parameter value and the final compensation parameter value respectively.

[0072] See Figure 5 As shown, a schematic diagram of the second-stage automatic EQ process is shown.

[0073] In this stage, appropriate parameter configurations, including transmission parameters and compensation parameters, can be confirmed through pre-defined USB test data packets, and communication coordination and parameter synchronization between the first signal enhancement chip and the second signal enhancement chip can be achieved through custom low-speed communication.

[0074] The second-stage automatic EQ process can include: S501: The first signal enhancement chip switches to the first mode and initializes the configuration parameters. That is, the first signal enhancement chip enters the high-speed automatic EQ stage, configures the transmission parameter (SW+PRE) to the minimum value, and configures the compensation parameter (EQ) to the minimum value.

[0075] S502: The second signal enhancement chip switches to the first mode and initializes the configuration parameters. That is, the first signal enhancement chip enters the high-speed automatic EQ stage, and configures the transmission parameter (SW+PRE) to the minimum value.

[0076] S503: The first signal enhancement chip sends a USB test data packet to the second signal enhancement chip; the USB test data packet is a pre-defined USB test data packet. Then it switches to the second mode and waits to receive the return packet from the second signal enhancement chip.

[0077] S504: The second signal enhancement chip traverses the compensation parameters to determine the target compensation parameter value. That is, it traverses the EQ value of the compensation parameter to receive the USB test data packet; if the data reception correct rate of a certain EQ value exceeds the correct rate threshold, then this EQ value is determined as the target compensation parameter value and this target compensation parameter value is recorded. After all EQ values are scanned, it is configured to the second mode.

[0078] S505: The second signal enhancement chip sends the target compensation parameter values to the first signal enhancement chip. That is, all the target compensation parameter values are replied to the first signal enhancement chip through the second mode.

[0079] S506: The first signal enhancement chip records the currently appropriate configuration combination, and (SW+PRE) is increased by one level. That is, during the period when the first signal enhancement chip is configured in the second mode, when it receives a low-speed data packet and replies to the second signal enhancement chip that it has received the low-speed data packet. At the same time, it will record the currently appropriate configuration combination, that is, the combination of SW+PRE and EQ. If there are no appropriate parameters, it will not be recorded. After a delay period, it switches to the first mode and then increases the transmission parameter (SW+PRE) by one level.

[0080] S507: The first signal enhancement chip sends a USB test data packet to the second signal enhancement chip.

[0081] S508: The second signal enhancement chip traverses the compensation parameters to determine the target compensation parameter values. That is, after the second signal enhancement chip receives a low-speed data packet, it switches to the first mode and continues to traverse the EQ values to receive the USB test data packet; if the data reception correct rate of a certain EQ value exceeds the correct rate threshold, the EQ value is determined as the target compensation parameter value and this target compensation parameter value is recorded. After all EQ values are scanned, it is configured in the second mode.

[0082] S509: The second signal enhancement chip sends the target compensation parameter values to the first signal enhancement chip. That is, all the target compensation parameter values are replied to the first signal enhancement chip through the second mode.

[0083] S510: Repeat S506 - S509 until all combinations of gears of SW+PRE and EQ are traversed. In this way, the first signal enhancement chip has recorded all appropriate combinations of gears of SW+PRE and EQ.

[0084] S511: If all combinations of gears of SW+PRE and EQ are traversed and there is no appropriate combination of gears, report an exception; if there is an appropriate combination of gears, determine the final configuration and configure it as the final configuration. That is, if there is no appropriate combination of gears, report an exception, so as to prompt to replace the wire for testing. If there is an appropriate combination of gears, the first signal enhancement chip selects the intermediate gear value of all appropriate gear combinations as the final configuration (including the final transmission parameter value and the final compensation parameter value), and configures the first signal enhancement chip as the final configuration. That is, configure the transmission parameter as the final transmission parameter value and the compensation parameter as the final compensation parameter value.

[0085] S512: After determining the final configuration, the first signal enhancement chip sends the final configuration to the second signal enhancement chip. That is, the first signal enhancement chip switches to the second mode and synchronizes the final configuration to the second signal enhancement chip.

[0086] S513: The second signal enhancement chip configures the final configuration and switches to the normal USB communication state. That is, the second signal enhancement chip receives the final configuration through the second mode, and also configures the sending parameters to the final sending parameter values and the compensation parameters to the final compensation parameter values. After a slight delay, the second signal enhancement chip switches to the normal USB communication state.

[0087] S514: The second signal enhancement chip sends a configuration completion message to the first signal enhancement chip. That is, it replies to the first signal enhancement chip with a low-speed data packet, indicating that the configuration is complete and it can switch to the normal USB communication state.

[0088] S515: The first signal enhancement chip switches to the normal USB communication state. That is, when the first signal enhancement chip receives the low-speed data packet, it also switches to the normal USB communication state. The USB can then perform a normal handshake, and then USB data transmission can be carried out. Thus, the automatic EQ process is completed, and normal USB transmission can be carried out.

[0089] In the embodiment of the present application, through the pre-defined USB test data packets, appropriate parameter configurations are confirmed, and communication between chips and the issuance of final configuration parameters are achieved through low-speed custom communication. Through the automatic EQ technology, different cable lengths can be adapted to ensure normal USB operation; through the automatic EQ technology, the differences in wire attenuation impedance during mass production or use for the same cable length can be adapted to ensure normal USB operation.

[0090] Based on the method for automatic compensation of USB transmission provided by the above method embodiment, the embodiment of the present application also provides a device for automatic compensation of USB transmission. The device will be described below with reference to the accompanying drawings.

[0091] See Figure 6 As shown, this figure is a schematic structural diagram of a device for automatic compensation of USB transmission provided by the embodiment of the present application. As Figure 6 shown, the device for automatic compensation of USB transmission can be applied to the first signal enhancement chip. The device includes: The first sending unit 601 is used to send USB test data packets to the second signal enhancement chip according to the first mode, so that the second signal enhancement chip receives the USB test data packets according to different compensation parameter values and determines the target compensation parameter values for which the data reception correct rate exceeds the correct rate threshold; the first mode is a transmission mode with a transmission rate greater than the first speed threshold. A first receiving unit 602, configured to receive the target compensation parameter value sent by the second signal enhancement chip according to a second mode; the second mode is a transmission mode with a transmission rate less than a second speed threshold, and the first speed threshold is greater than the second speed threshold; A first determining unit 603, configured to determine a final compensation parameter value from the target compensation parameter value; A second sending unit 604, configured to send the final compensation parameter value to the second signal enhancement chip according to the second mode, so that the second signal enhancement chip is configured to use the final compensation parameter value for communication.

[0092] In a possible implementation manner, the device further includes: A third sending unit, configured to send a handshake signal to the second signal enhancement chip according to the second mode before sending a USB test data packet to the second signal enhancement chip according to a first mode; A second receiving unit, configured to receive a verification result signal of the handshake signal sent by the second signal enhancement chip according to the second mode; A configuration unit, configured to, if the verification result signal is correct, configure the first signal enhancement chip and the second signal enhancement chip to switch to the first mode.

[0093] In a possible implementation manner, the device further includes: A starting unit, configured to start a timer after sending the handshake signal to the second signal enhancement chip according to the second mode; A second determining unit, configured to determine that the connection between the first signal enhancement chip and the second signal enhancement chip is abnormal if the verification result signal of the handshake signal is not received after the timer times out, or the verification result signal is abnormal.

[0094] In a possible implementation manner, the configuration unit is specifically configured to: If the verification result signal is correct, send a first configuration signal to the second signal enhancement chip according to the second mode, so that the second signal enhancement chip sends a response signal of the first configuration signal and switches to the first mode; After receiving the response signal of the first configuration signal sent by the second signal enhancement chip according to the second mode, configure the first signal enhancement chip to switch to the first mode.

[0095] In a possible implementation manner, the first sending unit is specifically configured to: According to the first mode, a USB test data packet is sent to the second signal enhancement chip using the target sending parameter, so that the second signal enhancement chip receives the USB test data packet according to different compensation parameter values, and determines the target compensation parameter value corresponding to the target sending parameter for which the data reception correct rate exceeds the correct rate threshold.

[0096] In a possible implementation manner, the first receiving unit is specifically configured to: Receive the target compensation parameter values corresponding to different target sending parameters sent by the second signal enhancement chip according to the second mode.

[0097] In a possible implementation manner, the first determining unit is specifically configured to: Select any target sending parameter from the target compensation parameter values corresponding to different target sending parameters; Determine the value of the target sending parameter as the final sending parameter value, and determine the target compensation parameter value corresponding to the value of the target sending parameter as the final compensation parameter value.

[0098] In addition, an embodiment of the present application further provides a device for automatic compensation of USB transmission, including: a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the method for automatic compensation of USB transmission as described in any one of the above is implemented.

[0099] An embodiment of the present application further provides a computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions are run on a terminal device, the terminal device is caused to execute the method for automatic compensation of USB transmission as described in any one of the above.

[0100] An embodiment of the present application further provides a computer program product, including computer program instructions. When the computer program instructions are run on a computer, the computer is caused to execute the method for automatic compensation of USB transmission as described in any one of the above.

[0101] In the embodiment of the present application, the first signal enhancement chip sends USB test data packets to the second signal enhancement chip in high-speed mode, and the second signal enhancement chip receives the USB test data packets according to different compensation parameter values. The target compensation parameter values with a reception correct rate exceeding the correct rate threshold are recorded and sent to the first signal enhancement chip in low-speed mode. The first signal enhancement chip determines the final compensation parameter value from the received target compensation parameter values and synchronizes it to the second signal enhancement chip, so that the second signal enhancement chip is configured to use the final compensation parameter value when receiving data. Through the above-mentioned custom communication process between the first signal enhancement chip and the second signal enhancement chip, appropriate compensation parameter values can be adaptively determined. For wires of different lengths, or wires of the same length, during mass production or use, the compensation parameter values can be adaptively determined to ensure stable operation of the wires during USB transmission.

[0102] It should be noted that the embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The same or similar parts among the embodiments can be referred to each other. For the systems or devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple. For the relevant parts, please refer to the description in the method part.

[0103] It should be understood that in the present application, "at least one (item)" means one or more, and "a plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships can exist. For example, "A and / or B" can mean: only A exists, only B exists, and both A and B exist at the same time. Among them, A and B can be singular or plural. The character " / " generally means that the associated objects before and after are in an "or" relationship. "At least one (one) of the following" or its similar expressions refer to any combination of these items, including any combination of single item (one) or plural items (ones). For example, at least one (one) of a, b, or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a, b, and c", where a, b, and c can be single or multiple.

[0104] It should also be noted that in this text, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising said element.

[0105] The steps of the methods or algorithms described in connection with the embodiments disclosed herein may be implemented directly in hardware, in a software module executed by a processor, or in a combination thereof. The software module may be placed in a random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium well-known in the art.

[0106] The foregoing description of the disclosed embodiments enables those skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for automatic compensation of Universal Serial Bus (USB) transmission, characterized in that, The method is applied to a first signal enhancement chip, and the method includes: Sending a USB test data packet to a second signal enhancement chip according to a first mode, so that the second signal enhancement chip receives the USB test data packet according to different compensation parameter values and determines a target compensation parameter value with a data reception correct rate exceeding a correct rate threshold; the first mode is a transmission mode with a transmission rate greater than a first speed threshold; Receiving the target compensation parameter value sent by the second signal enhancement chip according to a second mode; the second mode is a transmission mode with a transmission rate less than a second speed threshold, and the first speed threshold is greater than the second speed threshold; Determining a final compensation parameter value from the target compensation parameter values; Sending the final compensation parameter value to the second signal enhancement chip according to the second mode, so that the second signal enhancement chip configures to use the final compensation parameter value for communication.

2. The method according to claim 1, characterized in that Before sending a USB test data packet to a second signal enhancement chip according to the first mode, the method further includes: Sending a handshake signal to the second signal enhancement chip according to the second mode and receiving a verification result signal of the handshake signal sent by the second signal enhancement chip according to the second mode; If the verification result signal is correct, configuring the first signal enhancement chip and the second signal enhancement chip to switch to the first mode.

3. The method according to claim 2, wherein After sending a handshake signal to the second signal enhancement chip according to the second mode, the method further includes: Starting a timer; If the verification result signal of the handshake signal is not received after the timer times out, or the verification result signal is abnormal, determining that the connection between the first signal enhancement chip and the second signal enhancement chip is abnormal.

4. The method according to claim 2, wherein The step of if the verification result signal is correct, configuring the first signal enhancement chip and the second signal enhancement chip to switch to the first mode includes: If the verification result signal is correct, sending a first configuration signal to the second signal enhancement chip according to the second mode, so that the second signal enhancement chip sends a response signal of the first configuration signal and switches to the first mode; After receiving the response signal of the first configuration signal sent by the second signal enhancement chip according to the second mode, configuring the first signal enhancement chip to switch to the first mode.

5. The method according to claim 1, wherein The step of sending a USB test data packet to a second signal enhancement chip according to the first mode, so that the second signal enhancement chip receives the USB test data packet according to different compensation parameter values and determines a target compensation parameter value with a data reception correct rate exceeding a correct rate threshold includes: Sending a USB test data packet to a second signal enhancement chip according to the first mode using target sending parameters, so that the second signal enhancement chip receives the USB test data packet according to different compensation parameter values and determines a target compensation parameter value corresponding to the target sending parameter with a data reception correct rate exceeding a correct rate threshold.

6. The method according to claim 5, characterized in that, The step of receiving the target compensation parameter value sent by the second signal enhancement chip according to the second mode includes: Receiving target compensation parameter values corresponding to different target transmission parameters sent by the second signal enhancement chip according to the second mode.

7. The method according to claim 5, characterized in that, Determining the final compensation parameter value from the target compensation parameter values includes: Selecting any one of the target transmission parameters from the target compensation parameter values corresponding to different target transmission parameters; Determining the value of the target transmission parameter as the final transmission parameter value, and determining the target compensation parameter value corresponding to the value of the target transmission parameter as the final compensation parameter value.

8. An apparatus for automatic compensation of Universal Serial Bus (USB) transmission, characterized in that, The device is applied to a first signal enhancement chip, and the device includes: A first sending unit, configured to send a USB test data packet to the second signal enhancement chip according to a first mode, so that the second signal enhancement chip receives the USB test data packet according to different compensation parameter values and determines a target compensation parameter value whose data reception correct rate exceeds a correct rate threshold; the transmission rate of the first mode is greater than a first speed threshold; A first receiving unit, configured to receive the target compensation parameter value sent by the second signal enhancement chip according to the second mode; the transmission rate of the second mode is less than a second speed threshold, and the first speed threshold is greater than the second speed threshold; A first determining unit, configured to determine a final compensation parameter value from the target compensation parameter values; A second sending unit, configured to send the final compensation parameter value to the second signal enhancement chip according to the second mode, so that the second signal enhancement chip configures and uses the final compensation parameter value for communication.

9. A device for automatic compensation of Universal Serial Bus (USB) transmission, characterized in that, Including: A memory, a processor, and a computer program stored on the memory and executable on the processor, where when the processor executes the computer program, the method for automatic compensation of USB transmission as described in any one of claims 1-7 is implemented.

10. A computer-readable storage medium, characterized in that, Instructions are stored in the computer-readable storage medium, and when the instructions run on the terminal device, the terminal device is caused to execute the method for automatic compensation of USB transmission as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Equalizer parameter testing method and device

    CN116132329A

  • Portable USB interface data read-write rate test and eye pattern analysis test device

    CN118748035A

  • Method and system for controlling transmission of USB messages over a data network between a USB device and a plurality of host computers

    US20060123166A1

  • Apparatuses for periodic universal serial bus (USB) transaction scheduling at fractional bus intervals

    US20180189224A1

  • Electronic device for communicating with external device through USB interface and operation method therefor

    US20230096038A1