From 6b5c492bc7d84d420627ef0c8dbf805a622abc06 Mon Sep 17 00:00:00 2001 From: dragonmux Date: Tue, 9 Aug 2022 04:38:57 +0100 Subject: [PATCH] adiv5_swdp: Implemented clock tristating for adiv5_swdp_scan --- src/command.c | 1 + src/target/adiv5_swdp.c | 1 + 2 files changed, 2 insertions(+) diff --git a/src/command.c b/src/command.c index 3bc126a..e1db30c 100644 --- a/src/command.c +++ b/src/command.c @@ -266,6 +266,7 @@ bool cmd_swdp_scan(target *t, int argc, const char **argv) } if (devs == 0) { + platform_target_clk_output_enable(false); platform_nrst_set_val(false); gdb_out("SW-DP scan failed!\n"); return false; diff --git a/src/target/adiv5_swdp.c b/src/target/adiv5_swdp.c index 1a7fd6a..4112736 100644 --- a/src/target/adiv5_swdp.c +++ b/src/target/adiv5_swdp.c @@ -89,6 +89,7 @@ uint32_t adiv5_swdp_scan(uint32_t targetid) if (swdptap_init(initial_dp)) return 0; + platform_target_clk_output_enable(true); /* DORMANT-> SWD sequence*/ initial_dp->seq_out(0xFFFFFFFF, 32); initial_dp->seq_out(0xFFFFFFFF, 32);