From f76a7c4e92f704db5f0f655502875e29ac2651bd Mon Sep 17 00:00:00 2001 From: Uwe Bonnes Date: Thu, 22 Oct 2020 12:56:33 +0200 Subject: [PATCH] adiv5: Release devices after scan. Before, scanning only kept device stopped until POR or attach/detach cycle. --- src/target/adiv5.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/target/adiv5.c b/src/target/adiv5.c index b6990c9..21fcad3 100644 --- a/src/target/adiv5.c +++ b/src/target/adiv5.c @@ -750,6 +750,10 @@ void adiv5_dp_init(ADIv5_DP_t *dp) /* The rest should only be added after checking ROM table */ adiv5_component_probe(ap, ap->base, 0, 0); } + /* We halted at least CortexM for Romtable scan. + * Release the devices now. Attach() will halt them again.*/ + for (target *t = target_list; t; t = t->next) + target_halt_resume(t, false); adiv5_dp_unref(dp); }