完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
扫一扫,分享给好友
我使用的是PIC32 MZ2048 EFH064。我有一个定制板上的芯片。我试图让USB CDC从设备发送数据到主机至少每秒1.5兆比特。我正在挣扎,因为我好像每秒都要打1.2到1.4兆位的墙。我以高速的速度连接到CDC。项目创建和配置和谐。该设备枚举并发送数据。我用一个递增计数器发送一分钟的数据包来检查我的平均比特率,然后检查计数器有多高。i平均每秒发送多少位。最近我使用USB包和WiRESHARK来查看USB通信量。这是根集线器上唯一的设备。首先,我尝试了32个深度写缓冲区,并处理了4096个字节的数据包。看一下USB捕获器,我首先看到帧是1毫秒相隔,每个帧正在移动4096字节的数据。在大约10帧之后,帧之间的速率增长到10毫秒。最后,帧之间的平均速率达到大约25毫秒。如果你做的数学计算每秒大约1.4兆字节。在一些研究之后,我看到一个大容量端点应该是512字节。降低数据包大小从4096到512,我得到相同的比特率。看看UBCAPATDATA,我看到了稍微不同的东西。对于前100毫秒,每1毫秒就有一次传输。然后,4或五帧具有相同的时间戳,然后存在5至10毫秒的间隙。具有相同时间戳和间隙的多个帧的这种模式反复地重复。查看数据,每个帧都包含连续的包号,表示没有重发。有什么能使USB帧在这种类型的研究中出现?
以上来自于百度翻译 以下为原文 I'm using a PIC32MZ2048EFH064. I have a custom board with the chip on it. I'm trying to get USB CDC to send data from the device to a host at a minimum of 1.5 megabits per second continuously. I'm struggling because I seem to have hit a wall at around 1.2 to 1.4 megabits per second. I'm connecting to the PC as a CDC at High Speed. The project was created and configured with HARMony. The device enumerates and sends data. I check my average bit rate by transmitting packets for one minute with an incrementing counter, then checking how high the counter went. The I average how many bits were sent per second. Recently I used USBcap and Wireshark to look at the USB traffic. This is the only device on the root hub. At first, I was trying 32 deep write buffer and handing it 4096 byte packets. Looking at the USBcap capture I see that at first the frames are 1 millisecond apart and each frame is moving 4096 bytes of data. After about 10 frames the rate between frames grows to 10 milliseconds. Finally, the average rate gets to about 25 milliseconds between frames. If you do the math that gives about 1.4 megabits per second. After some research, I see that a bulk endpoint should be 512 bytes. Lowering the packet size from 4096 to 512 I get about the same bit rate. Looking at the USBcap data I see something slightly different. For the first 100 or so milliseconds, there is a transmission every 1 millisecond. Then 4 or five frames have the same timestamp and then there is a gap of 5 to 10 milliseconds. This pattern of several frames with the same time stamp and a gap repeats over and over. Looking at the data, each frame contains consecutive packet number indicating no retransmits. Is there anything that would make the USB frames studder in this type of fashion? |
|
相关推荐
3个回答
|
|
可能与你的问题无关,但我设计了一个USB范围。当作用范围在“连续捕获”上时,我注意到我得到了延迟信号。我发现如果我禁用USB中断,延迟就消失了。
以上来自于百度翻译 以下为原文 Possibly not related to your problem but I designed a USB scope. When the scope is on roll "continuous capture" I noticed I was getting delayed signal. I found if I disabled interrupts for USB the delays went away. |
|
|
|
哪些中断是你禁用的,你是如何禁用的?我假设USB中断需要USB堆栈来运行。
以上来自于百度翻译 以下为原文 Which interrupts did you disable and how did you disable them? I was under the assumption that the USB interrupts were necessary for the USB stack to function. |
|
|
|
哪些中断是你禁用的,你是如何禁用的?我假设USB中断是必要的USB堆栈的功能。我禁用USB中断模式和谐。您可以在轮询或中断模式的USB。
以上来自于百度翻译 以下为原文 Which interrupts did you disable and how did you disable them? I was under the assumption that the USB interrupts were necessary for the USB stack to function. I disabled USB interrupt mode in Harmony. You can have u*** in polled or interrupt mode. |
|
|
|
只有小组成员才能发言,加入小组>>
4778 浏览 9 评论
1814 浏览 8 评论
1733 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
2941 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2043 浏览 5 评论
418浏览 1评论
1100浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
343浏览 0评论
253浏览 0评论
LAN9252使用SQI通信,进行数字复位后读BYTE_TEST异常
1750浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-3-28 17:44 , Processed in 1.017984 second(s), Total 75, Slave 59 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 深圳华秋电子有限公司
电子发烧友 (电路图) 粤公网安备 44030402000349 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号