[Libre-soc-bugs] [Bug 517] Define JTAG pins and set up with litex for ulx3s85f
bugzilla-daemon at libre-soc.org
bugzilla-daemon at libre-soc.org
Fri Oct 30 18:26:04 GMT 2020
https://bugs.libre-soc.org/show_bug.cgi?id=517
--- Comment #30 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
(In reply to Cole Poirier from comment #29)
> ```proposed FPGA External Pin to STLINK JTAG pin connecitons
> pin # | label # | FPGA IO PAD | GPIO # (n/p) | JTAG Pin # (Signal) |
> 1 | 3.3v | NONE | 3v3 | 1 (MCU VDD) |
> 2 | 3.3v | NONE | 3v3 | 2 (MCU VDD) |
good, yes. the power *from* the ulx3s goes *into* the IO side of the STLinkv2
so as to provide the Reference Voltage it needs relative to ulx3s's IO.
> 3 | -|(GND) | NONE | GND | 3 (JNTRST) |
don't connect up reset, it's a driving pin (output) and it looks like you
shorted it to GND. that would damage the STLinkv2.
we're running "soft" reset (which is done with 5 ticks of TMS set to 1 i think)
> 4 | -|(GND) | NONE | GND | 4 (GND) |
> 5 (J1_5-) | 0 | C11 | gn[0] | 5 (JTDI) |
> 6 (J1_5+) | 0 | B11 | gp[0] | 7 (JTMS) |
> 7 (J1_7-) | 1 | A11 | gn[1] | 9 (JTCK) |
> 8 (J1_7+) | 1 | A10 | gp[1] | 13 (JTDO) |
these look good i.e. accurate n0 p0 n1 p1 to the platform request below
> 9 (J1_9-) | 2 | B10 | gn[2] | NONE |
> 10 (J1_9+) | 2 | A9 | gp[2] | NONE |
> ```
>
> ```proposed nmigen in litex/florent/versa_ecp5.py
> gpio0 = self.platform.request("gpio", 0)
> gpio1 = self.platform.request("gpio", 1)
>
>
> jtag_tdi = gpio0.n
> jtag_tms = gpio0.p
> jtag_tck = gpio1.n
> jtag_tdo = gpio1.p
>
> # wire the pins up to CPU JTAG
> self.comb += self.cpu.jtag_tdi.eq(jtag_tdi)
> self.comb += self.cpu.jtag_tms.eq(jtag_tms)
> self.comb += self.cpu.jtag_tdi.eq(jtag_tdi)
> self.comb += jtag_tdo.eq(self.cpu.jtag_tdo)
> ```
yeah that looks good to me
> Hi Luke, here is my plan for the physical connecting of the FPGA gpio pins
> to the STLINK JTAG pins, and the nmigen code to initialize these selected
> gpio pins as the 4 necessary JTAG pins. Can you approve this?
no i cannot. i can help you *review* it however i am not going to "approve" it
because it's your hardware, and your responsibility to make sure the
connections are right and don't involve any short-circuits.
if i "approve" it, you might make the mistake of thinking that *i* am taking
that responsibility away from you.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the libre-soc-bugs
mailing list