NishanthMenon changed the topic of #openocd to: this is the place to discuss all things OpenOCD | Logs: https://libera.irclog.whitequark.org/openocd/
Hawk777 has joined #openocd
dan922 has joined #openocd
nerozero has joined #openocd
Hawk777 has quit [Quit: Leaving.]
Haohmaru has joined #openocd
dan922 has quit [Quit: Client closed]
<Haohmaru> i still can't reproduce the intermittent success from yesterday, bluh
<PaulFertser> Haohmaru: just reproducing won't help much anyway, don't bother.
<Haohmaru> i thought i had some theories, i even added custom commands to openocd to try stuff..
<Haohmaru> well it smells like it's not far from possible for this thing to work, so it's a shame that it doesn't work
<Haohmaru> i found some clues from some other program (written in ehm, Rust) where they also set the SWDIO low, not just SWCLK
<Haohmaru> what peripheral is used by the debugger for the SWD? SPI with some external circuitry to merge MISO and MOSI into one?
<PaulFertser> Haohmaru: you can check DAPLink firmware sources to see.
<Haohmaru> it looks like they just.... bit-bang it x_x
<Haohmaru> this is soooo crapduino-grade
<Haohmaru> but i found some answers, the debugger's reset is wired to only drive low, so it's safe if you externally short it to GND
<PaulFertser> Haohmaru: it's kind of hard to properly implement JTAG with hardware SPI. Because you need TMS signal in sync too. For SWD to "merge" MISO and MOSI you also need some way to enable driving the line somehow fully in sync.
<PaulFertser> Haohmaru: so with basic MCU peripherals it's not clear how you can /not/ bitbang it for the purpose.
<Haohmaru> i was thinking SWD, not jtag
<PaulFertser> Of course reset is open drain in all normal proper adapters (TUMPA is not normal in this regard).
<Haohmaru> well, SPI or I2S
<Haohmaru> or one of the fancier SPIs with multiple data pins
<Haohmaru> if you must, use one SPI data out to make the SWCLK, there's gotta be A Better Way(tm)
<PaulFertser> If there's one on that target.
<Haohmaru> you mean on the debugger MCU?
<PaulFertser> Yes
<Haohmaru> there should be suitable MCUs, i'm 99% there's a silly samd2x with I2S (not to mention the SERCOMs) and USB
<Haohmaru> and that's just from the MCUs i know of
<Haohmaru> this is so stupid it makes me consider attempting to make a SWD debugger myself ;P~
<Haohmaru> what stops me is the zero clue about SWD and USB
<Haohmaru> but SWCLK is a bit clock, its direction is from the debugger to the target, while SWDIO is bi-directional, afaiu, so at minimum something similar to SPI should work
<Haohmaru> with some dumb external circuitry
<Haohmaru> one of my dumb projects was extracting bytes from SPDIF (I2S actually) on a silly xmega that is waaay too slow for this, so i used shift-registers and made the data parallel ;P~
<PaulFertser> I have to deal with one I2S riddle today...
<Haohmaru> how does it sound like? ;P~
<PaulFertser> Somehow cheap INMP441 aliexpress I2S mic works properly but adafruit's SPH0645 doesn't, and that's using adafruit's "driver".
<PaulFertser> (with raspberrypi)
wingsorc has quit [Ping timeout: 260 seconds]
<Haohmaru> no sound or "garbage" ?
slobodan has joined #openocd
<PaulFertser> Haohmaru: not just zeroes
<Haohmaru> maybe the dataformat isn't right then?
<Haohmaru> the two don't seem to be the same format, from first look
<Haohmaru> the TDK one is i think "i2s" where there's like 1 bit shift, it's 24bits in a 32bit word, the Beyonce Knowles one is different, still looks like a 32bit word
<Haohmaru> if your I2S interface is adjustable, try to adjust it in the right format
<Haohmaru> ah, also, it's 18bit data
<Haohmaru> altho "The mode must be I2S with MSB delayed 1 BCLK cycle after WS changes" maybe it's the same, their signal diagram fooled me
<Haohmaru> so then they are less different, only the audio sample bits are different
<Haohmaru> and if you want two mics for stereo - the TDK one is simpler to set up
<Haohmaru> PaulFertser, are you in a stereo setup?
<Haohmaru> if the SWD has awkward data sizes, then two SPIs could possibly be used in sync
merethan has joined #openocd
<karlp> or, you just bitbang it, like all the existing hardware dongles, and it really hasn't beena problem for any of them so far...
<Haohmaru> >:/
<Haohmaru> an even easier way might be two sync usarts
<Haohmaru> anyway, one SPI slaved to another, one of them will output 1 data bits which would be used to externally mask-out the unneded clocks with a logic AND or something
<PaulFertser> Haohmaru: how is the TDK simpler, why?
<Haohmaru> if you want two working as stereo
<Haohmaru> i saw just a single pin with which you select whether this should be the Left or the Right one
<Haohmaru> on the Beyonce one it seems a bit more awkward
<PaulFertser> Haohmaru: right, and what's the difference between that SPH and 441?
<PaulFertser> I didn't spot any yet
<Haohmaru> oh, their example circuit looks equally simple, then i got fooled by the description
<Haohmaru> from the diagrams, it looks like they have a different clock edge meaning...
<Haohmaru> on the TDK one, the diagram looks like you're supposed to read the data bits on a rising edge
merethan_ has joined #openocd
merethan has quit [Ping timeout: 268 seconds]
slobodan_ has joined #openocd
slobodan has quit [Read error: Connection reset by peer]
slobodan__ has joined #openocd
slobodan_ has quit [Ping timeout: 255 seconds]
zkrx has quit [Ping timeout: 252 seconds]
zkrx has joined #openocd
slobodan__ has quit [Ping timeout: 264 seconds]
defiant has quit [Quit: defiant]
Foxyloxy has joined #openocd
slobodan__ has joined #openocd
Foxyloxy_ has quit [Ping timeout: 264 seconds]
gzlb has quit [Ping timeout: 240 seconds]
gzlb has joined #openocd
jbennettdoy has joined #openocd
Haohmaru has quit [Quit: saionara]
merethan has joined #openocd
merethan_ has quit [Ping timeout: 268 seconds]
merethan_ has joined #openocd
Hawk777 has joined #openocd
merethan_ has quit [Read error: Connection reset by peer]
merethan_ has joined #openocd
gzlb has quit [Ping timeout: 240 seconds]
merethan has quit [Ping timeout: 268 seconds]
gzlb has joined #openocd
merethan_ has quit [Ping timeout: 260 seconds]
merethan has joined #openocd
jbennettdoy has quit [Quit: KVIrc 5.2.4 Quasar http://www.kvirc.net/]
tlwoerner has quit [Ping timeout: 240 seconds]
tlwoerner has joined #openocd
tlwoerner has quit [Ping timeout: 268 seconds]
tlwoerner has joined #openocd
merethan has quit [Ping timeout: 255 seconds]
Hooligan has joined #openocd
Hooligan has quit [Ping timeout: 272 seconds]
nerozero has quit [Ping timeout: 256 seconds]
slobodan has joined #openocd
slobodan__ has quit [Read error: Connection reset by peer]
slobodan has quit [Remote host closed the connection]
slobodan has joined #openocd
slobodan_ has joined #openocd
zkrx has quit []
slobodan has quit [Ping timeout: 268 seconds]
slobodan__ has joined #openocd
slobodan_ has quit [Ping timeout: 268 seconds]
wingsorc has joined #openocd
zkrx has joined #openocd
Hawk777 has quit [Quit: Leaving.]
Hawk777 has joined #openocd
slobodan__ has quit [Ping timeout: 260 seconds]
gzlb has quit [Read error: Connection reset by peer]
gzlb has joined #openocd
gzlb has quit [Read error: Connection reset by peer]
renrelkha has quit [Quit: bye]
renrelkha has joined #openocd
gzlb has joined #openocd