(Dropping this here mainly so it gets indexed, but others will be interested)
On Sunday I was in a rush, and programmed my Digilent CMOD A7's FPGA configuration flash.
I programmed it with a fresh BIN file, and then it would no longer show up in Vivado's Hardware Manager, and the board's "DONE" LED failed to light.
I worked out what I had done wrong - in the bitstream settings I hadn't set it to "SPI x4" as the configuration. Damn. I had bricked it.
When connected to my Windows 10 laptop, Device Manager showed two Digilent Adapt USB devices, but one of them ports had a yellow warning flag. When I watched the kernel messages on my Linux box I saw both ports (the RS232 port and the JTAG port) connect, but then the JTAG port disconnected:
[ 1382.675956] usb 2-1.3: New USB device found, idVendor=0403, idProduct=6010
[ 1382.675962] usb 2-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1382.675966] usb 2-1.3: Product: Digilent Adept USB Device
[ 1382.675969] usb 2-1.3: Manufacturer: Digilent
[ 1382.675972] usb 2-1.3: SerialNumber: 210328A41214
[ 1382.679134] ftdi_sio 2-1.3:1.0: FTDI USB Serial Device converter detected
[ 1382.679207] usb 2-1.3: Detected FT2232H
[ 1382.679559] usb 2-1.3: FTDI USB Serial Device converter now attached to ttyUSB0
[ 1382.682361] ftdi_sio 2-1.3:1.1: FTDI USB Serial Device converter detected
[ 1382.682427] usb 2-1.3: Detected FT2232H
[ 1382.682846] usb 2-1.3: FTDI USB Serial Device converter now attached to ttyUSB2
[ 1382.697639] ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from ttyUSB0
[ 1382.697675] ftdi_sio 2-1.3:1.0: device disconnected
Google was no help - people reporting the same or similar problem, but no solution was provided.
I tried the usual things for misbehaving USB devices - tried different PCs, different USB cables, reinstalling drivers and so on - no success from any of them.
I got out the scope and could see that the power rails strapping good, and that the config flash was being read (confirming that the FPGA was alive). However I noticed that the flash was being read for quite a few seconds before it went quiet.
That got me thinking - the JTAG port disconnects in about 0.2s of the device being connected, but the FPGA is still reading from Flash at that point... maybe that is causing the JTAG port to fail somehow?
Last night I thought up a solution that works, without any microsurgery on 0201 CONFIG MODE strapping resistors or removing the Flash.. I tested it today and strike me down with a feather, IT WORKED!
My solution:
Connect the FPGA board to a powered USB hub that isn't connected to your PC , wait for a short while for the FPGA to fail to configure - maybe a minute to be sure. Then connect the hub to your (WIndows or Linux) PC.
Hey presto, a working JTAG port, through which you can now program a flash image with the correct settings.
I've done a bit of testing, and it isn't the powered hub that is the fix, it is the powering up then waiting before you access the USB device.
Hope this helps somebody, and maybe even resurrects a few boards.