<Xogium>
rue_mohr: not to be rude but, can you please stop asking for people every time the channel is silent ? People have lives, they don't necessarily live in the same timezone as you either
<Xogium>
just saying
<rue_mohr>
sure
<rue_mohr>
hey, do you know a lot about crafting jtag transactions?
<Xogium>
I don't :/ I wish I knew though, it'd save my life sometimes
<rue_mohr>
hmm
<rue_mohr>
it looks like not a lot of people do
<Xogium>
well jtag is kind of a low level thing
<rue_mohr>
I think whitequark does, but if you want to talk about busy people thats quite the place to start
<Xogium>
^^
<rue_mohr>
what I dont know, is how to get openocd to do the state changes I want
<rue_mohr>
I tried chatgpt too, but it cant come up with even ONE valid openocd command
<Xogium>
yeah chatgpt is good for not specialized use cases
<Xogium>
try to get on an edge case and it won't be able to help
<rue_mohr>
it drew me an awesome SVG horse
<Xogium>
as for me, I've been stuck for 3 days in a row trying to do sntp with mbed-os
<Xogium>
I haven't followed what it is you're trying to do exactly, so I can't say
<Xogium>
is this a design of your own ?
<rue_mohr>
thats the normal state machine for jtag, I'm trying to use it to load data into a set of 74hc595 shift registers
<Xogium>
oh
<Xogium>
yeah that's way above my head unfortunately
<Xogium>
my stuff with jtag was mostly done on arm boards with jtag pins and already present in openocd
<rue_mohr>
you know what bothers me most
<Xogium>
rue_mohr: do tell
<rue_mohr>
is that, it could take me a week to work this out, then someone will say "oh do it like this" and give me a totally better answer from the ground up
<Xogium>
yeah :/ I had this happen so many times myself. It's always jsut as bad
<rue_mohr>
it seems to me that openocd is just a bunch of empty boxes with labels, that you fill with whatever the label says is for
<rue_mohr>
then it tires to apply the contents of the boxes to a process
<rue_mohr>
which I suppse is the state machine
<rue_mohr>
but
<rue_mohr>
mmm
<rue_mohr>
I should take a break and write an arduino tester for the CD4006
<Hawk777>
I wouldn’t be surprised if you couldn’t do this with OpenOCD. After all, a 74HC595 doesn’t actually speak JTAG. JTAG defines things like the instruction register and the data register and TMS sequences to get access to them; a 74HC595 has nothing like that, you’re really just looking for a basic synchronous serial port.
<rue_mohr>
I have one 595 set up, so its a single 8 bit shift register
<rue_mohr>
it says Warn : Haven't made progress in mpsse_flush() for 2002ms.
<Hawk777>
If I understand your diagram right, you want to sort of stay in drscan forever, just shifting and shifting and shifting, and maybe once in a while going through exit and pause but not update? Are you aware that those state transitions are accomplished by sending clock pulses with TMS set to relevant values, which assuming you just hooked up clock to your shift register input, means when you do state transitions you’ll also be advancin
<Hawk777>
g the data in the shift register?
<rue_mohr>
huh ok
<rue_mohr>
so your saying I should use reset and not TMS to latch the data into the output register of the 595
<Hawk777>
Maybe that would be better.
<rue_mohr>
dr is less critical about how many bits I have, right?
<Hawk777>
I’m not sure if drscan accepts DRSHIFT as its endstate, and if you can issue another drscan *starting in* DRSHIFT and have it not make any state transitions at all. If OpenOCD is OK with both of those things, I guess you could just use drscan with -endstate DRSHIFT over and over, interleaved with pulsing reset.
<rue_mohr>
its ok, if I can get the data into the register and then abort with a reset,, that works for me
<Hawk777>
True, I guess after doing a parallel load you don’t care if you do some extra clock cycles before the start of the next data.
<rue_mohr>
Haven't made progress in mpsse_flush() for 2002ms.
<rue_mohr>
not sure where I put my data...
<rue_mohr>
is 8 my number of bits or my data?
<Hawk777>
Per the docs for drscan, the parameters are TAP name (foo.bs), then bit width (8), then data (you left that out), then optionally more instances of the preceding two, then -endstate if you wish.
<rue_mohr>
Warn : Haven't made progress in mpsse_flush() for 2002ms. <-- what is that?
<Hawk777>
I believe it means the USB side of your FTDI chip is stuck in some way.
<rue_mohr>
oh ok!
<Hawk777>
MPSSE is the part of an FTDI chip that speaks JTAG (and a few other protocols).
<rue_mohr>
ok so, if I put on some leds, that might work
<Hawk777>
(FTDI chips can also speak SPI, which would probably be more appropriate for what you want here, but you’d have to write a bit of code or find a different tool to use them, since I don’t think OpenOCD supports it)
<Hawk777>
Maybe?
<rue_mohr>
I'm looking to standard dirt to do this
<rue_mohr>
if openocd can be shoehorned into pulling it off, then I'm wonderfully happy
<rue_mohr>
and I think it can
<rue_mohr>
of all you people who know things, nobody has said impossible
<Hawk777>
OK, not saying don’t do it, just beware that it’s a very screwdriver-shaped hammer :)
<rue_mohr>
yup
<rue_mohr>
but everyone has that screwdriver
<rue_mohr>
its a sears screwdriver
<rue_mohr>
Error: libusb_handle_events() failed with LIBUSB_ERROR_INTERRUPTED
<rue_mohr>
hmmm
<rue_mohr>
I'm gonna do a disconnect/reconnect on that adapter...
<rue_mohr>
aha
<rue_mohr>
Info : TAP foo.bs does not have valid IDCODE (idcode=0xffffff00)
<rue_mohr>
Info : TAP auto0.tap does not have valid IDCODE (idcode=0xffffff80)
<rue_mohr>
Info : TAP auto1.tap does not have valid IDCODE (idcode=0xffffffc0)
<rue_mohr>
I dont have anything hooked up to the output latch yet (reset or tms) its just an 8 bit shift register between tdi and tdo
<rue_mohr>
so tdi, tdo, and clk
<PaulFertser>
rue_mohr: and a logic analyser too I hope?
marcusmae has quit [Ping timeout: 240 seconds]
<PaulFertser>
rue_mohr: I think the problem is that somehow auto<N>.tap are not getting accounted for properly, and that leads to assertion. I don't have time atm to debug that though. And I think there's no easy way to disable that autodetection. Keep in mind that OpenOCD will add 0 bit for all /other than drscan/ taps as it would be trying to put all them in BYPASS and DR length in bypass is 1.
<rue_mohr>
I have one
<rue_mohr>
I'm trying to get openocd to accept the commands first
<PaulFertser>
That assertion there is apparently a bug, but this code path isn't getting exercised often.
<PaulFertser>
Your idea of abusing JTAG adapter is unorthodox enough to be uncommon.
<rue_mohr>
:]
<rue_mohr>
thats the definition of my name
<rue_mohr>
hmm
<rue_mohr>
question, can I get openocd to think its succeeded at one tap?
<rue_mohr>
I need to return a 1 dont I?
<PaulFertser>
rue_mohr: also if your register is shorter than 32 bits I'd use irscan rather than drscan.
<PaulFertser>
irscan doesn't give that assertion.
<rue_mohr>
ok, but then, to my understanding I need to be longer than 10 bits
<rue_mohr>
I'll throw in a 74ls165 for some led testing and worry about the strobe later
<rue_mohr>
no 164
<rue_mohr>
normal power, tdi is 1&2, tdo is 13, clk is 8, tie 9 high
marcusmae has joined #openocd
Fleck has quit [Ping timeout: 256 seconds]
Fleck has joined #openocd
Hawk777 has quit [Quit: Leaving.]
Fleck has quit [Ping timeout: 250 seconds]
Flecks has joined #openocd
<PaulFertser>
rue_mohr: hm, an idea, if you just need to put data into a shift register, you can bitbang them via srst (e.g. MOSI) and trst (CLK) signals with "adapter reset" command :)
<PaulFertser>
And with ftdi-based adapters you can define additional signals and then use ftdi_set_signal or whatever it's called to manually control all them.
wearyhacker has joined #openocd
wearyhacker has quit [Quit: Leaving]
diddly has joined #openocd
tlwoerner has joined #openocd
tlwoerner has quit [Ping timeout: 264 seconds]
tlwoerner has joined #openocd
nerozero has quit [Ping timeout: 240 seconds]
shibboleth has joined #openocd
wingsorc__ has joined #openocd
wingsorc has quit [Remote host closed the connection]
shibboleth has quit [Quit: shibboleth]
<rue_mohr>
ooo
<rue_mohr>
how do I SVF with openocd?
marcusmae has quit [Ping timeout: 246 seconds]
<PaulFertser>
rue_mohr: let me put it this way: what's unclear about the svf command as described by the OpenOCD User Manual?
<rue_mohr>
yes I'm completely green
<rue_mohr>
rememmber, I'm not trying to do standard things
<rue_mohr>
I'm the 4 component, 2 wire, LM555 LED flasher Rue. (as seen on the internet)
<rue_mohr>
SDR 8 TDI (55) SMASK (FF);
<rue_mohr>
?
<rue_mohr>
I dont want the spec, I want an example
<PaulFertser>
Why irscan isn't working for your purpose?
<rue_mohr>
there seems to be rules about not having pracitcal examples in a spec
<PaulFertser>
What exactly isn't happening right with irscan?
<rue_mohr>
I was running into errors, I cant find the terminal... ugh
<PaulFertser>
You showed no errors for your irscan attempt.