We use WinDriver on the host PC for the USB communication and we use auto DMA to do bulk data transfer from GPIF FIFO to the bulk endpoint. If the WinDriver' WD_Transfer() is called to transfer data after the data is ready on the bulk pipe it works fine. However, if the WD_Transfer() is called before the data is ready on the bulk pipe the WinDriver always times out. The data maybe ready in a few milliseconds after WD_Transfer() is called. The time out period is 2 seconds for WD_Transfer(). Calling WD_Transfer() after time out will get the data. This happens to the interrupt endpoint too.
Since the same WinDriver has been working with our USB2 device we are not sure if this is a WinDriver (or USB host driver) issue or some incorrect settings in the FX3 that may cause this issue.
You can corner down the issue by using our Cypress Driver and see if this issue occurs. We are not very sure of the behavior if the windows driver as it is out of our scope. As far as any driver is concerned, FX3 abides by the timeout values of its end points and is seen to have worked properly.
- Madhu Sudhan
Thanks for the reply. It looks the time out problem goes away if we use a USB hub. Do you have any idea why a usb hub will make the difference? This looks like there are some issues in the usb link layer. Could there be some issues between FX3 and Windows 7 driver? We have tried on the Windows 10 computer and got the same results. What kind of computer does Cypress use to test the FX3? Do you use computer's standard usb3.0 port or use usb3.0 plug-in card with non-Windows driver?
Now we run into another problem. We use auto dma to bulk transfer image data to the computer and send the computer the status message through the interrupt pipe. The status message is unsynchronized with image data. The status change can happen before, after or during image data transfer. So on the computer side there are 2 threads running. One thread reads the interrupt pipe with infinite time out. If it gets a status message it passes it to the main thread. The other thread reads the bulk pipe to get the image data. It seems the system works fine if the interrupt read doesn't happen concurrently with the bulk pipe read. If one thread is reading the bulk pipe and the other thread tries to read the interrupt pipe then both interrupt and bulk pipe will be messed up. Does FX3 support this kind of endpoints concurrent access?