FX3 SS reconnect DMA issues with boot library

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
gacoc_812066
Level 1
Level 1

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