Announcements
IMPORTANT: Cypress Developer Community is transitioning on October 20th. To learn more and be prepared for this change, check out our latest announcement.
cancel
Showing results for 
Search instead for 
Did you mean: 

USB Superspeed Peripherals

gacoc_812066
New Contributor

Hello,

   

My situation: custom FX3 design with boot library, internal core power (not from USB).
I have configured 2 USB bulk endpoints and 2 PPorts (to an FPGA), everything over auto DMA channels. Starting point was the "gpiftousb" example. It is basically in an auto forwarding only mode: EP2 : USB -> FPGA; EP86: FPGA -> USB. Everything works as expected on first enumeration.
I have problems AFTER USB3 cable is disconnected/reconnected. Just to make it clear: all problems below happen only with SS, everything works correctly on HS!

   

1. From host POV, everything is good; re-enumeration, device is visible in device manager.
2. There is no (disconnect) event visible in UsbEventCallback when removing the cable, why? I don't really need it, but it might be a hint. Additionally, when disconnected the function "CyFx3BootUsbGetSpeed" (polled in the main loop) still returns  CY_FX3_BOOT_SUPER_SPEED  !?
3. After re-connect, no data sent from host (over bulk EP) reaches the DMA!? I enabled a interrupt callback on DMA transfer just to print a message, and it doesn't trigger it.

   

I have tried everything I could think of:
- a simple vendor command re-initializes everything (DMA, GPIF, etc)
- I bought the SuperSpeed Explorer Kit and modified the power circuit to match my situation; the same problem (I just look for the DMA callback message).
- (re)connecting to USB2 cable works immediately, USB3 still shows the problem. This hints towards the USB3 handling.
- I found that the problem occurs only after first bulk transfer from host. Before doing any transfer, I can disconnect and reconnect several times; the first transfers will work correctly. This hints towards DMA buffer issues, but I did not find any DMA reset other than disabling / enabling it again...

   

The whole issue seems to be some kind of initialization issue in the boot library.
I am thankfull for any other hints / ideas.

   

Regards,
Gabriel

0 Likes
1 Reply
gacoc_812066
New Contributor

I tried a lot, and it seems that USB3 block is not working correctly anymore after cable disconnect / reconnect...
I copied the fw file "cyfx3usb.c" in my project and added several debug messages... no hint.
I forced from host via simple vendor command an extra call to CyFx3BootUsbStart (before all other initializations), and it works afterwards.
Then I skipped (inside CyFx3BootUsbStart, via a parameter) only the call to CyFx3UsbPowerOn; all other initializations are done, and again it doesn't work!
So it seems that whatever the problem is, it can only be solved by CyFx3UsbPowerOn!
I tried to dig deeper, but big surprise, there is NO source code for this function.

   

Does anyone have any idea??

   

Thanks,
Gabriel

0 Likes