On Fri, Mar 13, 2015 at 10:02:34AM +0100, Tomas Vanek wrote:
> >This is the first fail in SWD communication, The SWD init seq will be
> >sent automatically the very next attempt to talk to the target. If you
> >loop arp_waitstate for few times, it should succeed eventually.
>
> Unfortunately the very next attempt is sometimes too late. As in
> real life.

If you've configured that testbit to loop in ROM code, it's never too
late. If you didn't, it means the user issued "reset run", so there's
nowhere to hurry. Please show a log where 2596 + a mod to attempt
debugport init up to, say, 10 times fails.

> At least two targets need to send SWD init first. It sounds like an
> acceptable compromise
> to send SWD init when ahbap_debugport_init() retries.

It will be sent automatically, in full accordance with ADIv5, I'm yet
to see the case where that's not enough.

> Again to be robust, ahbap_debugport_init() should retry until some timeout.
> The question is do we need to configure that timeout? It is like an
> equivalent
> of adapter_nsrst_delay for sysresetreq, well not exactly.

If, say, 10 tries is enough even for PSoC4, I'd settle on a hardcoded
value. Or probably nsrst_delay should be performed after sysresetreq
too, that would seem somewhat logical.

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:[email protected]

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to