Hi Paul, as gerrit badly reformatted my reply, here is more readable version:
I tested this change with Kinetis K21 @ vsllink and PSoC4 @ stlink v2, vsllink, ftdi. Mostly there is no difference. reset halt with srst_only does not work on PSoC4 as usually. I see a minor regression for PSoC4 @ ftdi adapter. reset_config srst_only srst_push_pull srst_pulls_trst --master: "reset" works, "reset halt" do not --this change: any reset fails. Reexamining probably takes place when PSoC4 runs sysrom init and SWD access is disabled. Debug: 1001 38788 core.c:648 swd_add_reset(): SRST line released Debug: 1002 38788 arm_adi_v5.c:647 ahbap_debugport_init(): Debug: 1003 38788 arm_adi_v5.c:688 ahbap_debugport_init(): DAP: wait CDBGPWRUPACK Debug: 1004 38788 arm_adi_v5.h:391 dap_dp_poll_register(): DAP: poll 4, mask 0x0820000000, va lue 0x20000000 Debug: 1005 38788 ftdi.c:944 ftdi_swd_run_queue(): Executing 5 queued transactions Debug: 1006 38790 ftdi.c:976 ftdi_swd_run_queue(): JUNK DP read reg 4 = ffffffff User : 1007 38791 command.c:546 command_print(): in procedure 'reset' in procedure 'ocd_bouncer' Debug: 1008 38793 command.c:628 run_command(): Command failed with error code -4 On 8.3.2015 18:31, Paul Fertser (Code Review) wrote: > Hello Tomas Vanek, > > I'd like you to do a code review. Please visit > > http://openocd.zylin.com/2583 > > to review the following change. > > Change subject: target: reexamine the target after reset deasserted > ...................................................................... > > target: reexamine the target after reset deasserted > > After executing reset by whatever means, the debug logic in target > might be in the same state as after power-on-reset (and I'd say it's > valid to connect SRST to a circuit that physically power-cycles the > target, provided srst_pulls_trst option is used). > > This patch should help with "reset halt" on e.g. SAM4L, and removes > the relevant (and likely incomplete) hack from cortex_m. > > Reexamining a target shouldn't have any adverse effects in any case. > > Change-Id: Ib2dc30ba379a86e94b1a3452d2f0409088bc2db5 > Signed-off-by: Paul Fertser <fercer...@gmail.com> > --- > M src/target/cortex_m.c > M src/target/target.c > 2 files changed, 7 insertions(+), 14 deletions(-) > > > git pull ssh://openocd.zylin.com:29418/openocd refs/changes/83/2583/1 ------------------------------------------------------------------------------ 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 OpenOCD-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openocd-devel