adiv5: Add comment to ap probe loop

This commit is contained in:
James Turton 2022-09-02 10:44:24 +02:00 committed by Rachel Mant
parent 0d9ff6c4b1
commit eb17a279a5
1 changed files with 6 additions and 3 deletions

View File

@ -811,7 +811,7 @@ void adiv5_dp_init(ADIv5_DP_t *dp, const uint32_t idcode)
* correctly on STM32. CDBGRSTACK is never asserted, and we * correctly on STM32. CDBGRSTACK is never asserted, and we
* just wait forever. This scenario is described in B2.4.1 * just wait forever. This scenario is described in B2.4.1
* so we have a timeout mechanism in addition to the sensing one. */ * so we have a timeout mechanism in addition to the sensing one. */
platform_timeout_set(&timeout, 201); platform_timeout_set(&timeout, 200);
/* Write request for debug reset */ /* Write request for debug reset */
adiv5_dp_write(dp, ADIV5_DP_CTRLSTAT, ctrlstat |= ADIV5_DP_CTRLSTAT_CDBGRSTREQ); adiv5_dp_write(dp, ADIV5_DP_CTRLSTAT, ctrlstat |= ADIV5_DP_CTRLSTAT_CDBGRSTREQ);
/* Wait for acknowledge */ /* Wait for acknowledge */
@ -845,9 +845,12 @@ void adiv5_dp_init(ADIv5_DP_t *dp, const uint32_t idcode)
if (dp->ap_cleanup) if (dp->ap_cleanup)
dp->ap_cleanup(i); dp->ap_cleanup(i);
#endif #endif
if (++invalid_aps == 8) { /* We have probably found all APs on this DP so no need to keep looking.
* Continue with rest of init function down below.
*/
if (++invalid_aps == 8)
break; break;
}
continue; continue;
} }