-
Notifications
You must be signed in to change notification settings - Fork 790
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
[opentitantool] Allow changing which pins to use for JTAG #20934
Conversation
HyperDebug by default does JTAG on five particular pins. However, as it is all bit-banging with no true hardware support, it is able to use almost any combination of pins. This PR introduces a transport-specific command to "move" the JTAG functionality to a different set of pins. Usage: `opentitantool --interface=hyperdebug transport set-jtag-pins <TCLK> <TMS> <TDI> <TDO> <TRSTn>` Signed-off-by: Jes B. Klinke <[email protected]> Change-Id: Ibf61be39949b6330f4dd1ec01c44bbdc5cc2350c
Thanks Jes. We are still testing this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Is proxy support necessary?
The code looks good. Maybe keep the PR open until we've validated it works? |
Maybe at some point. For now, proxy support is not implemented for any JTAG functionality.
Yes, I will wait for you Ben, to try this out on real hardware, before merging. |
@BenBenderOT have you had a chance to try this out on actual hardware? |
@jesultra we tried setting to pins we needed. Still unable to confirm it worked. Hopefully today or tomorrow. |
I'm using the "hyper310" interface instead of the "hyperdebug" interface. Should that make a difference? In any case, as soon as I try to set the pins to their default settings using the command, no signals are seen anymore and examination fails. |
That was unexpected. It should not matter that you use It is hard for me to understand, how setting JTAG pins to their default setting would cause JTAG to stop working. Looking at the HyperDebug firmware code, I see a bug that can be triggered if you first do some JTAG communication, then switches JTAG pins, and then tries JTAG communication again. Could you try hitting the black reset button on your HyperDebug board, and then seeing if OpenOCD can connect? Assuming that works, then please reset again, then set the pins to their default value, and then see if OpenOCD can connect. Also, could you post the exact command you use to the pins to their default? This one should do it, but using aliases of the given pins should result in the same:
|
This feature did not work due to a silly bug in the HyperDebug firmware. With the below fix, I have observed JTAG on my CW310 work with some jumper wires to non-standard pins on HyperDebug. In plan on merging this, once the updated firmware has been included in opentitantool. |
Successfully created backport PR for |
HyperDebug by default does JTAG on five particular pins. However, as it is all bit-banging with no true hardware support, it is able to use almost any combination of pins.
This PR introduces a transport-specific command to "move" the JTAG functionality to a different set of pins.
Usage:
opentitantool --interface=hyperdebug transport set-jtag-pins <TCLK> <TMS> <TDI> <TDO> <TRSTn>