<Haohmaru>
some of these signals can have alternative names btw
<Guest3>
my understanding is that i should wire the GND_Detect pin to GND which the board can use to detect the probe or something, and that the SRST pin can be an output GPIO of the FTDI dongle, and used to reset the board (by driving it to ground, the codewarrior TAP seem to use a 50ohm resistor here).
<Haohmaru>
but probably the first thing to do is to check the chip's datasheets/documents, it should have example or recommendation on how to connect a debugger
<Guest3>
Must be wired to the target system. The
<Guest3>
CodeWarrior TAP probe uses this signal
<Guest3>
to determine if power is applied to the
<Guest3>
target system. This signal is also used
<Guest3>
as a voltage reference for the signals
<Guest3>
driven by the CodeWarrior TAP probe
<Guest3>
(CKSI_B, TRST_B, TCK, TMS, TDI).
<Guest3>
TGT PWR (pin 6) should be connected
<Guest3>
to the target system Vcc through a pull-
<Guest3>
up resistor. The CodeWarrior TAP will
<Guest3>
draw less than 50μA from this signal, so
<Guest3>
a weak pullup is sufficient (1KOhm).but my doubt is about the VTREF, which is marked 3.3 V power sense on my board manual, and the code warrior tap user guide says :
<Haohmaru>
x_x
<Haohmaru>
use a pastebin for walls of text like that ^
<Guest3>
yeah, noticed, will do next time, sorry :/
<Haohmaru>
i'm not too sure if openocd uses "voltage detection" tbh
<Guest3>
anyway, my question is the VTREF, i don't understand if i should connect it to the VCC pin of the FTDI, just leave it alone, or do some magic trick using a a GPIO.
<Haohmaru>
but that might depend on the debug interface, and i've only used SWD, and yours is JTAG
<Haohmaru>
VTREF is sorta like Voltage of the Target
<Haohmaru>
it could also be called Vtarget
rkta has left #openocd [#openocd]
<Guest3>
the code warrior tap guide also says : VTREF From target system 2Mohm pull-down, plus 0.01F load
<Haohmaru>
a debugger can use it to measure the actual voltage, it can use it to power its own "level shifters" so that the JTAG signals are the same voltage levels as the target's (in case that's not the same as what the debugger actually runs on)
<Haohmaru>
it can also be used by the debugger to inject power into the target, that can be dangerous tho, so it has to be done carefully
<Guest3>
so, definitively, i don't connect it to the VCC pin of the FTDI dongle, but maybe a GPIO, in order to detect when the board is powered ?
<Haohmaru>
the simplest thing you can do is to leave it unconnected and see what happens
<Guest3>
yeah, that is why i needed help, i don't want to fry the board.
<Guest3>
(or maybe put a led on it ?)
<Haohmaru>
in that case both the target and the debugger should be powered independantly
<Haohmaru>
also mind the signal logic levels
<Haohmaru>
like, if the debugger is 3.3V but the target is 1.8V think twice
<PaulFertser>
Guest3: hi. What FTDI dongle specifically do you have?
<Guest3>
yeah, it is 3.3V all of them, so i bought a3f C232HM-DDHSL-0, which is 3.3V signaling.
<Haohmaru>
then that makes things simple
<PaulFertser>
So just a breakout board, not a real adapter?
<PaulFertser>
That is suboptimal :/
<PaulFertser>
But should do.
<Guest3>
yes, it has pins, but i was going to solder a connector to a little board, and some connectors to make things easier.
<PaulFertser>
For some targets you'll really need to add series resistors (e.g. 47 Ohm) on every data line yourself with an adapter like that.
<Haohmaru>
ah, so it's not an FTDI board that is intended for JTAG, no convenient JTAG connector
<Guest3>
Yeah, well, i havea abatron BDI 2000 and a windriver probe too, but i guess those are no longer supported and can be garbaged :/
<PaulFertser>
As to the power, since this board has FTDI's Vccio pin fed from internal 3.3 V LDO not much you can do about it other than only using it with targets that have same 3.3 V Vcc and Vtref shouldn't be connected in this case.
<PaulFertser>
Normally Vtref is used to feed the right voltage from the the target to adapter and it's often directly used to power the voltage translation buffer there.
<Guest3>
(at least the BDI 2000)
<PaulFertser>
But since you have no buffer...
<PaulFertser>
Guest3: but you could have gotten something proper like Olimex ARM JTAG H or BusBlaster or something.
<Guest3>
yeah, i guess i should have asked here first before buying
<PaulFertser>
Among the FTDI based adapters TUMPA (non-lite) was the cheapest "sane enough" one.
<Guest3>
i didn't really find info on the openocd documentation though.
<Haohmaru>
he could perhaps look at the schematics of FTDI boards that are intended as JTAG debuggers, to see what sort of things they add and what's connected to where
<Guest3>
how can i access to that ?
<Haohmaru>
schematics?
<Guest3>
yes.
<PaulFertser>
Guest3: don't bother
<Guest3>
:)
<PaulFertser>
If your target is 3.3 V you can use ftdi breakout.
<PaulFertser>
But you /might/ need that series termination.
<Guest3>
series termination ?
<Haohmaru>
if both things are always the same voltage - things are simple
<Haohmaru>
you'd still wanna put those series resistors
<Haohmaru>
put these on all of the signals, not on the GND tho
<Guest3>
so, i solder a board with the COP 10 pin connector, i put the serie resistor on the signals, put a led on vtref (or leave it out altogether), wire ground to ground, wire ground detect to ground (directly) and put a GPIO pin on SRTST wchich can be used to reset the board.
<PaulFertser>
Guest3: skip vtref, yes.
<PaulFertser>
Guest3: better use pin for SRST that's already present in upstream config.
<Haohmaru>
if you'd put a LED that draws power from the target, then at least use a very low current one, like, i'd put one with 10k resistor
<PaulFertser>
Guest3: another common trick is to use a flat cable with every second wire connected to ground, that really helps with higher frequencies
<Guest3>
ok, i will try that out, i may have other questions latter on openocd itself, and the config and stuff. I guess it will be good if i document my work and post is somewhere or something.
<PaulFertser>
Haohmaru: hm a LED which would be visible with that little current? Are you sure? ;)
<Haohmaru>
yes... 10k is my default LED resistor
<Guest3>
i could also put a GPIO to VTREF, so i can detect power of the board.
<PaulFertser>
Guest3: interface/ftdi/um232h.cfg is what I'd suggest to follow
<Haohmaru>
(of course this requires nice LEDs, which are available at local distributor)
<Guest3>
i thought c232hm.cfg was the right one.
<Haohmaru>
Guest3, this only makes sense if the program (openocd) actually has mechanisms to use such a pin to detect a voltage presence/absence
<Haohmaru>
at least the true green, blue, red, orange, and white
<Haohmaru>
and mega cheap
<PaulFertser>
Guest3: are they different?
<Guest3>
PaulFertser: thanks for the um232h.cfg trick, i was going to go with the c232hm.cfg, which is the board i have, but which didn't dedicate a SRST pin.
<Guest3>
anyway, off to the electronic shop to buy what i need.
<PaulFertser>
Guest3: consider TUMPA if you like FTDI MPSSE
Guest3 has quit [Quit: Client closed]
<Haohmaru>
later in the News: Whole apartment building burned down to the ground. The fire started from a DIYer playing with electronics at home..."