adiv5: Fixed the naming of a timeout in cortexm_prepare
This commit is contained in:
parent
013b2dee60
commit
bb3e74062e
|
@ -428,14 +428,14 @@ static bool cortexm_prepare(ADIv5_AP_t *ap)
|
|||
ap->ap_cortexm_demcr = adiv5_mem_read32(ap, CORTEXM_DEMCR);
|
||||
const uint32_t demcr = CORTEXM_DEMCR_TRCENA | CORTEXM_DEMCR_VC_HARDERR | CORTEXM_DEMCR_VC_CORERESET;
|
||||
adiv5_mem_write(ap, CORTEXM_DEMCR, &demcr, sizeof(demcr));
|
||||
platform_timeout to;
|
||||
platform_timeout_set(&to, cortexm_wait_timeout);
|
||||
platform_timeout reset_timeout;
|
||||
platform_timeout_set(&reset_timeout, cortexm_wait_timeout);
|
||||
platform_nrst_set_val(false);
|
||||
while (1) {
|
||||
dhcsr = adiv5_mem_read32(ap, CORTEXM_DHCSR);
|
||||
if (!(dhcsr & CORTEXM_DHCSR_S_RESET_ST))
|
||||
break;
|
||||
if (platform_timeout_is_expired(&to)) {
|
||||
if (platform_timeout_is_expired(&reset_timeout)) {
|
||||
DEBUG_WARN("Error releasing from reset\n");
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue