-
Notifications
You must be signed in to change notification settings - Fork 48
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
HRTIM #146
Open
usbalbin
wants to merge
75
commits into
stm32-rs:staged-pac
Choose a base branch
from
usbalbin:hrtim6
base: staged-pac
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
HRTIM #146
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
Closed
* Rcc enable is now handled for the entire HRTIM peripheral by dp.HRTIM_COMMON.hr_control() instead of by every timer * HRTIM calibration is now mandatory, also handled by `dp.HRTIM_COMMON.hr_control()` but also by running on that result `_.wait_for_calibration(). * Add `get_state` for `HrOutput` to check what state an output is in: `Idle`, `Running` or `Fault`
* dma - update for new pac * adc - triggers * hrtim
* Add output polarity * Add counting direction * Do not start timer directly when created, helps when used as AD trigger * Add methods for starting/stopping timers * Add some adc triggers
* One does no longer specify an EventSource variant manually, instead the user can pass the actual object that will emit the signal. For example pass a reference to HrCr1 to output.enable_reset_event to make output listen to HrCr1 * Added support for deadtime
This is quite an ugly hack but it does try to keep the API as unchanged as possible. This fix only fixes the problem on cat 3 and 4 devices for now. According to RM0440 under "DMAMUX mapping": For category 3 and category 4 devices: * DMAMUX channels 0 to 7 are connected to DMA1 channels 1 to 8 * DMAMUX channels 8 to 15 are connected to DMA2 channels 1 to 8 For category 2 devices: * DMAMUX channels 0 to 5 are connected to DMA1 channels 1 to 6 * DMAMUX channels 6 to 11 are connected to DMA2 channels 1 to 6
* Allow disabling update of shadow registers * Add `control` member to HrPwmControl * HRTIM now has its own `FaultMonitor` trait
… of init This ensures there is no sporadic output at the pins. This is a breaking change and does change and clean up quite a lot of things. Examples will need to be updated.
This reverts commit 298e6d9.
This reverts commit d3fc23d.
This is by no means complete. There are a lot of missing things like listening on events from neighbor timers, burst mode, chopper etc. However I still believe it does cover quite a lot of use cases. Some of which are showed in the examples. I am no type system ninja so there are probably a lot of things that can(and should?) be improved upon :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
NOTE: This is targeted at the
staged-pac
branch which depends on the newer staged pac