cortexm: Only force halt before probe if idcode is unknown and ROM TABLE unreadable.

This commit is contained in:
Uwe Bonnes 2018-09-10 22:18:27 +02:00 committed by Gareth McMullin
parent 6633f74d95
commit 3ebf049424
1 changed files with 5 additions and 1 deletions

View File

@ -323,7 +323,11 @@ bool cortexm_probe(ADIv5_AP_t *ap, bool forced)
target_check_error(t); target_check_error(t);
} }
if (forced) /* Only force halt if read ROM Table failed and there is no DPv2
* targetid!
* So long, only STM32L0 is expected to enter this cause.
*/
if (forced && !ap->dp->targetid)
if (!cortexm_forced_halt(t)) if (!cortexm_forced_halt(t))
return false; return false;