A method, device and equipment for automatic compensation of USB transmission
By customizing communication to determine the appropriate compensation parameter value, the problem of the USB signal extender being unable to adapt to different lengths and attenuation impedances is solved, and stable operation of the USB signal in long-distance transmission is achieved.
Patent Information
- Application Number
- CN202510912658.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-02
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2045-07-02
AI Technical Summary
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.
Through customized communication between the first signal enhancement chip and the second signal enhancement chip, the appropriate compensation parameter value is determined using the USB test data packet, and is synchronized to the second signal enhancement chip through low-speed mode to achieve adaptive compensation parameter configuration.
It realizes adaptive compensation for cables of different and same lengths, ensuring stable operation of USB signals during long-distance transmission and adapting to differences in cable attenuation impedance.
Smart Images

Figure CN120407491B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of signal processing technology, and in particular to a method, apparatus, and device for automatic compensation of USB (Universal Serial Bus) transmission. Background Art
[0002] Universal Serial Bus (USB) is a serial bus standard and a technical specification for input and output interfaces, widely used in information and communication products such as personal computers and mobile devices. As high-speed signals, the USB protocol stipulates that the maximum supported transmission distance of USB signals from the transmitter is 5 meters without any signal amplification. However, in actual use, USB cables often exceed the 5-meter limit, reaching 40 meters or more.
[0003] To enhance signal driving capabilities, a USB signal booster chip is needed to compensate for the USB signal, enabling long-distance transmission. However, existing products typically use a fixed compensation method that cannot adapt to cables of varying lengths. Even with cables of the same length, variations in attenuation impedance can cause some cables to not function reliably. Summary of the Invention
[0004] In view of this, embodiments of the present application provide a method, apparatus, and device for automatic compensation of USB transmission, so as to achieve adaptive adjustment of compensation parameter values in USB transmission.
[0005] To solve the above problems, the technical solutions provided in the embodiments of the present application are as follows:
[0006] In a first aspect, an embodiment of the present application provides a method for automatic compensation of USB transmission, the method being applied to a first signal enhancement chip, the method comprising:
[0007] Sending a USB test data packet to the second signal enhancement chip in 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 at which a data reception accuracy rate exceeds an accuracy rate threshold; the first mode is a transmission mode in which a transmission rate is greater than a first speed threshold;
[0008] receiving the target compensation parameter value sent by the second signal enhancement chip in a second mode; wherein the second mode is a transmission mode in which the transmission rate is less than a second speed threshold, and the first speed threshold is greater than the second speed threshold;
[0009] determining a final compensation parameter value from the target compensation parameter values;
[0010] The final compensation parameter value is sent 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.
[0011] In one possible implementation, before sending the USB test data packet to the second signal enhancement chip in the first mode, the method further includes:
[0012] 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;
[0013] If the verification result signal is correct, the first signal enhancement chip and the second signal enhancement chip are configured to switch to a first mode.
[0014] In one possible implementation, after sending the handshake signal to the second signal enhancement chip in the second mode, the method further includes:
[0015] Start the timer;
[0016] 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 amplification chip and the second signal amplification chip is abnormal.
[0017] In a possible implementation, 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:
[0018] 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 to the first configuration signal and switches to the first mode;
[0019] After receiving a response signal to the first configuration signal sent by the second signal enhancement chip according to the second mode, the first signal enhancement chip is configured to switch to the first mode.
[0020] In one possible implementation, sending a USB test data packet to the second signal enhancement chip in the 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 at which a data reception accuracy rate exceeds an accuracy rate threshold, includes:
[0021] 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 whose data reception accuracy exceeds the accuracy threshold.
[0022] In a possible implementation, the receiving, in the second mode, the target compensation parameter value sent by the second signal enhancement chip includes:
[0023] Target compensation parameter values corresponding to different target transmission parameters sent by the second signal enhancement chip are received in a second mode.
[0024] In a possible implementation, determining a final compensation parameter value from the target compensation parameter value includes:
[0025] Select any target sending parameter from target compensation parameter values corresponding to different target sending parameters;
[0026] The target transmission parameter value is determined as the final transmission parameter value, and the target compensation parameter value corresponding to the target transmission parameter value is determined as the final compensation parameter value.
[0027] In a second aspect, an embodiment of the present application provides a device for automatic compensation of universal serial bus (USB) transmission, the device being applied to a first signal enhancement chip, the device comprising:
[0028] a first sending unit, configured to send a USB test data packet to the second signal enhancement chip in 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 at which a data reception accuracy rate exceeds an accuracy rate threshold; the first mode being a transmission mode in which a transmission rate is greater than a first speed threshold;
[0029] a first receiving unit, configured to receive the target compensation parameter value sent by the second signal enhancement chip in a second mode; wherein the second mode is a transmission mode in which a transmission rate is less than a second speed threshold, and the first speed threshold is greater than the second speed threshold;
[0030] a first determining unit, configured to determine a final compensation parameter value from the target compensation parameter value;
[0031] The second sending unit is 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.
[0032] In a third aspect, an embodiment of the present application provides a device for automatic compensation of Universal Serial Bus (USB) transmission, comprising: a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, it implements a method for automatic compensation of USB transmission as described in any one of the above items.
[0033] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which instructions are stored. When the instructions are executed on a terminal device, the terminal device executes the method for automatic compensation of USB transmission as described in any one of the above items.
[0034] It can be seen that the embodiments of the present application have the following beneficial effects:
[0035] In the embodiment of the present application, the first signal enhancement chip sends a USB test data packet to the second signal enhancement chip in high-speed mode, and the second signal enhancement chip receives the USB test data packet according to different compensation parameter values. The target compensation parameter value whose reception accuracy exceeds the accuracy threshold is 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 value and synchronizes it to the second signal enhancement chip, and the second signal enhancement chip is configured to use the final compensation parameter value when receiving data. Through the above-mentioned customized communication process between the first signal enhancement chip and the second signal enhancement chip, the appropriate compensation parameter value can be adaptively determined. For wires of different lengths, or wires of the same length, the compensation parameter value can be adaptively determined during mass production or use to ensure that the wire works stably during USB transmission. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 This is a schematic diagram of the architecture of USB automatic compensation in an embodiment of the present application;
[0037] Figure 2 This is a signal communication diagram of USB automatic compensation in an embodiment of the present application;
[0038] Figure 3 A flowchart of a method for automatic compensation of USB transmission provided in an embodiment of the present application;
[0039] Figure 4 This is a schematic diagram of establishing a connection between a first signal enhancement chip and a second signal enhancement chip in an embodiment of the present application;
[0040] Figure 5 This is a schematic diagram of the automatic EQ process in an embodiment of the present application;
[0041] Figure 6A schematic diagram of a device for automatic compensation of USB transmission provided in an embodiment of the present application. DETAILED DESCRIPTION
[0042] In order to make the above-mentioned purposes, features and advantages of the embodiments of the present application more obvious and easy to understand, the embodiments of the present application are further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0043] In order to facilitate 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 below.
[0044] As a high-speed signal, the USB signal, according to the USB protocol, can only be transmitted over a distance of 5 meters without any signal amplification. However, in actual use, the length of USB cables often exceeds the 5-meter limit, sometimes reaching 40 meters or more.
[0045] To enhance signal driving capabilities, a USB signal booster chip is required to compensate for the USB signal and enable long-distance transmission of the USB signal. Existing USB signal extenders can be equipped with two USB signal booster chips, connected to the USB transmitter (HOST) and the USB receiver (DEV), respectively. A longer USB cable can be connected between the two USB signal booster chips, thereby enabling long-distance transmission of the USB signal through the USB signal extender. However, existing USB signal extenders typically configure fixed compensation parameter values for the USB signal booster chip, using a fixed EQ (equalization) method, which cannot adapt to USB cables of different lengths. Even for USB cables of the same length, some cables may not operate stably due to differences in cable attenuation impedance.
[0046] Because the USB protocol doesn't specify an automatic EQ method, it must be implemented using a proprietary protocol. Therefore, embodiments of the present application provide a method, apparatus, and device for automatic compensation in USB transmission, enabling customized communication for automatic EQ. Specifically, this method involves two phases: In the first phase, a connection is established between a first signal booster chip and a second signal booster chip via low-speed customized communication. In the second phase, appropriate compensation parameter values are determined using USB test data packets (i.e., USB-like data), and communication between the first and second signal booster chips is performed via low-speed customized communication to determine the final parameters. This automatic EQ technology can thus adapt to varying cable lengths, ensuring proper USB operation. It can also adapt to variations in cable attenuation impedance within the same cable length, ensuring proper USB operation.
[0047] In order to facilitate understanding of the USB transmission automatic compensation method provided by the embodiment of the present application, the following Figure 1-2 The example scenario shown is used for illustration.
[0048] The embodiments of the present application can be applied to a first signal-boosting chip in a USB signal extender. The USB signal extender can include a first signal-boosting chip and a second signal-boosting chip. The first signal-boosting chip can be any signal-boosting chip in the USB signal extender. For ease of explanation, in the subsequent embodiments, the first signal-boosting chip connected to the USB transmitter (HOST) and the second signal-boosting chip connected to the USB receiver (DEV) are used as examples.
[0049] See also Figure 1 As shown, this figure 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 realize automatic EQ through the custom communication in the embodiment of the present application to achieve USB signal enhancement and ensure that USB communication can work normally even when the line is long. In actual application, the connection between the HOST and port 1 (PORT1) of the first signal enhancement chip is a standard USB length connection (for example, a USB connection 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 connection, 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 connection greater than a preset length threshold), which requires signal enhancement. The first signal enhancement chip and the second signal enhancement chip can perform the custom communication in accordance with the embodiment of the present application to achieve USB automatic compensation.
[0050] See also Figure 2 As shown, this figure is a signal communication diagram of USB automatic compensation provided by an embodiment of the present application. Since USB is a half-duplex communication mode, at the port 2 (PORT2) end of the first signal enhancement chip, it is necessary to consider both enhancing the strength of the transmitted signal and compensating the strength of the received signal; the same is true at the port 2 (PORT2) end of the second signal enhancement chip. In actual use, in order to simplify the processing logic, the first signal enhancement chip and the second signal enhancement chip can use the same transmission parameters TX and the same reception parameters RX. Among them, the transmission parameters may include SW and PRE, SW refers to the signal amplitude parameter, PRE refers to the pre-emphasis parameter, and the reception parameters include the compensation parameter EQ, and EQ is an equalizer used to compensate for the high-frequency part of the received signal.
[0051] Those skilled in the art will understand that Figure 1-2The framework diagram shown is only an example in which the embodiments of the present application can be implemented. The scope of application of the embodiments of the present application is not limited by any aspect of the framework.
[0052] 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 is described below with reference to the accompanying drawings.
[0053] See also Figure 3 As shown in FIG, this figure is a flow chart of a method for automatic compensation of USB transmission provided by an embodiment of the present application, as shown in FIG. Figure 3 As shown, the method may include S301-S304:
[0054] S301: Sending a USB test data packet to a second signal enhancement chip in 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 at which a data reception accuracy rate exceeds an accuracy rate threshold. The first mode is a transmission mode in which a transmission rate is greater than a first speed threshold.
[0055] In the embodiment of the present application, low-speed signals have little attenuation when transmitted over long distances, so the connection between the first signal enhancement chip and the second signal enhancement chip can be established first through low-speed custom communication. For relevant instructions on this stage, please refer to the subsequent embodiments and will not be repeated here.
[0056] After the connection between the first and second signal boosting chips is established, USB-like communication can be performed, where the first signal boosting chip sends a USB test data packet to the second signal boosting chip according to a first mode. The first mode is a transmission mode with a transmission rate greater than a first speed threshold, i.e., high-speed mode. USB test data packets are sent in high-speed mode, matching the standard USB communication rate. The communication format of the USB test data packet meets the communication format of the USB signal and can be pre-defined fixed data.
[0057] The second signal enhancement chip traverses different compensation parameter values and receives USB test data packets according to different compensation parameter values. Since the USB test data packet is pre-agreed fixed data, the second signal enhancement chip can determine the data reception accuracy of each compensation parameter value, determine the target compensation parameter value whose data reception accuracy exceeds the accuracy threshold from each compensation parameter value, and record it. For example, the data reception accuracy of compensation parameter value 1 is 95%, the data reception accuracy of compensation parameter value 2 is 92%, and the data reception accuracy of compensation parameter value 3 is 88%. The accuracy threshold is 90%, then compensation parameter value 1 and compensation parameter value 2 are the target compensation parameter values. Among them, the accuracy threshold can be set according to actual conditions, and the embodiment of the present application does not limit the specific value of the accuracy threshold.
[0058] S302: Receive a target compensation parameter value sent by a second signal enhancement chip according to a second mode, wherein the second mode is a transmission mode in which the transmission rate is less than a second speed threshold, and the first speed threshold is greater than the second speed threshold.
[0059] After receiving the USB test data packets according to different compensation parameter values, the second signal enhancement chip can switch to a second mode to transmit the recorded target compensation parameter values. The second mode is a transmission mode with a transmission rate less than a second speed threshold, i.e., a low-speed mode, and the first speed threshold is greater than the second speed threshold to ensure stable transmission of the target compensation parameter values.
[0060] After sending the USB test data packet, the first signal boosting chip can also switch to the second mode to receive and record the target compensation parameter value sent by the second signal boosting chip. After receiving the target compensation parameter value, the first signal boosting chip can also reply to the second signal boosting chip via the second mode to confirm that the target compensation parameter value has been received.
[0061] S303: Determine a final compensation parameter value from the target compensation parameter value.
[0062] 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 where the data reception accuracy exceeds the accuracy threshold, the target compensation parameter value can be randomly selected or a target compensation parameter value with a middle value can be selected as the final compensation parameter value.
[0063] S304: Sending 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.
[0064] 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 through the second mode to confirm data, indicating that it has received the final compensation parameter value and is configured to use the final compensation parameter value for communication.
[0065] 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.
[0066] In the embodiment of the present application, the first signal enhancement chip sends a USB test data packet to the second signal enhancement chip in high-speed mode, and the second signal enhancement chip receives the USB test data packet according to different compensation parameter values. The target compensation parameter value whose reception accuracy exceeds the accuracy threshold is 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 value and synchronizes it to the second signal enhancement chip, and the second signal enhancement chip is configured to use the final compensation parameter value when receiving data. Through the above-mentioned customized communication process between the first signal enhancement chip and the second signal enhancement chip, the appropriate compensation parameter value can be adaptively determined. For wires of different lengths, or wires of the same length, the compensation parameter value can be adaptively determined during mass production or use to ensure that the wire works stably during USB transmission.
[0067] The following further describes the specific implementation process of establishing the connection between the first signal enhancement chip and the second signal enhancement chip.
[0068] In a possible implementation, before S301 sends the USB test data packet to the second signal enhancement chip in the first mode, the following steps may also be included:
[0069] A1: 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.
[0070] Low-speed signals experience minimal attenuation during long-distance transmission, making them suitable for use as handshake signals. The first signal booster chip sends a handshake signal to the second signal booster chip in the second mode via low-speed custom communication. This signal is used to confirm the physical connection between the first and second signal booster chips. In practical applications, the communication format, such as the communication header, communication data, and communication verification method, can be defined with reference to existing technologies. The second mode can operate at lower rates, such as 10Kbps (bits per second) and 9600bps. Furthermore, to enhance anti-interference capabilities, differential transmission can be achieved using DP (Data Positive) and DM (Data Minus).
[0071] The handshake signal can be pre-agreed fixed data. The second signal enhancement chip can then verify the handshake signal, generate a verification result signal for the handshake signal, and send the verification result signal to the first signal enhancement chip using the second mode. The verification result signal includes a result indicating whether the verification is correct. If correct, the verification result signal is correct; if incorrect, the verification result signal is abnormal.
[0072] 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.
[0073] 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 may be configured to switch to the first mode, and trigger execution of S301 .
[0074] In one possible implementation, if the verification result signal of A2 is correct, the specific implementation of configuring the first signal enhancement chip and the second signal enhancement chip to switch to the first mode may include:
[0075] 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 to the first configuration signal and switches to the first mode.
[0076] A22: After receiving a response signal to the first configuration signal sent by the second signal enhancement chip in the second mode, configure the first signal enhancement chip to switch to the first mode.
[0077] In actual use, if the verification result signal received by the first signal amplification chip is correct, the first signal amplification chip sends a first configuration signal to the second signal amplification chip via the low-speed second mode, configuring the second signal amplification chip to switch to the first mode. After receiving the first configuration signal, the second signal amplification chip first responds to the first configuration signal via the second mode before switching to the first mode. The first signal amplification chip also switches to the first mode after receiving the response signal to the first configuration signal.
[0078] The first signal enhancement chip and the second signal enhancement chip determine whether a connection can be established through low-speed custom communication, and switch to high-speed mode after the connection is established to achieve subsequent adaptive determination of compensation parameter values.
[0079] In a possible implementation, after A1 sends the handshake signal to the second signal enhancement chip according to the second mode, the following steps may also be included:
[0080] B1: Start the timer.
[0081] 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 amplification chip and the second signal amplification chip is abnormal.
[0082] After the first signal booster actively sends a handshake signal, it starts a timer to monitor whether the second signal booster's response has timed out. If the timer expires and no handshake verification result signal is received, or the verification result signal is abnormal, meaning the handshake fails, the first signal booster chip can determine that the connection between the first and second signal booster chips is abnormal and output an abnormality code, prompting a prompt to check the hardware connection.
[0083] See also Figure 4 FIG. 1 shows a schematic diagram of establishing a connection between the first signal enhancement chip and the second signal enhancement chip in the first stage, which may include:
[0084] 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, they are both in the second mode by default, and the first signal enhancement chip actively sends low-speed custom communication data, namely the handshake signal.
[0085] S402: The first signal enhancement chip starts a timer to monitor whether the second signal enhancement chip has timed out.
[0086] S403: The second signal amplification chip sends a verification result signal to the first signal amplification chip. Specifically, after receiving the handshake signal, the second signal amplification chip performs verification and analysis, generates a verification result signal indicating whether the verification has passed, and then sends the verification result signal indicating whether the verification has passed to the first signal amplification chip.
[0087] S404: If the first signal amplification chip fails to receive the verification result signal after the timer times out, or if the verification result signal is abnormal, the first signal amplification chip determines that the connection is abnormal. The first signal amplification chip may also reduce the communication rate, retransmit the handshake signal to the second signal amplification chip, and restart the timer for each transmission. If the timer still times out after multiple retransmissions, or if the verification result signal is abnormal, the physical connection between the first and second signal amplification chips is abnormal, and the first signal amplification chip is proactively reported as an abnormality, prompting a hardware connection check.
[0088] S405: When the verification result signal is correct, the first signal enhancement chip transmits a first configuration signal. The first signal enhancement chip may also transmit a handshake signal to the second signal enhancement chip again and restart the timer for each transmission. If the verification result signal remains correct after multiple retransmissions, the physical connection between the first signal enhancement chip and the second signal enhancement chip is deemed to be 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 may be transmitted to the second signal enhancement chip according to the second mode.
[0089] S406: The second signal enhancement chip switches to the first mode.
[0090] S407: The second signal enhancement chip sends a response signal of the first configuration signal to the first signal enhancement chip.
[0091] S408: The first signal enhancement chip switches to the first mode. That is, after receiving the response signal, the first signal enhancement chip is configured to switch to the first mode.
[0092] Thus, a connection between the first signal enhancement chip and the second signal enhancement chip is established, and the mode is switched to the first mode to prepare for subsequent automatic EQ.
[0093] During the second stage of automatic EQ in the embodiment of the present application, the sending parameters can also be determined.
[0094] In one possible implementation, S301 sends a USB test data packet to the second signal enhancement chip in 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 at which a data reception accuracy rate exceeds an accuracy rate threshold. Specific implementations may include:
[0095] According to the first mode, a USB test data packet is sent to the second signal enhancement chip using the target sending parameters, 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 whose data reception accuracy exceeds the accuracy threshold.
[0096] In a possible implementation, 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:
[0097] Target compensation parameter values corresponding to different target transmission parameters sent by the second signal enhancement chip are received according to the second mode.
[0098] In actual 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 embodiment of the present application, the transmission parameters include SW and PRE as an example for explanation, and the target transmission parameters are the values of any set of SW and PRE. The first signal enhancement chip initializes the transmission parameters to configure SW and PRE to the minimum value, and initializes the compensation parameters to configure the compensation parameters to the minimum value. Similarly, the second signal enhancement chip initializes the transmission parameters to configure SW and PRE to the minimum value.
[0099] The first signal booster chip first sends a USB test data packet using the initial transmission parameters as the target transmission parameters. The second signal booster chip cycles through the compensation parameter values and receives the USB test data packets. The target compensation parameter value whose data reception accuracy exceeds the accuracy threshold can be recorded. After the compensation parameter value scan is completed, the chip is configured to the second mode (low-speed mode) and all target compensation parameter values corresponding to the target transmission parameters are sent to the first signal booster chip. The first signal booster chip then switches to the second mode and receives all target compensation parameter values corresponding to the target transmission parameters.
[0100] After a delay, the first and second signal booster chips switch to the first mode. The first signal booster chip increases the transmission parameter by one level and re-sends the USB test data packet as the target transmission parameter. The second signal booster chip cycles through the compensation parameter values and receives the USB test data packets. The target compensation parameter value for which the data reception accuracy exceeds the accuracy threshold is recorded. After the compensation parameter value scan is complete, the chip switches to the second mode (low-speed mode) and sends all target compensation parameter values corresponding to the target transmission parameter to the first signal booster chip. The first signal booster chip then switches to the second mode and receives all target compensation parameter values corresponding to the target transmission parameter.
[0101] Similarly, the first signal enhancement chip sends a USB test data packet according to each target sending parameter to obtain a target compensation parameter value corresponding to each target sending parameter.
[0102] In a possible implementation, the specific implementation of determining the final compensation parameter value from the target compensation parameter value in S303 may include:
[0103] Select any target sending parameter from target compensation parameter values corresponding to different target sending parameters;
[0104] The target transmission parameter value is determined as the final transmission parameter value, and the target compensation parameter value corresponding to the target transmission parameter value is determined as the final compensation parameter value.
[0105] From the combination of the target transmission parameters and the target compensation parameter values received by the first signal enhancement chip, a set of target transmission parameters and corresponding target compensation parameter values can be determined as the final transmission parameter value and the final compensation parameter value, respectively. For example, the target transmission parameters and the corresponding target compensation parameter values can be randomly selected as the final transmission parameter value and the final compensation parameter value, respectively, or a 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.
[0106] See also Figure 5 , which shows a schematic diagram of the second stage automatic EQ process.
[0107] During this stage, the appropriate parameter configuration, including sending 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 customized low-speed communication.
[0108] The second stage of the automatic EQ process may include:
[0109] S501: The first signal enhancement chip switches to the first mode and initializes configuration parameters, that is, the first signal enhancement chip enters the high-speed automatic EQ stage, configures the sending parameter (SW+PRE) to the minimum value, and configures the compensation parameter (EQ) to the minimum value.
[0110] 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 parameters (SW+PRE) to the minimum value.
[0111] 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, and then switches to the second mode to wait for receiving a response packet from the second signal enhancement chip.
[0112] S504: The second signal enhancement chip cycles through the compensation parameters and determines a target compensation parameter value. Specifically, the chip cycles through the compensation parameter EQ values to receive USB test data packets. If the data reception accuracy of a particular EQ value exceeds the accuracy threshold, the chip determines that EQ value as the target compensation parameter value and records it. After all EQ values have been scanned, the chip enters the second mode.
[0113] S505: The second signal enhancement chip sends the target compensation parameter value to the first signal enhancement chip, that is, all target compensation parameter values are returned to the first signal enhancement chip through the second mode.
[0114] S506: The first signal booster chip records the currently suitable configuration combination and increases the transmission parameters (SW+PRE) by one level. This means that while configured in the second mode, the first signal booster chip receives a low-speed data packet and replies to the second signal booster chip with a low-speed data packet, indicating receipt. Simultaneously, the currently suitable configuration combination (SW+PRE and EQ) is recorded. If no suitable parameters exist, the data is not recorded. After a delay, the chip switches to the first mode and increases the transmission parameters (SW+PRE) by one level.
[0115] S507: The first signal enhancement chip sends a USB test data packet to the second signal enhancement chip.
[0116] S508: The second signal enhancement chip traverses the compensation parameters and determines the target compensation parameter value. Specifically, after receiving the low-speed data packet, the second signal enhancement chip switches to the first mode and continues to traverse the EQ values to receive the USB test data packet. If the data reception accuracy of a particular EQ value exceeds the accuracy threshold, the EQ value is determined as the target compensation parameter value and recorded. After all EQ values are scanned, the chip is configured to the second mode.
[0117] S509: The second signal enhancement chip sends the target compensation parameter value to the first signal enhancement chip, that is, all target compensation parameter values are returned to the first signal enhancement chip through the second mode.
[0118] S510: Repeat S506-S509 until all SW+PRE and EQ gear combinations are traversed. In this way, the first signal enhancement chip has recorded all appropriate SW+PRE and EQ gear combinations.
[0119] S511: If no suitable gear combination is found after traversing all SW+PRE and EQ gear combinations, an exception is reported. If a suitable gear combination is found, the final configuration is determined and set as the final configuration. If no suitable gear combination is found, an exception is reported, prompting a cable replacement test. If a suitable gear combination is found, the first signal enhancement chip selects the middle gear value among all suitable gear combinations as the final configuration (including the final transmission parameter values and the final compensation parameter values), and configures the first signal enhancement chip to the final configuration. Specifically, the transmission parameters are configured to the final transmission parameter values, and the compensation parameters are configured to the final compensation parameter values.
[0120] 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.
[0121] S513: The second signal booster chip receives the final configuration via the second mode and switches to normal USB communication. The second signal booster chip also sets the final transmission parameters and compensation parameters to their final values. After a slight delay, the second signal booster chip switches to normal USB communication.
[0122] S514: The second signal enhancement chip sends a configuration completion message to the first signal enhancement chip, that is, it replies with a low-speed data packet to the first signal enhancement chip, indicating that the configuration is complete and the device can switch to normal USB communication status.
[0123] S515: The first signal booster chip switches to normal USB communication mode. Upon receiving the low-speed data packet, the first signal booster chip also switches to normal USB communication mode. The USB then performs a normal handshake, and USB data transmission proceeds. The automatic EQ process is now complete, and normal USB transmission can resume.
[0124] In this embodiment, predefined USB test data packets are used to confirm appropriate parameter configurations, and low-speed custom communication is used to communicate between chips and transmit the final configuration parameters. Automatic EQ technology can adapt to different cable lengths to ensure proper USB operation. Automatic EQ technology can also adapt to differences in cable attenuation impedance during mass production or use within the same cable length to ensure proper USB operation.
[0125] 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, which will be described below with reference to the accompanying drawings.
[0126] See also Figure 6 As shown in FIG, this figure is a structural diagram of a device for automatic compensation of USB transmission provided by an embodiment of the present application. Figure 6 As shown, the USB transmission automatic compensation device can be applied to a first signal enhancement chip, and the device includes:
[0127] A first sending unit 601 is configured to send a USB test data packet to a second signal enhancement chip in 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 at which a data reception accuracy rate exceeds an accuracy rate threshold; the first mode is a transmission mode in which a transmission rate is greater than a first speed threshold;
[0128] a first receiving unit 602 configured to receive the target compensation parameter value sent by the second signal enhancement chip in a second mode; wherein the second mode is a transmission mode in which the transmission rate is less than a second speed threshold, and the first speed threshold is greater than the second speed threshold;
[0129] A first determining unit 603 is configured to determine a final compensation parameter value from the target compensation parameter value;
[0130] The second sending unit 604 is 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.
[0131] In a possible implementation, the apparatus further includes:
[0132] a third sending unit, configured to send a handshake signal to the second signal enhancement chip in a second mode before sending the USB test data packet to the second signal enhancement chip in a first mode;
[0133] a second receiving unit, configured to receive, in accordance with the second mode, a verification result signal of the handshake signal sent by the second signal enhancement chip;
[0134] A configuration unit is configured to configure the first signal enhancement chip and the second signal enhancement chip to switch to a first mode if the verification result signal is correct.
[0135] In a possible implementation, the apparatus further includes:
[0136] a starting unit, configured to start a timer after sending a handshake signal to the second signal enhancement chip in accordance with the second mode;
[0137] The second determining unit is configured to determine that the connection between the first signal amplifying chip and the second signal amplifying chip is abnormal if no verification result signal of the handshake signal is received after the timer times out, or if the verification result signal is abnormal.
[0138] In a possible implementation, the configuration unit is specifically configured to:
[0139] 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 to the first configuration signal and switches to the first mode;
[0140] After receiving a response signal to the first configuration signal sent by the second signal enhancement chip according to the second mode, the first signal enhancement chip is configured to switch to the first mode.
[0141] In a possible implementation manner, the first sending unit is specifically configured to:
[0142] 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 whose data reception accuracy exceeds the accuracy threshold.
[0143] In a possible implementation, the first receiving unit is specifically configured to:
[0144] Target compensation parameter values corresponding to different target transmission parameters sent by the second signal enhancement chip are received in a second mode.
[0145] In a possible implementation manner, the first determining unit is specifically configured to:
[0146] Select any target sending parameter from target compensation parameter values corresponding to different target sending parameters;
[0147] The target transmission parameter value is determined as the final transmission parameter value, and the target compensation parameter value corresponding to the target transmission parameter value is determined as the final compensation parameter value.
[0148] In addition, an embodiment of the present application also provides a device for automatic compensation of USB transmission, including: a memory, a processor, and a computer program stored in the memory and runnable on the processor. When the processor executes the computer program, it implements the method for automatic compensation of USB transmission as described in any one of the above items.
[0149] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions. When the instructions are executed on a terminal device, the terminal device executes the method for automatic compensation of USB transmission as described in any one of the above items.
[0150] An embodiment of the present application further provides a computer program product, including computer program instructions. When the computer program instructions are executed on a computer, the computer executes the method for automatic USB transmission compensation as described in any one of the above items.
[0151] In the embodiment of the present application, the first signal enhancement chip sends a USB test data packet to the second signal enhancement chip in high-speed mode, and the second signal enhancement chip receives the USB test data packet according to different compensation parameter values. The target compensation parameter value whose reception accuracy exceeds the accuracy threshold is 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 value and synchronizes it to the second signal enhancement chip, and the second signal enhancement chip is configured to use the final compensation parameter value when receiving data. Through the above-mentioned customized communication process between the first signal enhancement chip and the second signal enhancement chip, the appropriate compensation parameter value can be adaptively determined. For wires of different lengths, or wires of the same length, the compensation parameter value can be adaptively determined during mass production or use to ensure that the wire works stably during USB transmission.
[0152] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Reference can be made to the common and similar parts between the various embodiments. For the systems or devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method description.
[0153] It should be understood that in this application, "at least one (item)" means one or more, and "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 A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or plural.
[0154] It should also be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are 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 explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.
[0155] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0156] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present application. Various modifications to these embodiments will be readily apparent to one 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. Therefore, the present application is not limited to the embodiments shown herein, but is intended to conform to 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 includes: Sending a USB test data packet to the second signal enhancement chip in 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 at which a data reception accuracy rate exceeds an accuracy rate threshold; the first mode is a transmission mode in which a transmission rate is greater than a first speed threshold; receiving the target compensation parameter value sent by the second signal enhancement chip in a second mode; wherein the second mode is a transmission mode in which the transmission rate is 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; The final compensation parameter value is sent 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.
2. The method according to claim 1, characterized in that Before sending the USB test data packet to the second signal enhancement chip in 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, the first signal enhancement chip and the second signal enhancement chip are configured to switch to a first mode.
3. The method according to claim 2, characterized in that After sending the handshake signal to the second signal enhancement chip in the second mode, the method further includes: Start the 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, it is determined that the connection between the first signal amplification chip and the second signal amplification chip is abnormal.
4. The method according to claim 2, characterized in that 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 to the first configuration signal and switches to the first mode; After receiving a response signal to the first configuration signal sent by the second signal enhancement chip according to the second mode, the first signal enhancement chip is configured to switch to the first mode.
5. The method according to claim 1, wherein The sending of the 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 a target compensation parameter value at which a data reception accuracy rate exceeds an accuracy rate threshold, includes: According to the first mode, a USB test data packet is sent to the second signal enhancement chip 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 the target compensation parameter value corresponding to the target sending parameter whose data reception accuracy exceeds the accuracy threshold; the target sending parameters include the values of any group of signal amplitude parameters and pre-emphasis parameters.
6. The method according to claim 5, characterized in that The receiving, in the second mode, the target compensation parameter value sent by the second signal enhancement chip includes: Target compensation parameter values corresponding to different target transmission parameters sent by the second signal enhancement chip are received in a second mode.
7. The method according to claim 5, characterized in that Determining a final compensation parameter value from the target compensation parameter value includes: Select any target sending parameter from target compensation parameter values corresponding to different target sending parameters; The target transmission parameter value is determined as the final transmission parameter value, and the target compensation parameter value corresponding to the target transmission parameter value is determined as the final compensation parameter value.
8. A device for automatic compensation of Universal Serial Bus (USB) transmission, characterized in that: The device is applied to a first signal enhancement chip, and includes: a first sending unit, configured to send a USB test data packet to a second signal enhancement chip in 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 at which a data reception accuracy rate exceeds an accuracy rate threshold; wherein a transmission rate in 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 in a second mode; wherein a 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 value; The second sending unit is 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.
9. A device for automatic compensation of Universal Serial Bus (USB) transmission, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for automatic compensation of USB transmission according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores instructions, and when the instructions are executed on the terminal device, the terminal device executes the method for automatic compensation of USB transmission according to any one of claims 1 to 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