]> git.sur5r.net Git - openocd/commit
target/arm_adi_v5, cortex_m: retry ahbap_debugport_init few times in case of an error
authorPaul Fertser <fercerpav@gmail.com>
Fri, 13 Mar 2015 14:55:51 +0000 (17:55 +0300)
committerPaul Fertser <fercerpav@gmail.com>
Tue, 14 Apr 2015 12:19:09 +0000 (13:19 +0100)
commitbdfd5bbe0473d9db7949dd303bcb28282a17a47d
tree17320f63faf89ba7835d41ea0a15d309b92a1078
parent13ac3d556c8cae37807801b64c289a3e9bfde359
target/arm_adi_v5, cortex_m: retry ahbap_debugport_init few times in case of an error

Some targets need arbitrary amount of time (usually not too long)
after reset (both sysresetreq and srst) to do initialisation, and
SWD/JTAG is not available during that. According to PSoC4 docs, the
debugger should try connecting until it succeeds.

Also ahbap_debugport_init might be necessary to perform after using
hardware srst too, so add it there (except for the targets that
support srst_nogate since they are very unlikely to need it).

Change-Id: I3598d5ff7b8e0bf3a5566a57dec4b0b2b243d297
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2601
Tested-by: jenkins
src/target/arm_adi_v5.c
src/target/cortex_m.c