基于OHCI的USB主机 —— OHCI(TD结构说明)-阿里云开发者社区

开发者社区> 余二五> 正文

基于OHCI的USB主机 —— OHCI(TD结构说明)

简介:
+关注继续查看
Name
HC
Access
Description
R
R
bufferRounding
If this bit is 0, then the last data packet to a TD from an endpoint must exactly fill the defined data buffer.  If the bit is 1, then the last data packet may be smaller than the defined buffer without causing an error condition on the TD.
DP
R
Direction/PID
This 2-bit field indicates the direction of data flow and the PID to be used for the token. This field is only relevant to the HC if the D field in the ED was set to 00b or 11b indicating that the PID determination is deferred to the TD. The encoding of the bits within the byte for this field are:
 
 
Code
PID Type
Data Direction
 
 
 
 
00b
SETUP
to endpoint
 
 
01b
OUT
to endpoint
 
 
10b
IN
from endpoint
 
 
11b
Reserved
 
 
 
 
 
DI
R
DelayInterrupt
This field contains the interrupt delay count for this TD.  When a TD is complete the HC may wait for DelayInterrupt frames before generating an interrupt. If DelayInterrupt is 111b, then there is no interrupt associated with completion of this TD.
T
R/W
DataToggle
This 2-bit field is used to generate/compare the data PID value (DATA0 or DATA1).  It is updated after each successful transmission/reception of a data packet.  The MSb of this field is ‘0’ when the data toggle value is acquired from the toggleCarry field in the ED and ‘1’ when the data toggle value is taken from the LSb of this field.
EC
R/W
ErrorCount
For each transmission error, this value is incremented.  If ErrorCount is 2 and another error occurs, the error type is recorded in the ConditionCode field and placed on the done queue.  When a transaction completes without error, ErrorCount is reset to 0.
CC
R/W
ConditionCode
This field contains the status of the last attempted transaction. (See Section 0.)
CBP
R/W
CurrentBufferPointer
Contains the physical address of the next memory location that will be accessed for transfer to/from the endpoint.  A value of 0 indicates a zero-length data packet or that all bytes have been transferred.
NextTD
R/W
NextTD
This entry points to the next TD on the list of TDs linked to this endpoint
BE
R
BufferEnd
Contains physical address of the last byte in the buffer for this TD
 
 
ConditionCode
Code
Meaning
Description
0000
 NoError
General TD or isochronous data packet processing completed with no detected errors
0001
 CRC
Last data packet from endpoint contained a CRC error.
0010
 BitStuffing
Last data packet from endpoint contained a bit stuffing violation
0011
DataToggleMismatch
Last packet from endpoint had data toggle PID that did not match the expected value.
0100
 Stall
TD was moved to the Done Queue because the endpoint returned a STALL PID
0101
 DeviceNotResponding
Device did not respond to token (IN) or did not provide a handshake (OUT)
0110
PIDCheckFailure
Check bits on PID from endpoint failed on data PID (IN) or handshake (OUT)
0111
UnexpectedPID
Receive PID was not valid when encountered or PID value is not defined.
1000
 DataOverrun
The amount of data returned by the endpoint exceeded either the size of the maximum data packet allowed from the endpoint (found in MaximumPacketSize field of ED) or the remaining buffer size.
1001
 DataUnderrun
The endpoint returned less than MaximumPacketSize and that amount was not sufficient to fill the specified buffer
1010
reserved
 
1011
reserved
 
1100
BufferOverrun
During an IN, HC received data from endpoint faster than it could be written to system memory
1101
BufferUnderrun
During an OUT, HC could not retrieve data from system memory fast enough to keep up with data USB data rate.
111x
 Not Accessed
This code is set by software before the TD is placed on a list to be processed by the HC.





本文转自 tywali 51CTO博客,原文链接:http://blog.51cto.com/lancelot/241926,如需转载请自行联系原作者

版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。

相关文章
阿里云服务器怎么设置密码?怎么停机?怎么重启服务器?
如果在创建实例时没有设置密码,或者密码丢失,您可以在控制台上重新设置实例的登录密码。本文仅描述如何在 ECS 管理控制台上修改实例登录密码。
9497 0
阿里云服务器如何登录?阿里云服务器的三种登录方法
购买阿里云ECS云服务器后如何登录?场景不同,阿里云优惠总结大概有三种登录方式: 登录到ECS云服务器控制台 在ECS云服务器控制台用户可以更改密码、更换系.
13186 0
阿里云ECS云服务器初始化设置教程方法
阿里云ECS云服务器初始化是指将云服务器系统恢复到最初状态的过程,阿里云的服务器初始化是通过更换系统盘来实现的,是免费的,阿里云百科网分享服务器初始化教程: 服务器初始化教程方法 本文的服务器初始化是指将ECS云服务器系统恢复到最初状态,服务器中的数据也会被清空,所以初始化之前一定要先备份好。
6895 0
+关注
20382
文章
0
问答
文章排行榜
最热
最新
相关电子书
更多
《2021云上架构与运维峰会演讲合集》
立即下载
《零基础CSS入门教程》
立即下载
《零基础HTML入门教程》
立即下载