the jlink debugger is a really good idea. You may have a problem with the power supply of the SuperSpeed sources (RX TX) of FX3 on your board. That can be possible if USB disconnects or debugger loses connection after the functin call CyU3PUsbConnect(true, true). That just happens if it connect to superspeed. Activating the superspeed phy needs a lot of current.