NishanthMenon changed the topic of #openocd to: this is the place to discuss all things OpenOCD | Logs: https://libera.irclog.whitequark.org/openocd/
thinkfat_ has joined #openocd
thinkfat has quit [Ping timeout: 272 seconds]
boru` has joined #openocd
boru has quit [Killed (NickServ (GHOST command used by boru`))]
boru` is now known as boru
tsal_ has quit [Ping timeout: 255 seconds]
tsal has joined #openocd
flatmush has quit [Ping timeout: 272 seconds]
<zapb_> Nope, but changed anyway ;D
flatmush has joined #openocd
Hawk777 has joined #openocd
nerozero has joined #openocd
Hawk777 has quit [Quit: Leaving.]
Haohmaru has joined #openocd
zapb_ has quit [Remote host closed the connection]
zapb__ has joined #openocd
Steffann has joined #openocd
ericonr- has joined #openocd
ericonr has quit [Killed (osmium.libera.chat (Nickname regained by services))]
ericonr- is now known as ericonr
tsal has quit [*.net *.split]
Steffanx has quit [*.net *.split]
urja has quit [*.net *.split]
tsal has joined #openocd
urja has joined #openocd
ericonr has quit [Ping timeout: 245 seconds]
ericonr has joined #openocd
Hawk777 has joined #openocd
Haohmaru has quit [Remote host closed the connection]
akaWolf has quit [Ping timeout: 265 seconds]
akaWolf has joined #openocd
rkta has quit [Remote host closed the connection]
rkta_ has joined #openocd
rkta_ is now known as rkta
c4017_ has joined #openocd
c4017 has quit [Ping timeout: 258 seconds]
c4017w_ has joined #openocd
c4017w has quit [Ping timeout: 268 seconds]
nerozero has quit [Ping timeout: 255 seconds]
joconor_ has quit [Quit: ZNC 1.8.2 - https://znc.in]
joconor has joined #openocd
<c4017w_> having some more weird issues with this chip. It has a boot mode selectable with one of the pins. When I start it in boot mode, OpenOCD can debug it fine. When I start it in run mode, I can connect and load firmware fine with GDB, but every time I 'si', it just keeps running and won't halt until I ctlr-c and 'monitor halt' at which point it prints a bunch of 'SWD DPIDR 0x5ba02477' before actually halting.
<c4017w_> Also, when I target_start_algorithm() in run mode, I get some errors SWD DPIDR 0x5ba02477
<c4017w_> Error setting register xPSR
<c4017w_> SWD DPIDR 0x5ba02477
<c4017w_> Error setting register pc
<c4017w_> SWD DPIDR 0x5ba02477
<c4017w_> It works fine in 'boot' mode
<PaulFertser> c4017w_: huh, that's rather weird indeed
<PaulFertser> c4017w_: probably in run mode it uses different frequency and your SWD is too high?
<c4017w_> could be, I'll try turning it way down
<c4017w_> It still connects though, and I can read memory or whatever
<c4017w_> PaulFertser, holy crap you're right! Changed from 1 MHz to 100 kHz and now it works. Somethings still not right, because it should be running faster than that, but that's another issue
<PaulFertser> c4017w_: to get it running faster you likely need to configure clock sources, PLLs etc.
<c4017w_> I'm doing all that in the reset handler, and I guess the problem is that it was failing to set PC in run mode, so it never got to that code. Just verified that the initial clock is 48 times slower in run mode, so that explains it
<PaulFertser> c4017w_: you can inspect PC with "reg" right after "reset halt".
<c4017w_> Wondering what's the best way to handle this. The chip starts up with a 500 kHz clock, so I have to start OpenOCD with a pretty slow clock. My flash loader algorithm will reconfigure MCU clock to 8 MHz once it's running, but how can I increase the adapter speed from inside my flash driver? Is it even a good idea?
<PaulFertser> c4017w_: not a good idea, no :)
<PaulFertser> c4017w_: the usual way is to add a couple of "mdw" commands to the reset-init handler.
<PaulFertser> c4017w_: as one is supposed to do flash operations only after "reset init" (and "program" helper does that automatically)
<PaulFertser> c4017w_: see e.g. stm32l1x.cfg
<c4017w_> PaulFertser, ah ok, that's reasonable
Steffann is now known as Steffanx
<c4017w_> invalid command name mmw?
<PaulFertser> c4017w_: yes, it's not a command, you need to source a Tcl script that provides it.
<c4017w_> I'm using mmw inside the reset-init, same as stm32l1. So how/where would I call 'reset init'?
<PaulFertser> c4017w_: but you need to source mem_helper.tcl
<c4017w_> ah got it
<c4017w_> thanks, that worked.
<PaulFertser> :)