Cypress技术william hill官网
直播中

曹玥

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

为什么大量的数据包大小是从主机发送的?

你好,
我正在尝试从GPIF读取数据,并通过端点中的批量发送到主机。但是,我发现包大小的块需要是4字节的倍数,即3字节将导致零长度包,5字节将导致4字节分组。但是大量的数据包大小是从主机(PC)发送的。为什么?
谢谢,
罗孚

以上来自于百度翻译


     以下为原文
  Hi,
     
    I'm trying to read data from GPIF and send to host through bulk in endpoint. However ,I found that the bulk in packet size needs to be multiple of 4 bytes, i.e. 3 bytes will result a zero length packet and 5 bytes will result a 4 bytes packet. But the bulk out packet size is actual as that sent from host (PC). Why?
     
    Thanks,
    Rover

回帖(1)

曹玥

2019-6-6 11:11:45
似乎这个问题来自GPIF方面。当从GPIF读取3字节时,GPIF生产者缓冲区为空,因此包中的块为零长度。因此,我的问题变成了GPIF生产者缓冲区的数据计数需要4字节对齐的原因。

以上来自于百度翻译


     以下为原文
  Seems that the issue is from GPIF side. When reading 3 bytes from GPIF, the GPIF producer buffer is empty, so that the bulk in packet is zero length. So my question becomes why the data count of GPIF producer buffer needs to be 4 bytes aligned.
举报

更多回帖

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