Skip to content
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
wants to merge 85 commits into
base: staged-pac
Choose a base branch
from
Open

HRTIM #146

wants to merge 85 commits into from

Conversation

usbalbin
Copy link
Contributor

@usbalbin usbalbin commented Nov 9, 2024

NOTE: This is targeted at the staged-pac branch which depends on the newer staged pac

@usbalbin usbalbin mentioned this pull request Nov 9, 2024
usbalbin and others added 29 commits November 9, 2024 11:18
* 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
@usbalbin usbalbin mentioned this pull request Nov 9, 2024
5 tasks
@usbalbin usbalbin changed the title Hrtim6 HRTIM Nov 9, 2024
@usbalbin
Copy link
Contributor Author

usbalbin commented Nov 9, 2024

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 :)

usbalbin added a commit to usbalbin/stm32-hrtim that referenced this pull request Dec 3, 2024
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.

2 participants