Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No JTAG Found #1

Open
Smokingenius opened this issue Apr 9, 2020 · 4 comments
Open

No JTAG Found #1

Smokingenius opened this issue Apr 9, 2020 · 4 comments

Comments

@Smokingenius
Copy link

Greetings,

I wanted to report an issue I was having using this go package. I recently got some used boards of ebay (claimed they still worked) to practice hacking on and the like. The reason I grabbed them is that they have nice big traces, have an FPGA, a PIC, and a SPI flash memory. The PIC and the FPGA/SPI sections each have a 6-pin header that is labeled "prog" which I am assuming is the minimal jtag header with a Vref and Gnd line. I connected to all 6 leads using 6 of the open GPIO lines on my rPI 3 rev 1.2. The software appears to run, but I don't get any output back, for either the PIC or FPGA prog connectors. I have tried increasing the delay on tck and reset, and turned on the pullup flag, but no luck.

Here is the final command I have used:
go/bin/go-jtagenum -pins '{ "pin1": 19, "pin2": 21, "pin3": 23, "pin4": 16, "pin5": 18, "pin6" 22 }' -scan_bypass -pullup -delay_tck 20 -delay_reset 20000 -driver rpio

The program performs the scan for the code, but just ends with no output after it says its scanning. I tested the -scan_loopback command, and nothing is appearing there, which I believe is to be expected.

I haven't looked up the PICs yet, but both boards have a Spartan 3 on them, one is an S1000 and the other appears to read S200 (don't quote me on the second one).

I had a similar scan issue using the JTAGenum with an Arduino I had laying around, after I saw this project spurred from that one.

Any help in possibly troubleshooting this issue would be appreciated.

@zOrg1331
Copy link
Contributor

Unfortunately, the process of enumerating JTAG is quite difficult to troubleshoot as a lot of things could go wrong.
I would suggest to eliminate as much uncertainties as possible. For instance, try to determine pins assignment using multimeter and some deduction. For instance, TCK pin usually has 33 Ohm resistor on its trace. Do not connect VCC pin.
Try to find if there is a RESET pin there. JTAGEnum may not handle it properly. For instance, your board needs to be in reset state to work with JTAG or the opposite.
Personally, I did not experiment with FPGA SoCs, may be there additional caveats there. :(

@Smokingenius
Copy link
Author

@zOrg1331 Thanks for the reply. Unfortunately on 3 different test boards I was unable to get the rPi JTAGenum working. I was able to get the Arduino one working after a long debug session this weekend. Come to find out the FPGA boards needed to be run off the Arduino alone, rather than with an external power supply. Other than the enumerator is missing the Vref line for JTAG, my only assumption is since the board draw is lower than the required 3.3v line supplied by the power supply to the board power line, it was too much noise on the JTAG line for the board to read correctly. I tried the same setup with the rPi, running the target boards off rPi GPIO power, but still couldn't get any sort of response. I even had -pullup -delay-tck 100 and -delay-reset 100000 that I did in combinations of 10 and 10000 steps, respectively.

The go-code looks good. Not sure if you have any other troubleshooting steps for me? The rPi is handing as I have a battery hat to run it, and I don't need a host to drive it, since I have the rPi screen and a keyboard I can tote along.

@zOrg1331
Copy link
Contributor

This Arduino you used was 5V or 3.3V?
If you succeeded with Arduino, it means that you now know the correct pinout. In this case you can try something like getting IDCODE with this tool on rPi.
Noise can also be added by rPi itself. It depends how you powered it: USB cable is bad or power supply is too weak. Or this battery hat was used?
Also, powering the whole target board by rPi's GPIO will not always work.

@Smokingenius
Copy link
Author

Yes, I do know he pinout now. I will give the IDCODE command a try.

I am using a strong usb micro power supply as it has to drive the screen and the board. I originally started with a digital power supply, which has three sections, using the lowest section which is 3.3v to 5.0v, allowing control on the voltage down to the thousandth of a volt. No response was ever given by rPi with the scan_bypass command to find the correct pinout.

The Arduinos I have are Elagoo Uno R3, and they have a power takeoff pinout with a 3.3v and a 5v line. I was driving the FPGA dev board with the 3.3v line from the Arduino to the 3.3v power in line on the board. I tried this same approach with the rPi to no avail as well, though I did show the board was powered as my volt meter showed the fpga drawing current and proper volts, right at 2.5v for the Vaux lines that run into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants