-
-
Notifications
You must be signed in to change notification settings - Fork 770
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
Fix: ADIv5 DP init #1544
Fix: ADIv5 DP init #1544
Conversation
This try execpt block was watching for a timeout, but there are at the moment no timeout exceptions thrown in the codebase The original exeption present in the adiv5_dp_read stack this code was likely handling was removed in commit: 0c63903 where the abort to recover from bad access implemented by the exeption case of this block was also implemented at a lower level this means the exception block code was never run, and the re-read on timeout probably stoped happening since then Currently a protocol recovery mechanism is implemented which should provide the functionality this code was originally trying to employ
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, there's only one item we've spotted in review and with that fixed this looks good to merge. Really great job!
This sees the introduction of adiv5_read_dpidr, which keeps the try except funkiness contained and prevents the need for volatile variables in the scope of more complex functions blocking possible optimizations
83e64dc
to
f039068
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, merging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Testing this as part of rebasing PR1546 yields a possible regression for me with STM32MP15.
Detailed description
This PR does a much needed cleanup in
adiv5_dp_init
, related to theTRY_CATCH
blocksTRY_CATCH
brings clobbering errors, forcing us to volatile certain variables and thus blocking certain optimizationsThis contains the problematic code and unblocks optimizations, bringing a small code size saving
Tested with BMDA (J-Link V8) and native on a RP2040 target
Your checklist for this pull request
make PROBE_HOST=native
)make PROBE_HOST=hosted
)Closing issues