This is a call out for help regarding an (easily reproducible) full speed problem that I am experiencing with the EZ-USB FX3 Superspeed Explorer Kits, using a USB2 cable.
Our project requires full speed. We found no existing full speed Isochronous example, so we modified the source of Isochronous example Cypress\EZ-USB FX3 SDK\1.3\firmware\basic_examples\cyfxisolpmaninout to force it to be full speed (rather than high speed) when used with a USB2 cable. We also changed the producer and consumer endpoint descriptor Max packet size values from decimal 1024 to decimal 64.
I have attached the two source files (cyfxisolpmaninout.c and cyfxisolpdscr.c - renamed to *.txt to facilitate the upload) of SDK example cyfxisolpmaninout that we modified. (I have also summarised these file changes at the end of this post.)
I programmed the FX3 I3C EEPROM with this modified (to force full speed) Isochronous example (USBIsochLoopManualInOut.img).
Running a program that tests CCyUSBDevice object member nHighSpeed and bSuperSpeed reveal that neither is true, therefore it would appear that full speed has been achieved.
Running USB Control Center confirms that the Isoc in and out endpoints have ENDPOINT MaxPktSize values of “64”.
When I select the “Isoc out endpoint” descriptor, and navigate to the “Data Transfers” tab, the “Bytes to transfer” value has defaulted to 512 (which is 8*MaxPktSize). I change this to 64, which is the MaxPktSize. When I singularly press the “Transfer Data-OUT” button it successfully transfers out the 64 bytes – “ISOC OUT transfer completed”. All is well so far.
However, if I press the the “Transfer Data-OUT” button rapidly twice in succession (faster than approximately 0.2 seconds apart), the first write succeeds, but the second write always fails with “Zero-length data transfer completed”.
My questions are - why is this error occurring for full speed, and why can’t I perform two writes quickly with full speed? Is there anything wrong with the methods in which we went about forcing full speed?
P.S. The unmodified Isochronous example Cypress\EZ-USB FX3 SDK\1.3\firmware\basic_examples\cyfxisolpmaninout, which runs at high speed using a USB2 cable, does not exhibit this problem.
P.P.S Details of this modification to force SDK example cyfxisolpmaninout to full speed were as follows:
Source file cyfxisolpmaninout.c had ‘Super speed configuration descriptor’ commented out, and was change to call CyU3PUsbForeceFullSpeed(CyTrue) and CyU3PConnectState(CyTrue, CyFalse).
Source file cyfxisolpdscr.c had ‘Standard device descriptor for USB 3.0’ ‘Standard super speed configuration descriptor’ and ‘SuperSpeed device capability’ commented out, and the length of the ‘Binary device object store descriptor’, ‘Endpoint descriptor for producer EP’ and ‘Endpoint descriptor for consumer EP’ were updated to be consistent with these changes.
In addition, the Max packet sizes of the Isoc in and out endpoints had been changed from decimal 1024 to decimal 64 in file cyfxisolpdscr.c.