Cypress技术论坛
直播中

傅利

7年用户 204经验值
私信 关注
[问答]

请问同步传输期间在USB微框架中没有数据,该如何发送零长度包?

你好,
在同步传输期间,如果在USB微框架中没有数据,如何发送零长度包?
谢谢,
苏巴拉岛

以上来自于百度翻译


     以下为原文
  Hi,
    During a isochronous transfers, if there is no data during a USB microframe, how to send a Zero-Length packet?
    Thanks,
    Subbarao.

回帖(3)

韩俊

2019-6-11 09:18:02
检查了CYSUB3014数据表中PKTANKαPIN的功能。

以上来自于百度翻译


     以下为原文
   Checkout the function of PKTEND# pin in CYUSB3014 datasheet.
举报

李大帅

2019-6-11 09:27:16
尼克尔说的是一个奴隶FIFO接口。但是,如果您有自己的接口,您可以在DMA通道上执行一个StReWrpUp()来强制提交空缓冲区。这将发送一个零长度包。

以上来自于百度翻译


     以下为原文
   What NIKL said was for a Slave FIFO interface. However, if you have your own interface, you can just do a SetWrapUp() on the DMA channel to force the empty buffer to be committed. This will then send a zero length packet.
举报

傅利

2019-6-11 09:35:24
你好,
谢谢你的回复。
我不在我的FX3项目中使用GPIF接口。我用UVC的ISOC例子,在FX3SDK例子中可用。
在示例中,启用了每一个微帧的一个事务(CyfxxEpSyISOVIEVOOXPKStCualt= 0x01),我已经修改了每个微帧2和3个事务的示例。
在主机端,我使用UBTraceStufWar来检查来自设备的数据。
当CyfxxEpSySuxVieloOx PKTSyCalk设置为1时,一些USB数据包没有数据,所以USB数据包的长度被显示为“0”,状态显示为成功(0x00)。
但是如果CyfxxEpSySyPixVoToOpktStEngAt设置为2或3,如果USB数据包没有数据,则长度显示为“0”,状态显示为UBDSDSTATUSXXACTHORACLE错误(0xC000 000 011)。
我的问题是,为什么会出现这种错误,如何避免呢?
谢谢
苏巴拉岛

以上来自于百度翻译


     以下为原文
  Hi,
    Thanks for your reply.
    I am not using GPIF interface in my FX3 project. I am using UVC ISOC example available in FX3 SDK examples.
    In the example one transaction (CY_FX_EP_ISO_VIDEO_PKTS_COUNT = 0x01 )per micro frame is enabled, I have modified the example for 2 and 3 transactions per micro frame.
    On host side I am using USBTrace software, to check the data coming from the device.
    When CY_FX_EP_ISO_VIDEO_PKTS_COUNT set to 1, some of the USB packets doesn't have the data, so length of the USB packet is shown as "0" and status shown as SUCCESS (0x00).
    But if CY_FX_EP_ISO_VIDEO_PKTS_COUNT set to either 2 or 3, if a USB packet doesn't have the data, length has shown as "0" and status shown as USBD_STATUS_XACT_ERROR (0xC0000011).
    Here my question is that, why is this error occuring and how to avoid it?
    Thanks
    Subbarao.
举报

更多回帖

发帖
×
20
完善资料,
赚取积分