q3k / chubby75

Linsn RV901T HUB75 LED "Receiver Card" Reverse Engineering
Creative Commons Zero v1.0 Universal
537 stars 103 forks source link

JTAG not working on 5A-75B v8.0 #96

Closed MrMati closed 2 years ago

MrMati commented 2 years ago

I connected Sipeed RV Debugger (based on FT2232D) probe to 5A-75B v8.0 board using pinout from this diagram (and ground). Using openFpgaLoader:

# openFPGALoader --verbose-level 2 -c ft2232 --detect
Jtag frequency : requested 6.00MHz   -> real 6.00MHz 
Raw IDCODE:- 0 -> 0xfc000003
JTAG init failed with: Unknown device with IDCODE: 0xfc000003 (manufacturer: 0x001 (), part: 0x60 vers: 0xf

Using openOCD:

# openocd -f ft2232d.cfg  -f chubby.cfg 
Open On-Chip Debugger 0.11.0+dev-00693-g0a36acbf6 (2022-05-27-10:14)
Licensed under GNU GPL v2
For bug reports, read
    http://openocd.org/doc/doxygen/bugs.html
adapter speed: 100 kHz

Info : clock speed 100 kHz
Info : JTAG tap: lfe5u25.tap tap/device found: 0xfc000003 (mfg: 0x001 (AMD), part: 0xc000, ver: 0xf)
Warn : JTAG tap: lfe5u25.tap       UNEXPECTED: 0xfc000003 (mfg: 0x001 (AMD), part: 0xc000, ver: 0xf)
Error: JTAG tap: lfe5u25.tap  expected 1 of 1: 0x41111043 (mfg: 0x021 (Lattice Semi.), part: 0x1111, ver: 0x4)
Error: Trying to use configured scan chain anyway...
Warn : Bypassing JTAG setup events due to errors
Warn : gdb services need one or more targets defined
shutdown command invoked

ft2232d.cfg:

adapter driver ftdi
ftdi vid_pid 0x0403 0x6010
ftdi layout_init 0x0008 0x2b

transport select jtag
adapter speed 100

chubby.cfg:

jtag newtap lfe5u25 tap -expected-id 0x41111043 -irlen 8

init
scan_chain
shutdown

This probe has been successfully used with other jtag/swd targets. Except for the JTAG board is fully working, connects with LEDset and Ledupgrade software via Ethernet.

MrMati commented 2 years ago

Problem was caused by damaged wires. I don't know why, but it works only when TDO wire is longer than others.