阅读:1401回复:4
Anybodies help me?( EP0 Transfer issue ) 送分
The issue is:
PC sent a \"Setup\" and a data0 packet to device and told the device he just wanna get some data from UDC. UDC can sent back \"ACK\" to host to confirm this ransaction. I checked UDC receive FIFO, no data received at all. Then PC sent \"IN\" tonken to request device\'s data, but UDC just reply \"NAK\", for a long time, blocking. According to usb spec.1.1--8.4.5.3: If the transaction is maintaining sequence bit synchronization and a mismatch is detected (refer to section 8.6 for details), then the function returns ACK and discards the data. Can anybodies help me analyze this issue? Thanks a lot! |
|
沙发#
发布于:2003-08-14 13:49
顶一下
烦请高人留意一下,万分感谢!! |
|
板凳#
发布于:2003-08-14 14:58
控制传输分为三个阶段
1,建立阶段:这是后主机发送setup包给设备,告诉设备本次传输的意义,以及是否有数据阶段,设备收到后分析并做出相应动作,根据你的情况,你的setup包告诉设备你要读回一些数据。 2,数据阶段:这时候主机会发送in token到设备检测设备是否准备好数据,如果是,就把数据读回并发送ack给设备,否则设备会发送nak给主机表示数据尚未准备好或者忙,要求主机等待,在等待期间主机会不断的发送in token给设备。 3,握手阶段:如果数据阶段传输完成,那么最后主机或者设备回发送ack给对方,在这个中断里设备可以不做什么事情。 根据你得情况,你的设备收到了setup包,但是没有响应,因此……检查一下发送数据的程序吧。 |
|
地板#
发布于:2003-08-14 15:20
首先多谢jinghuiren的回答。
让我郁闷的是 UDC是收到了setup包并且回了ACK, 我用CATC抓了包,能肯定。 但是UDC回ACK有下面两种情况: 1。OK. 2。\"If the transaction is maintaining sequence bit synchronization and a mismatch is detected (refer to Section 8.6 for details), then the function returns ACK and discards the data.\" 而且我从UDC的fifo里读不到setup包的内容,所以很奇怪。 我试着让UDC回STALL,这样PC会重发,情况好多了,但有时PC送\"Suspend\"来后,UDC就从此没反应了~~~ |
|
地下室#
发布于:2003-08-14 16:17
HW issue.
UDC receive the correct setup packet and data0, but UDC didn\'t set Receive fifo not empty bit. So i cannot read the setup data. Now, i can resolved this, Thanks everybodies\' help! |
|