Skip to content

Remove retries for faults in CmsisDap probe #3466

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 4, 2025

Conversation

Wassasin
Copy link
Contributor

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:

  • do we even want to retry commands that result in FAULT flags?
  • if no, will removing the retry cause probe-rs to be less reliable?
  • if the answer is "it depends", how do we want to change the API such that we can either configure the retry count, or disable retries for specific parts in a sequence.

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)

@Wassasin
Copy link
Contributor Author

Retries were added here: #462

@george-cosma
Copy link

+1 to this PR.

This also fixes similar issues with the LPC55S69 evaluation board

@bugadani
Copy link
Contributor

bugadani commented Aug 2, 2025

I think it's reasonable to do, but we've introduced a merge conflict recently. Could you please rebase?

@Wassasin Wassasin force-pushed the feature/no-fault-retry branch from d5361b8 to 5f72b3e Compare August 4, 2025 06:59
@Wassasin
Copy link
Contributor Author

Wassasin commented Aug 4, 2025

I think it's reasonable to do, but we've introduced a merge conflict recently. Could you please rebase?

Should be good now!

Copy link
Contributor

@bugadani bugadani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@bugadani bugadani added this pull request to the merge queue Aug 4, 2025
Merged via the queue into probe-rs:master with commit 9d0109e Aug 4, 2025
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy