你好,
不建议用FX3改变与各种中断源相关联的优先级。
在FX3DMA体系结构中可能会发生缓冲区过/欠运行问题。
在GPIF II接口系统中经常观察到这个问题,GPIF II接口收集来自外部处理器/ FPGA /图像传感器的无流量控制的数据。
这里FX3中的GPIF块在不检查可用性的情况下连续地将接收到的数据写入内部缓冲器,因此如果USB主机不能及时读取数据,则缓冲器过运行将发生在GPIF套接字和安培中;它将在缓冲器丢失和DMA通道C中结束。皮疹。
以下是一些良好的设计实践,以避免问题发生:
1。DMA缓冲:
在多对一的DMA体系结构中,尝试利用最大的DMA缓冲。
不要使用非常大的DMA缓冲器,使它成为最大包大小×最大突发长度的倍数。即最大分组ZISE=1024,突发=16,然后使DMA缓冲器大小为16×1024/16×1024×2。
C,总是使用最大USB 3脉冲串。
2。尽量减少系统中的短包/ZLPS,因为这会导致主机应用程序XFEDATA队列立即终止。
三。不建议在DMA回调中添加任何延迟引起的元素(如调试打印、缓冲分析和操作)。
如果需要,在应用程序线程中使用Cyu3PDMACHANEL GETBUFFER()和CYU3PDMACHANEngEngEffFisher()API进行最小的处理。
4。它还依赖于PC和当前CPU负载中的功率模式,在PC.始终使用高性能模式。
5。禁用LPM特征提高了系统性能。
6。总是使用最新版本的USB 3主机控制器驱动程序。
如果你有任何更新,请告诉我。
最好的问候,
高山弘
以上来自于百度翻译
以下为原文
Hi,
It is not recommended to change the priority associated with the various interrupt sources with FX3.
Buffer over/under run issue might be happened in FX3 DMA architecture.
This issue is often observed in systems where the GPIF II interface which collects the data from external processor / FPGA / Image sensor which has no flow-control.
Here the GPIF block in FX3 writes the received data to the internal buffers continuously without checking it availability, so if the USB host is not capable of reading data in a timely fashion buffer over-run will happen in the GPIF socket & it will end up in the buffer loss & DMA channel crash.
Following are some good design practices to avoid issue if it happened:
1. DMA buffering:
a, Try to utilize the maximum DMA buffering in many to one DMA architecture.
b, Do not use very large DMA buffers, make it a multiple of max packet size * max burst length. i.e. max packet zise = 1024, Burst = 16, Then make the DMA buffer size 16 * 1024 / 16 * 1024 * 2.
c, Always use maximum USB 3.0 Bursts.
2. Try to minimize the short packets / ZLPs in the system because this will cause the host application xferdata queue to terminate instantly.
3. It is not recommended to add any delay causing elements (Like Debug prints, Buffer parsing & manipulation) in the DMA callback.
If it is necessary do it In the application thread using CyU3PDmaChannelGetBuffer() & CyU3PDmaChannelCommitBuffer() APIs with minimal processing.
4. It is also dependent on the Power modes in the PC & the current CPU load, Always use High Performance mode in PC.
5. Disabling LPM features improves the system performance.
6. Always use the latest version of the USB 3.0 host controller drivers.
If you have any update, kindly let me know.
Best regards,
Hirotaka Takayama