1
完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
大家好,我正试着在FX3板上开始开发,从提供的固件例子中学习。我想FX3生成一些数据,并通过USB发送到我的电脑。我不关心如何处理这些数据,现在我的兴趣是看传输比特率。在CyfxBulkSrCink实例中,设置了一对输入/输出端点(EP1默认,但我切换到EP6,以便具有更高带宽),然后为数据接收器创建通道中的DMA手册,并且为数据源创建DMA手动输出通道。E DMA手动输出信道并发送给主机。设置DMA手动信道的参数的代码如下:CYU3PDMACHANNEL CONtiCONT DMACFG;
DMACFG大小=(UbSt==CyuU3PySuffi速度)?(大小×CyfxfxEpp-Burthl长度):(大小); DCMACFG计数= CyfxxBulkSrcSikkgDMAB-BuffyCo计数; DMACGF.PRODSCKID = CyfxxEppSuieldReSub; DcMcF.C. DMACGF.DMAMODE=CYU-U3PY-DMAYMODEEY字节; DMACFG通知= CYU-U3PYDMABCBYPRODYL事件; CyfxBulkSrcSnkdCMAC; 正如你所看到的,我可以操纵大小(其中“大小”标识符在紧凑的“如果”语句是根据USB速度选择的数据包大小)和计数字段,以获得不同的性能。在论坛上,我读到,DMA缓冲区的大小可以增长到64K,但是任何替换DMACFG大小分配的右侧的值都不起作用(它允许我编译,但无法通过控制中心编程设备)。CyfFxBulkSrcSikkdDMAY-BuffyCalt的默认值为8,获得了约10MbPs的传输速率。将它提高到252(但不进一步,因为它不起作用)将传输速率改变到大约14MbPs。 使用CYFXBLKLPUTO示例,我可以达到40MbPS的传输速率。你能告诉我为什么会这么慢,即使转会只是一个方面吗? P.S.作为软件应用程序,我使用默认的VisualStudio CPP应用程序。 谢谢, 姆林 以上来自于百度翻译 以下为原文 Hi everybody, I'm trying to get started in development on the FX3 board by learning from the firmware examples provided. I want the FX3 to generate some data and to send it via USB to my computer. I don't care about what to do with this data, for now my interest is to see the transfer bitrate. In the CyFxBulkSrcSink example a pair of IN/OUT endpoint is set (EP1 default, but I switched to EP6 in order to have higher bandwith), then a DMA MANUAL IN channel is created for data sink and a DMA MANUAL OUT channel is created for data source. A constant data pattern is continuously loaded into the DMA MANUAL OUT channel and sent to the host. The code to set the parameters to create the DMA MANUAL channel is the following: CyU3PDmaChannelConfig_t dmaCfg; dmaCfg.size = (u***Speed == CY_U3P_SUPER_SPEED) ? (size * CY_FX_EP_BURST_LENGTH) : (size); dmaCfg.count = CY_FX_BULKSRCSINK_DMA_BUF_COUNT; dmaCfg.prodSckId = CY_FX_EP_PRODUCER_SOCKET; dmaCfg.consSckId = CY_U3P_CPU_SOCKET_CONS; dmaCfg.dmaMode = CY_U3P_DMA_MODE_BYTE; dmaCfg.notification = CY_U3P_DMA_CB_PROD_EVENT; dmaCfg.cb = CyFxBulkSrcSinkDmaCallback; As you can see, I can manipulate the size (where the "size" identifier in the compact "if" statement is the packet size chosen according to the USB speed) and count fields to obtain different performances. Here on the forum I read that the size of DMA buffer can grow up to 64k, but any value I replace the right side of dmaCfg.size assignment with doesn't work (it lets me compile but fails programming the device by the control center). The default value of CY_FX_BULKSRCSINK_DMA_BUF_COUNT is 8, with which I obtain a transfer rate of about 10MBps. Raising it to 252 (but not any further, cause it doesn't work) changes the transfer rate to about 14MBps. Using the CyFxBulkLpAuto example I could reach a transfer rate of 40MBps. Can you tell me why it goes so slow, even if the transfer is one-side only? p.s. as software application I'm using the default visual studio cpp application provided. Thanks, mrain |
|
相关推荐
4个回答
|
|
谢谢你的回复。
你知道是否有一种方法来设置DMA自动通道,同时保持FX3是数据的生产者? 以上来自于百度翻译 以下为原文 Thanks for your reply. Do you know if there is a way to setup a DMA auto channel while keeping FX3 to be the producer of data? |
|
|
|
可能有一种使用自动信令方法的方法,其中DMA信道是自动的,它在每次发送或接收缓冲器时发出信号,请参阅程序员手册的第7章,以了解更多的细节,还有AFRMLWORKS示例。我没有用它来为端点生成数据,但应该能够这样做。对于测试比特,为什么不使用BulkLooSoB自动示例呢?
以上来自于百度翻译 以下为原文 There may be a way using the auto signalling method where the DMA channel is automatic and it signals the CPU every time it has sent or received a buffer - see chapter 7 of the Programmers Manual for more details of this, there is also a firmware example. I have not used this to generate data for the endpoint but it should be able to do so. For testing bitrate why not use the bulkloop_auto example? |
|
|
|
姆雷纳
我说DMA缓冲区大小应该只有1024是错误的。我已经检查过了,对于最快的传输速度,大小应该至少等于每个包的包数,因为包大小在1024,16个包,这将是16K。我尝试了你的代码来配置缓冲区大小,它工作。 对于缓冲器的数目(计数)IsET到4,并且我得到最快的速度。 索达法尔 以上来自于百度翻译 以下为原文 mrainer, I was wrong to say the dma buffer size should be 1024 only. I have checked this out and for fastest transfer speed the size should be at least equal to the number of packets per burst by the packet size - so for 16 packets at 1024 this will be 16K. I tried out your code to configure the buffer size and it worked. For the number of buffers (count) I set this to 4 and I get the fastest speed . Sodafarl |
|
|
|
姆雷纳
你使用SDK 1.1吗?RexMe.txt文件位于“C:CyPress EZ-USB FX3 SDK 1.1固件基本示例 CYFXISOSRCsCink”中,它具有设置高性能应用程序的指令。 -DRBIR 压缩文件 1.3 K 以上来自于百度翻译 以下为原文 mrainer, are you using SDK 1.1? there is readme.txt file located in "C:CypressEZ-USB FX3 SDK1.1firmwarebasic_examplescyfxisosrcsink", it has instruction to set high performance application. -dbir
|
|
|
|
只有小组成员才能发言,加入小组>>
754个成员聚集在这个小组
加入小组2105 浏览 1 评论
1851 浏览 1 评论
3669 浏览 1 评论
请问可以直接使用来自FX2LP固件的端点向主机FIFO写入数据吗?
1786 浏览 6 评论
1536 浏览 1 评论
CY8C4025LQI在程序中调用函数,通过示波器观察SCL引脚波形,无法将pin0.4(SCL)下拉是什么原因导致?
569浏览 2评论
CYUSB3065焊接到USB3.0 TYPE-B口的焊接触点就无法使用是什么原因导致的?
423浏览 2评论
CX3连接Camera修改分辨率之后,播放器无法播出camera的画面怎么解决?
437浏览 2评论
383浏览 2评论
使用stm32+cyw43438 wifi驱动whd,WHD驱动固件加载失败的原因?
915浏览 2评论
小黑屋| 手机版| Archiver| 德赢Vwin官网 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-23 17:03 , Processed in 1.278010 second(s), Total 52, Slave 46 queries .
Powered by 德赢Vwin官网 网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
德赢Vwin官网 观察
版权所有 © 湖南华秋数字科技有限公司
德赢Vwin官网 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号