-
-
Notifications
You must be signed in to change notification settings - Fork 792
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
Feature: STM32 watchdog timer control #1882
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8701675
to
cd8441d
Compare
f986653
to
592c070
Compare
…er re-use the existing code
…en debug halted, and configuring processor debug to work through WFI/WFE
…he target support is built from
…en attaching and detaching
…ntation, and handling for the GD32VF103's DBGMCU
…TM32F4 DBGMCU support
…and configuring processor debug to work through WFI/WFE
… in the command string, which doesn't work
2675a6d
to
9c46078
Compare
…biguate their purpose and use
…rly freezing the watchdogs
…documentation block to bring it into line with the rest of the code base
…rt implementations
…1 parts to simplify map setup and DBGMCU handling
…th WFI/WFE debugging and freezing the WDTs while in debug halt
… debug through WFI/WFE
… as these things can be achieved with the options bytes command
…h the DBGMCU properly
…e correct location to get a valid identification on the part
9c46078
to
c4785d0
Compare
esden
approved these changes
Aug 6, 2024
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 so that it gets more testing from users. It should improve the status quo.
This was referenced Aug 14, 2024
This was referenced Dec 9, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Bug
Confirmed bug
Enhancement
General project improvement
User Testing Needed
Looking for user testing reports
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.
Detailed description
In this PR we sort out support for and deal with WDTs support across the whole STM32 range supported. Included in this are fixes for issues such as bad Flash maps on some families, which were necessary to properly deal with differences in part addresses such as on the STM32L1 family where the address the DBGMCU is at changes based on which part it is in the family.
The approach used here needs work for handling what happens if a user attaches into a part, changes the code in Flash on the part, runs that new code which then modifies certain DBGMCU registers such as to set up tracing, and then detaches. Even with this limitation/bug in place, this greatly improves the state of debug across these families, by properly handling the WDTs during processor halt, and by properly setting up handling for WFI and WFE instructions encountered while debugging, solving a very long-standing problem with STM32 support.
This PR has been tested as much as possible on STM32F1/GD32F1, GD32VF1, STM32F4, STM32H5, STM32MP15 and STM32H7 parts, but we do not have the parts to test this on other series. We've done our best not to break anything however, so the chances of a regression are low. That said, user testing by people who do have parts, and preferably by people using the WDTs or WFI/WFE instructions, would be much appreciated.
Your checklist for this pull request
Closing issues
Fixes #117 (at least for STM32; LPC parts are generally already ok; i.MXRT is already taken care of; other parts are unknowns, but should probably be their own separate PRs and issues)
Also fixes #612