From 1f7a7167101d94f1faf00e67e37f07bf956c1800 Mon Sep 17 00:00:00 2001 From: Uwe Bonnes Date: Thu, 22 Oct 2020 15:48:23 +0200 Subject: [PATCH] adiv5.c: Run cortexm_prepare on all suspected CortexM instances. Gets all debug units of the second CPU of a STM32H745 visible. --- src/target/adiv5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/target/adiv5.c b/src/target/adiv5.c index 7190b494..80cf7daf 100644 --- a/src/target/adiv5.c +++ b/src/target/adiv5.c @@ -411,7 +411,7 @@ static bool adiv5_component_probe(ADIv5_AP_t *ap, uint32_t addr, int recursion, uint32_t cidr = adiv5_ap_read_id(ap, addr + CIDR0_OFFSET); if ((cidr & ~CID_CLASS_MASK) != CID_PREAMBLE) { /* Maybe caused by a not halted CortexM */ - if (!ap->apsel && ((ap->idr & 0xf) == ARM_AP_TYPE_AHB)) { + if ((ap->idr & 0xf) == ARM_AP_TYPE_AHB) { if (!cortexm_prepare(ap)) return false; /* Halting failed! */ /* CPU now halted, read cidr again. */