openFPGALoader: Cannot flash Tang Nano 9k
I cannot flash my Tang Nano 9K with a default led example project provided by Sipeed.
I have fully compiled the bitstream file and used openFPGALoader to write to flash memory:
$ openFPGALoader -b tangnano9k -f 9K_LED_project.fs
write to flash
Jtag frequency : requested 6.00MHz -> real 6.00MHz
JTAG init failed with: Unknown device with IDCODE: 0x00fa03fa (manufacturer: 0x1fd (), part
I have read issues #245 and this question from Stack Overflow, my user has all permissions to access FTDI device, which is listed by:
$ lsusb
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 003: ID 046d:c08b Logitech, Inc. G502 SE HERO Gaming Mouse
Bus 003 Device 008: ID 0403:6010 Future Technology Devices International, Ltd FT2232C/D/H Dual UART/FIFO IC
Bus 003 Device 002: ID 214b:7250 Huasheng Electronics USB2.0 HUB
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID c0f4:01b0 USB usb keyboard
Bus 001 Device 003: ID 8087:0025 Intel Corp. Wireless-AC 9260 Bluetooth Adapter
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Here it is my rules.d file for this device:
$ cat /etc/udev/rules.d/70-ttyusb.rules
KERNEL=="ttyUSB[0-9]*", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="28e9", ATTRS{idProduct}=="0189", MODE="0666"
SUBSYSTEM=="usb_device", ATTRS{idVendor}=="28e9", ATTRS{idProduct}=="0189", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="0403", ATTR{idProduct}=="6010", MODE="0666"
This error happened only once, and then I couldn’t even access the device anymore:
$ openFPGALoader -b tangnano9k -f 9K_LED_project.fs
write to flash
unable to open ftdi device: -3 (unable to set usb configuration. Make sure the default FTDI driver is not in use)
JTAG init failed with: unable to open ftdi device
Neither with root priviledge:
$ sudo openFPGALoader -b tangnano9k 9K_LED_project.fs
unable to open ftdi device: -3 (unable to set usb configuration. Make sure the default FTDI driver is not in use)
JTAG init failed with: unable to open ftdi device
Is there something I missed? Thanks in advance!
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 18 (15 by maintainers)
To my previous post - using Gowin Programmer did not do any help CRC errors and FTDI ones were appearing very randomly so for my case I cannot say that it was a solution.
@trabucayre @Chandler-Kluser After two dense days I found that my Tang Nano 9k is flashed perfectly fine 100% of times if …
I simply use the original usb-cable from the little box how it is shipped, otherwise - CRC errors / and further problems with FTDI drivers. So my advice would be try to simply change the USB cable to original one and ensure that the board is accurately isolated (in my case I pinned it to my breadboard).
I have no idea what had happened … But possibly it is just a hardware issue - again using original usb cable solved all problems magically…
I had a very similar sequence of problems, I think it started with my incorrect rules for the USB port and at some point I got
mpsee_read/mpsee_write()errors as above. I followed advice of @Chandler-Kluser : on Gowin website one can download “Programmer” soft (Educational Version) and it has commands Erase SRAM, Erase Flash memory.After erasing and setting rules for USB as advised on Sipeed website it works correctly now.