I had the same problem. USB3 was fine but USB2 enumeration was unreliable. Are you using the serial port to output messages to a terminal or do you have a debugger??? I use the serial port and needed to add delays so the Cypress xilprintf's would get outputted. When I did this I discovered that the setup for the EP sending data up to the host was failing because the burst len was 16 for USB3. I had to change it to 1 for USB2. At that point in the app you know if the enumeration was for 2 or 3 so I put an if() statement in there. I also had to upgrade from SDK 1.2.1 to 1.2 3 but you have already done this.
Thanks for the response. I was able to fix my issue. From your suggestion in regards to the setup for the EP burst len being 16 for USB3 and 1 for USB2, I noticed a problem in the header file.
#define BURST_LEN 1 //for USB2.0
#define BURST_LEN 16 //for USB3.0
The code was included in the header, however a previous line of code that defined USB_2_0 was commented out
Removing this comment allowed the BURST_LEN to be set corretly for USB 2.0 and the firmware now runs when connected to a 2.0 port.
Thanks for the help
Hi, Yes. The epCfg.burstLen has been set to 0x10 and this causes the CyU3PSetEpConfig() request to fail on USB 2.0. epCfg.burstLen should be set to 1, whenever epCfg.pcktSize is less than 1024 and that is what is causing the failure. Changing the code to something like if(size < 1024) epCfg.burstLen = 1; else epCfg.burstLen = BURST_LEN; should allow it to work on both USB 2.0 and USB 3.0. Thanks, sai krishna.