USB 控制传输是否保证交付? [英] Do USB Control Transfers guarantee delivery?

查看:29
本文介绍了USB 控制传输是否保证交付?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

USB 2.0 指定 4 种传输类型(在 5.4 传输类型部分):

USB 2.0 specifies 4 types of transfers (in section 5.4 Transfer Types):

  • 控制转移
  • 同步传输
  • 中断传输
  • 批量传输

第 5.8 节说批量传输提供:

Section 5.8 says that Bulk Transfers provide:

  • 在带宽可用的基础上访问 USB
  • 重试传输,以防偶尔因总线错误而导致传输失败
  • 保证数据交付,但不保证带宽或延迟
  • Access to the USB on a bandwidth-available basis
  • Retry of transfers, in the case of occasional delivery failure due to errors on the bus
  • Guaranteed delivery of data but no guarantee of bandwidth or latency

(强调我的.)

我没有看到类似的控制传输声明.他们也保证交货吗?如果没有,希望用户如何处理故障?

I don't see a similar statement for Control Transfers. Do they also guarantee delivery? If not, how are users expected to handle failures?

请提供引文以支持您的回答.

Please provide a citation(s) to support your answer.

推荐答案

USB 规范为控制传输提供了强大的错误检测和恢复.控制传输要么完成,要么 USB 主机知道它失败了,我认为这就是保证交付"的意思.这很重要,因为控制传输用于在您将其插入计算机时设置设备,并且它们还被各种 USB 设备类用于许多重要目的(例如,它们用于设置串行端口的波特率)USB CDC ACM 设备).

The USB specification provides robust error detection and recovery for control transfers. The control transfer will either be completed or the USB host will know that it failed, and I think that's what "guaranteed delivery" is supposed to mean. This is important because control transfers are used to set up the device when you plug it into a computer and they are also used for many important purposes by the various USB device classes (e.g. they are used to set the baud rate of a serial port on a USB CDC ACM device).

来自 USB 2.0 规范的第 5.5.5 节:

From section 5.5.5 of the USB 2.0 specification:

USB 为控制传输期间发生的错误提供强大的错误检测和恢复/重传.发射器和接收器可以在控制传输中的位置保持同步,并以最小的努力恢复.接收器可以通过数据包中的数据重试指示器来检测数据和状态数据包的重传.发送器可以通过握手中返回的信息可靠地确定其相应的接收器已成功接受发送的数据包.该协议允许将重传的数据包与其原始数据包区分开来,控制设置数据包除外.由于传输错误,可能会重新传输设置数据包;但是,Setup 数据包不能指示数据包是原始传输还是重试传输.

The USB provides robust error detection and recovery/retransmission for errors that occur during control transfers. Transmitters and receivers can remain synchronized with regard to where they are in a control transfer and recover with minimum effort. Retransmission of Data and Status packets can be detected by a receiver via data retry indicators in the packet. A transmitter can reliably determine that its corresponding receiver has successfully accepted a transmitted packet by information returned in a handshake to the packet. The protocol allows for distinguishing a retransmitted packet from its original packet except for a control Setup packet. Setup packets may be retransmitted due to a transmission error; however, Setup packets cannot indicate that a packet is an original or a retried transmission.

唯一没有保证交付的传输类型是等时传输.此外,帧起始 (SOF) 数据包无法保证交付.

The only transfer type without guaranteed delivery is isochronous. Also, the start of frame (SOF) packets don't have guaranteed delivery.

这篇关于USB 控制传输是否保证交付?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆