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

转载 2012年03月22日 10:00:36
原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 、作者信息和本声明。否则将追究法律责任。http://lancelot.blog.51cto.com/393579/241926
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 DelayInterruptis 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.

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

原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 、作者信息和本声明。否则将追究法律责任。http://lancelot.blog.51cto.com/393579/240821 ED...

USB主机控制器驱动——OHCI分析

首先,整个驱动框架的开始,是基于 platform 平台总线的。 struct platform_device s3c_device_usb = { .name = "s3c2410-ohci...

3.16 基于OHCI的USB主机 —— 中断向量处理

原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 、作者信息和本声明。否则将追究法律责任。http://lancelot.blog.51cto.com/393579/261143 ...

1.3 基于OHCI的USB主机 —— 总体构架

原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 、作者信息和本声明。否则将追究法律责任。http://lancelot.blog.51cto.com/393579/228153 ...

基于OHCI的USB主机 —— 目录

我的《基于OHCI的USB主机》系列文章已经完毕了,我觉得需要建立一个目录,以便需要的人可以迅速找到所需要的文章。本文档的目标就是建立一个该系列文章的目录,可能还会对每个部分进行简单介绍。 第一...

1.1基于OHCI的USB主机 —— 前言

原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 、作者信息和本声明。否则将追究法律责任。http://lancelot.blog.51cto.com/393579/328233 ...

3.17 基于OHCI的USB主机 —— 中断处理程序

原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 、作者信息和本声明。否则将追究法律责任。http://lancelot.blog.51cto.com/393579/261181 ...

1.2基于OHCI的USB主机 —— 背景介绍

原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 、作者信息和本声明。否则将追究法律责任。http://lancelot.blog.51cto.com/393579/226133 ...

基于OHCI的USB主机 —— 总体构架

在我们的系统中,USB主机就是用来对U盘进行读写操作,因此在设计和构架上就完全围绕这个目的而进行。整个系统所涉及到的内容比较多,按照嵌入式系统开发的一般原则,采用层次化的体系结构,将系统按照功能划分为...
  • zzobin
  • zzobin
  • 2013年02月01日 11:08
  • 375

USB驱动程序(一)————USB主机控制器驱动——OHCI分析

本文以 2440-ohci 驱动为例,简单分析 USB 主机控制器驱动 根 Hub 的注册过程,以及 USB设备的枚举过程,并不涉及USB协议,单纯分析驱动框架流程。无论是hub还是普通的usb设备,...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:3.8 基于OHCI的USB主机 —— OHCI(TD结构说明)
举报原因:
原因补充:

(最多只允许输入30个字)