USB data packet transmission method and USB transmission system

By defining multiple interrupt upload endpoints on the USB device side and reassembling the data stream sequentially on the host side, the problem of insufficient real-time performance in USB data packet transmission is solved, achieving a higher data refresh rate and shorter response time, which is suitable for industrial control and consumer electronics devices.

WO2026233372A1PCT designated stage Publication Date: 2026-11-12NANJING QINHENG MICROELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2026/095221
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2025-05-09
Filing Date
2026-05-07
Publication Date
2026-11-12

AI Technical Summary

Technical Problem

Existing USB data packet transmissions are inadequate in terms of real-time performance and refresh rate, especially in industrial control and consumer electronics, where they struggle to meet the demands for fast response and high data refresh rates.

Method used

Multiple interrupt upload endpoints are defined on the USB device side and configured as notification-type interrupt upload endpoints. Corresponding pipes are established on the host side. By detecting that the endpoint data is ready at a specified time point within a microframe, the host is asynchronously notified to transmit data packets. The host side reassembles the received data packets into the target data stream in order.

Benefits of technology

It improves the response time of USB interrupted transmission, increases the data refresh rate by N times, maintains the reliability of transmission, and shortens the response time without consuming too much bus bandwidth, making it suitable for devices with periodic query characteristics.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2026095221_12112026_PF_FP_ABST
    Figure CN2026095221_12112026_PF_FP_ABST
Patent Text Reader

Abstract

A USB data packet transmission method and a USB transmission system. N interrupt upload endpoints are defined for transmitting a target data stream, wherein N is a positive integer greater than or equal to 2, and at least N-1 interrupt upload endpoints are configured as notification-type interrupt upload endpoints; each notification-type interrupt upload endpoint waits for activation of a valid event, wherein the valid event includes endpoint data of the notification-type interrupt upload endpoint being ready, and the endpoint data is from the target data stream; when a valid event corresponding to a certain notification-type interrupt upload endpoint is activated, the notification-type interrupt upload endpoint sequentially executes: sending an ERDY transaction packet to a host, receiving, from the host, a request ACK transaction packet for initiating an upload, returning a data packet to the host, and receiving, from the host, a response ACK transaction packet for the data packet; and a host-side module reassembles, in order, data packets received from all pipes into the target data stream. The method can improve the real-time performance of USB data packet transmission and improve the refresh rate.
Need to check novelty before this filing date? Find Prior Art

Description

A USB data packet transmission method and USB transmission system Technical Field

[0001] This invention belongs to the field of USB communication technology, and particularly relates to a USB data packet transmission method and a USB transmission system. Background Technology

[0002] USB communication is widely used, but the real-time performance of USB data packet transmission is relatively weak. According to the USB specification, USB Bulk transmission cannot guarantee bus bandwidth and real-time performance, USB Isochronous transmission is more real-time but lacks acknowledgment and retransmission mechanisms, so it cannot guarantee reliability, while USB Interrupt transmission can balance real-time performance and reliability.

[0003] In existing technologies, USB interrupt transfers have high bandwidth priority. High-speed USB and Ultra-high-speed USB prioritize high-priority transfers such as USB interrupt transfers after each microframe (125μs) begins, with the remaining time within the microframe used for USB bulk transfers. However, USB interrupt transfers can only transmit a maximum of one data packet per microframe. Even with high-bandwidth transfers, a maximum of three data packets can be uploaded at once within a microframe, but these three packets must be transmitted consecutively and are usually concentrated at the beginning of the microframe. Therefore, the response time of USB interrupt transfers is limited by the duration of the microframe. In other words, the real-time performance of USB interrupt transmission is limited by the granularity of a frame. Specifically, full-speed USB has a frame interval of 1ms, so the response time that interrupt transmission can guarantee is 1ms; high-speed USB has a micro-frame interval of 125μs, and the bus interval (equivalent to the micro-frame of high-speed USB, which will be referred to as micro-frame in this article) of ultra-high-speed USB (USB 3.x and above) is also 125μs. Therefore, the response time that high-speed and ultra-high-speed USB interrupt transmission can guarantee is 125μs. That is to say, if an interrupt data packet cannot be transmitted in time within the current micro-frame, it can only wait for the next micro-frame.

[0004] In the field of industrial control, a response time of 125μs is not conducive to rapid real-time response to external events and timely processing; in the field of consumer electronics, a response time of 125μs is equivalent to a data refresh rate of 8KHz, which is difficult to meet the data refresh requirements of 16kHz or higher. Summary of the Invention

[0005] Purpose of the invention: In order to solve the problems of weak real-time performance and low refresh rate of USB data packet transmission in the prior art, the present invention provides a USB data packet transmission method and a USB transmission system.

[0006] Technical solution: A USB data packet transmission method, comprising the following steps:

[0007] The USB device-side chip defines N interrupt upload endpoints for transmitting the target data stream, where N is a positive integer ≥ 2, and at least N-1 interrupt upload endpoints are configured as notification interrupt upload endpoints;

[0008] The host-side module establishes N pipes;

[0009] Each notification interrupt upload endpoint of the USB device chip waits for a valid event to be activated, the valid event including endpoint data ready for the notification interrupt upload endpoint, the endpoint data coming from the target data stream;

[0010] When a valid event corresponding to a notification-type interrupt upload endpoint is activated, the notification-type interrupt upload endpoint executes the following sequentially through the pipeline: sending an ERDY transaction packet to the host, receiving an ACK transaction packet from the host to request the upload, returning a data packet to the host, and receiving an ACK transaction packet from the host in response to the data packet.

[0011] The host module reassembles the data packets received through all pipes into the target data stream in sequence.

[0012] Furthermore, the valid event is the detection of endpoint data readiness at a specified time point within the microframe.

[0013] Furthermore, a microframe is divided into N equal time periods, with the starting point of each time period starting from at least the second time period being the specified time point.

[0014] Furthermore, each time period uniquely corresponds to an interrupted upload endpoint, and each specified time point starting from the second time period uniquely corresponds to a notification-type interrupted upload endpoint.

[0015] Furthermore, the valid event is the real-time detection of a request that requires the device to upload data and the endpoint data being ready.

[0016] Furthermore, the host module reassembles the received data packets from all interrupted upload endpoints into the target data stream according to the actual arrival order of each data packet.

[0017] Furthermore, the host module reassembles the data packets received from all interrupted upload endpoints into the target data stream according to the chronological order of the time periods within the microframe.

[0018] Furthermore, among the N interrupted upload endpoints, there is one non-notification interrupted upload endpoint. At the start of a microframe, the non-notification interrupted upload endpoint receives an ACK transaction packet from the host initiating an upload request. If the data of the non-notification interrupted upload endpoint is ready, it returns a data packet to the host and then receives an ACK transaction packet from the host in response to the data packet.

[0019] Furthermore, after the pipeline is established, the host module pre-sets at least two USB upload requests to the host transaction queue for each interrupted upload endpoint, waiting for the USB device to upload data;

[0020] After each interrupted upload endpoint completes an upload transaction, the host module reconstructs a USB upload request and adds it to the host transaction queue.

[0021] A USB transmission system includes a USB device-side chip and a USB host-side module. The USB device-side chip includes N interrupt upload endpoints for transmitting a target data stream, where N is a positive integer ≥ 2. At least N-1 interrupt upload endpoints are configured as notification-type interrupt upload endpoints. The notification-type interrupt upload endpoints are used to sequentially execute the following actions after a valid event is activated: sending an ERDY transaction packet to the host, receiving an ACK transaction packet from the host requesting an upload, returning a data packet to the host, and receiving an ACK transaction packet from the host responding to the data packet. The valid event includes the endpoint data being ready for the notification-type interrupt upload endpoint, where the endpoint data originates from the target data stream.

[0022] The USB host module is a program product or hardware module installed on the host computer, used to reassemble received data packets from all interrupted upload endpoints into the target data stream in sequence.

[0023] Furthermore, the USB device-side chip also includes a USB microframe interval timer, which is used to determine a specified time point within each microframe and to determine whether a valid event is activated at the specified time point.

[0024] Compared with the prior art, the USB data packet transmission method and USB transmission system provided by the present invention have at least the following beneficial effects:

[0025] (1) Set multiple event detection at specified time points within a microframe of the ultra-high-speed USB and upload data packets periodically; break the one-to-one convention and use N USB interrupt upload endpoints on the USB device side to upload real-time data of the same target data stream in time-division. On the USB host side, the data of multiple USB pipes are sequentially aggregated into the same data stream, so that the response time guaranteed by the global USB interrupt transmission is shortened to 1 / N of the original response time (125μs), thereby increasing the data refresh rate by N times.

[0026] (2) Real-time detection of device data upload requests and asynchronous notification of USB host to transmit via ERDY transaction packets; thus the response time of USB interrupt transmission is determined by the interaction process and duration of the ultra-high-speed USB transaction packets and data packets, thereby generally improving the real-time performance of USB interrupt upload data packets to the level of several μs.

[0027] (3) It inherits the reliability of conventional USB interrupt transmission and shortens the response time without occupying too much USB bus bandwidth.

[0028] (4) By distributing the specified time points relatively evenly within the microframe, the effect of uniform transmission can be further achieved, which is especially suitable for some devices with periodic query characteristics, such as high-speed HID devices.

[0029] (5) The entire implementation method is simple. The target data stream does not need to be parsed during transmission, and the transmitted data packets do not need to be numbered, which can achieve the effect of data pass-through. Attached Figure Description

[0030] Figure 1 is a schematic diagram of the USB data packet transmission process in Embodiment 1;

[0031] Figure 2 is a schematic diagram of the USB data packet transmission process in Embodiment 2;

[0032] Figure 3 is a schematic diagram of the USB data packet transmission process in Example 3. Detailed Implementation

[0033] The present invention will be further explained and described below with reference to the accompanying drawings and specific embodiments. Example

[0034] A USB data packet transmission method, as shown in Figure 1, includes the following steps:

[0035] The USB device-side chip defines N interrupt upload (IN) endpoints for transmitting the target data stream, where N is a positive integer ≥ 2. At least N-1 interrupt upload endpoints are configured as notification interrupt upload endpoints. For example, in this embodiment there are 3 interrupt upload endpoints, and all three interrupt upload endpoints are notification interrupt upload endpoints.

[0036] The host module establishes N pipelines; after the pipelines are established, the host module pre-sets at least two USB upload requests to the host transaction queue for each interrupted upload endpoint, waiting for the USB device chip to upload the ERDY transaction packet;

[0037] Each notification-type interrupt upload endpoint of the USB device chip waits for a valid event to be activated. The valid event is the detection of endpoint data readiness at a specified time point within a microframe. The endpoint data comes from the target data stream.

[0038] When a valid event corresponding to a notification interrupt upload endpoint is activated, the notification interrupt upload endpoint executes the following sequentially through the pipeline: sending an ERDY transaction packet to the host, receiving an ACK transaction packet (ACK TP) requesting the host to initiate an upload, returning a data packet (DP) to the host, and receiving an ACK transaction packet from the host in response to the data packet;

[0039] After each interrupted upload endpoint completes an upload transaction, the host module reconstructs a USB upload request and adds it to the host transaction queue to ensure that each interrupted upload endpoint has at least two USB upload requests stored in the host transaction queue.

[0040] The host will reassemble the data packets received through all the pipes into the target data stream in sequence.

[0041] Preferably, the interrupt polling time interval of the USB interrupt upload endpoint is configured to a minimum value of 1. Preferably, BELT is set to the minimum value allowed by the USB specification via the LTM packet to improve response speed.

[0042] Preferably, the maximum packet length of each USB interrupt endpoint is set to the minimum value that meets application requirements, so as to improve the efficiency of USB bus bandwidth.

[0043] As shown in Figure 1, T0 to T0+t represents a microframe. A microframe is divided into three equal time periods, each starting at a designated time point. The thick arrows on the left side of Figure 1 indicate these designated time points: T0, T0+1 / 3*t, and T0+2 / 3*t are the designated time points within that microframe, and T0+t is the first designated time point of the next microframe. The actual designated time points can be slightly adjusted or arbitrarily specified based on the bus bandwidth characteristics within the microframe, where the beginning is busier and the end is less busy; they are not necessarily evenly distributed. At each designated time point, it is checked whether the endpoint data is ready. If the endpoint data is ready, an interrupt is activated. As shown in Figure 1, at the second designated time point within this microframe, interrupt data readiness is detected, and the USB device chip and the host module execute subsequent interaction steps through a pipe.

[0044] In theory, there is no need for a one-to-one correspondence between each specified time point and each interrupt upload endpoint. In Figure 1, each of the N USB interrupt upload endpoints waits for a valid event to activate. Preferably, a time period uniquely corresponds to one USB interrupt upload endpoint. At a specified time point, if the data is ready, the USB interrupt upload endpoint corresponding to that specified time point sends an ERDY transaction packet and transmits the data packet.

[0045] On the USB host side, data packets received from all interrupted upload endpoints are reassembled into the target data stream in a fixed order according to the time segments within a microframe, using software or specialized hardware. For example, data packets from interrupted upload endpoints corresponding to the first time segment within a microframe are first on the host side; data packets from interrupted upload endpoints corresponding to the second time segment within a microframe are second on the host side. However, if an endpoint corresponding to the first time segment has no data, it is first on the host side. This reassembly scheme is suitable for situations where there is a one-to-one correspondence between specified time points and interrupted upload endpoints. Alternatively, data packets received from all interrupted upload endpoints can be directly reassembled into the target data stream according to the actual arrival order of each data packet. That is, the device side can dynamically allocate available endpoints, rather than matching a fixed interrupted upload endpoint for each specified time point. The host side does not need to care which endpoint is used for transmission; the important thing is timely uploading.

[0046] For even more precise timing, the USB device chip can locate multiple time periods based on the synchronization timestamp packet ITP and correction parameters or even PTM.

[0047] A USB transmission system includes a USB device-side chip and a host-side module. The USB device-side chip includes N interrupt upload endpoints for transmitting a target data stream, where N is a positive integer ≥ 2. At least N-1 interrupt upload endpoints are configured as notification-type interrupt upload endpoints. For example, in this embodiment, the USB device-side chip has three interrupt upload endpoints, all of which are notification-type interrupt upload endpoints. The notification-type interrupt upload endpoints are used to sequentially execute the following actions after a valid event is activated: sending an ERDY transaction packet to the host, receiving an ACK transaction packet from the host requesting an upload, returning a data packet to the host, and receiving an ACK transaction packet from the host responding to the data packet. The valid event includes the endpoint data being ready for the notification-type interrupt upload endpoint, and the endpoint data originating from the target data stream.

[0048] The USB host module is a program product or hardware module installed on the host computer, used to reassemble received data packets from all interrupted upload endpoints into a target data stream in sequence. The program product includes a computer program that, when executed by the host processor, performs the above functions.

[0049] In order to accurately determine each specified time point and detect whether the endpoint data is ready at the specified time point, the USB device chip also needs to include a USB microframe interval timer to determine the specified time point within each microframe and determine whether a valid event is activated at the specified time point.

[0050] In existing technologies, USB interrupt transmissions have a high bandwidth priority. High-speed USB and Ultra-high-speed USB prioritize high-priority transmissions such as USB interrupt transmissions after each microframe (125μs) begins, with the remaining time within the microframe used for USB bulk transmissions. However, USB interrupt transmissions can only transmit a maximum of one data packet per microframe, and this packet is typically concentrated at the beginning of the microframe. Therefore, the response time of USB interrupt transmissions is limited by the duration of the microframe.

[0051] In this embodiment, three interrupt upload (IN) endpoints are configured on the USB device chip, all of which are notification-type interrupt upload endpoints. Each notification-type interrupt upload endpoint waits for a valid event to activate. When the corresponding valid event is activated, the notification-type interrupt upload endpoint sends an ERDY transaction packet, the host sends an ACK request transaction packet, the notification-type interrupt upload endpoint returns a data packet, and the host sends an ACK response transaction packet for the data packet. On the USB host side, the data packets from each interrupt upload endpoint are sequentially aggregated into the same target data stream. In contrast, conventional designs correspond to one USB endpoint to one USB pipe, corresponding to one functional data stream. This embodiment breaks with convention, including multiple USB interrupt upload endpoints in hardware, establishing multiple USB pipes logically, and aggregating the data from multiple USB pipes into the same target data stream on the USB host side in software. When real-time data is ready, if it misses a specified time point, asynchronous transmission of a USB interrupt upload endpoint will be triggered at the next specified time point. That is, the response time is the interval between two specified time points. For the case where the specified time points are evenly distributed within a microframe, the response time is equivalent to one-Nth of the microframe duration. Example

[0052] The difference between Embodiment 2 and Embodiment 1 is that the three interrupt upload endpoints of the USB device-side chip in Embodiment 2 include one non-notification interrupt upload endpoint and two notification interrupt upload endpoints. As shown in Figure 2, the beginning of the first time period of a microframe corresponds to the non-notification interrupt upload endpoint, and the beginning of the second and third time periods each correspond to one notification interrupt upload endpoint. At the beginning of a microframe, the non-notification interrupt upload endpoint receives an ACK transaction packet from the host initiating an upload request. If the data of the non-notification interrupt upload endpoint is ready, it returns a data packet to the host and then receives an ACK transaction packet from the host in response to the data packet. If the data of the non-notification interrupt upload endpoint is not ready, it can return a transaction packet to the host containing information indicating no data, which can be agreed upon in advance with the host (such as a zero-length packet), or send an NRDY transaction packet to the host, but it needs to send an ERDY transaction packet in a timely manner to recover. In other words, the endpoint corresponding to the beginning of the first time period of N time periods within a microframe can be either a notification-type interrupt upload endpoint initiated asynchronously by the device, or a traditional non-notification-type interrupt upload endpoint initiated actively by the host after the start of a new microframe, because non-notification-type interrupt upload endpoints are concentrated in the beginning time of the microframe interval for transmission by default.

[0053] At the beginning of the third time period T0+2 / 3*t, endpoint data readiness is detected. The notification interrupt upload endpoint sends an ERDY transaction packet to the host. The host initiates the upload by requesting an ACK transaction packet. The endpoint returns a data packet, and the host sends an ACK transaction packet in response to the data packet.

[0054] As can be seen from Figure 2, the second and third time periods take up one more ERDY time compared to the first time period. Therefore, the actual designated time points can be slightly adjusted to offset these differences. Example

[0055] The difference between Example 3 and Example 1 or Example 2 is that Example 3 does not specify a fixed time point for detection. Instead, it activates the interrupt when a request for device data upload is detected in real time and the endpoint data is ready. As shown in Figure 3, when a request for device data upload is detected at points T1 and T2 and the endpoint data is ready, the notification-type interrupt upload endpoint sends an ERDY transaction packet to the host. The host sends a request ACK transaction packet, the endpoint returns a data packet, and the host sends an ACK transaction packet in response to the data packet.

[0056] The advantage of this embodiment is that data is sent as soon as it arrives, resulting in stronger real-time performance. The disadvantage is that a sufficient number of endpoints are needed to guarantee the real-time performance of the next adjacent data; otherwise, no endpoints will be available for the next data transmission. This method is more suitable if the data is sporadic and does not occur consecutively.

Claims

1. A USB data packet transmission method, characterized in that, Includes the following steps: The USB device-side chip defines N interrupt upload endpoints for transmitting the target data stream, where N is a positive integer ≥ 2, and at least N-1 interrupt upload endpoints are configured as notification interrupt upload endpoints; The host-side module establishes N pipes; Each notification interrupt upload endpoint of the USB device chip waits for a valid event to be activated, the valid event including endpoint data ready for the notification interrupt upload endpoint, the endpoint data coming from the target data stream; When a valid event corresponding to a notification-type interrupt upload endpoint is activated, the notification-type interrupt upload endpoint executes the following sequentially through the pipeline: sending an ERDY transaction packet to the host, receiving an ACK transaction packet from the host to request the upload, returning a data packet to the host, and receiving an ACK transaction packet from the host in response to the data packet. The host module reassembles the data packets received through all pipes into the target data stream in sequence.

2. The USB data packet transmission method according to claim 1, characterized in that, The valid event is the detection of endpoint data readiness at a specified time point within a microframe.

3. The USB data packet transmission method according to claim 2, characterized in that, A microframe is divided into N equal time periods, with the starting point of each time period starting from at least the second time period being the specified time point.

4. The USB data packet transmission method according to claim 3, characterized in that, Each time period uniquely corresponds to one interrupted upload endpoint, and each specified time point starting from the second time period uniquely corresponds to one notification-type interrupted upload endpoint.

5. The USB data packet transmission method according to claim 1, characterized in that, The valid event is the real-time detection of a request that requires the device to upload data and the endpoint data being ready.

6. The USB data packet transmission method according to any one of claims 1 to 5, characterized in that, The host module reassembles the received data packets from all interrupted upload endpoints into the target data stream according to the actual arrival order of each data packet.

7. The USB data packet transmission method according to claim 4, characterized in that, The host module reassembles the data packets received from all interrupted upload endpoints into the target data stream according to the chronological order of the time periods within the microframe.

8. The USB data packet transmission method according to any one of claims 1 to 5, characterized in that, Among the N interrupted upload endpoints, there is one non-notification interrupted upload endpoint. At the start of a microframe, the non-notification interrupted upload endpoint receives an ACK transaction packet from the host to request an upload. If the data of the non-notification interrupted upload endpoint is ready, it returns a data packet to the host and then receives an ACK transaction packet from the host in response to the data packet.

9. The USB data packet transmission method according to any one of claims 1 to 5, characterized in that, After the pipeline is established, the host module pre-sets at least two USB upload requests to the host transaction queue for each interrupted upload endpoint, waiting for the USB device to upload data; After each interrupted upload endpoint completes an upload transaction, the host module reconstructs a USB upload request and adds it to the host transaction queue.

10. A USB transmission system, characterized in that, It includes a USB device-side chip and a USB host-side module. The USB device-side chip contains N interrupt upload endpoints for transmitting target data streams, where N is a positive integer ≥ 2, and at least N-1 interrupt upload endpoints are configured as notification interrupt upload endpoints. The notification-type interrupted upload endpoint is used to perform the following sequentially after a valid event is activated: sending an ERDY transaction packet to the host, receiving an ACK transaction packet from the host to request an upload, returning a data packet to the host, and receiving an ACK transaction packet from the host in response to the data packet; the valid event includes the endpoint data being ready for the notification-type interrupted upload endpoint, and the endpoint data coming from the target data stream; The USB host module is a program product or hardware module installed on the host computer, used to reassemble received data packets from all interrupted upload endpoints into the target data stream in sequence.

11. The USB transmission system according to claim 10, characterized in that, The USB device-side chip also includes a USB microframe interval timer, which is used to determine a specified time point within each microframe and to determine whether a valid event is activated at that specified time point.