Remove retries for faults in CmsisDap probe #3466
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Retrying commands that result in a FAULT flag being set is problematic for the NXP IMXRT685s:
When issuing SYSRESETREQ to AIRCR the target responds with a FAULT flag @ https://github.com/probe-rs/probe-rs/blob/master/probe-rs/src/vendor/nxp/sequences/nxp_armv8m.rs#L687-L696. Probe-rs retries the command for 5 times in this case. https://github.com/probe-rs/probe-rs/blob/master/probe-rs/src/probe/cmsisdap/mod.rs#L523
Depending on the speed of the host machine, this presumably results the target being reset in the bootloader, which causes the target to no longer respond (hence the WAIT states). Validated this by temporarily removing retries on a slow host, removing the issue, and introducing the issue by adding a 1ms delay after a FAULT in the batch processor.
Basically, on my slower laptop, probe-rs does not work at all when programming/debugging the NXP IMXRT685s.
With this PR I want to get the conversation started:
Note that in the polyfill probe only WAIT, not FAULT, is retried. So if we want it in Cmsisdap probe, then probably we want it in the polyfill probe too.
Original issue: #3248 (comment)