<NishanthMenon>
I am missing something here -> I am trying to configure reset correctly on TI's mspm0 launchpad, it has just nRST, so, I configured reset_config srst_only srst_push_pull and it gave me the above pulse. nicely. but reset init -> reports "timed out while waiting for target halted"
<PaulFertser>
NishanthMenon: reset init is "reset halt" plus running reset-init handler after that. So "reset halt" is what you're trying to do.
<PaulFertser>
NishanthMenon: reset halt normally works by setting vector catch to stop on reset handler and then by doing reset (physical pulse if that's enabled)
<NishanthMenon>
PaulFertser: -> yep -if i do "reset;init;halt" -> it throws "timed out while waiting for target halted", but "reset; init; sleep 1000; halt" works great. this would make sense that the startup time is a bit long
<PaulFertser>
NishanthMenon: so if the target is buggy and e.g. debug unit is reset too on nRST signal then it won't going to halt because the vector catch wouldn't work.
<PaulFertser>
Another possibity is "secret" ROM bootloader which is designed in a way to make halting on the first instruction impossible.
<PaulFertser>
NishanthMenon: don't do "init" there. Init makes sense just once in the whole OpenOCD session, it just changes from configuration mode to runtime mode (of OpenOCD itself, some commands are only available during either of states)
<PaulFertser>
Does this clear up the confusion?
<NishanthMenon>
PaulFertser: ok. is there any variable I can set to tell openOCD that system is ready after x ms of reset? swd adapter does'nt seem to like jtag_ntrst_delay
<PaulFertser>
NishanthMenon: is ready for what? "reset halt" _needs_ a way to stop at the first instruction of the reset handler.
<PaulFertser>
That's semantics.
<NishanthMenon>
aah true
<PaulFertser>
If you want to just stop at about arbitrary time you can do "reset; sleep 1000; halt" and that's it.
<NishanthMenon>
PaulFertser: yup - just that "program" seems to invoke reset init behind the scene
<PaulFertser>
btw, TRST is a signal from JTAG standard, it's meant to reset the state of only JTAG state machine and is not really needed as the state machine can be reset by other way.
<PaulFertser>
NishanthMenon: it does, yes. Because for programming flash you need to make sure the target is in some particular, always the same state.
<PaulFertser>
Imagine there's firmware that enables watchdog early on or some peripheral ISR. If you try to run target flash helper in that state you are going to get unpredictable results.
<NishanthMenon>
:) yes indeed - there is definitely a wdt that runs by default on startup.. ;)
<NishanthMenon>
ok - the proper solution will be to find a way to get the system to do a halt at very start.. let me dig at specs more.. there ought to be a way
<NishanthMenon>
thanks as usual PaulFertser ..
<PaulFertser>
NishanthMenon: always welcome :)
HelloShittyAlt has joined #openocd
<PaulFertser>
NishanthMenon: ti_cc3220sf.cfg is an example of a workaround
<NishanthMenon>
PaulFertser: aah thanks
<PaulFertser>
psoc6.cfg too
<PaulFertser>
But it would be better to find a more reliable solution of course.
HelloShitty has quit [Ping timeout: 258 seconds]
HelloShitty has joined #openocd
HelloShittyAlt has quit [Ping timeout: 252 seconds]
slobodan_ has quit [Read error: Connection reset by peer]
slobodan has joined #openocd
HelloShittyAlt has joined #openocd
HelloShitty has quit [Ping timeout: 240 seconds]
HelloShittyAlt is now known as HelloShitty
HelloShittyAlt has joined #openocd
HelloShitty has quit [Ping timeout: 258 seconds]
HelloShittyAlt has quit [Ping timeout: 246 seconds]
erhankur has quit [Remote host closed the connection]
erhankur has joined #openocd
erhankur has quit [Remote host closed the connection]
erhankur has joined #openocd
<NishanthMenon>
PaulFertser: thanks
tsal has joined #openocd
erhankur has quit [Remote host closed the connection]