Skip to content

HRTIM #192

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 3 commits into from
Jul 6, 2025
Merged

HRTIM #192

merged 3 commits into from
Jul 6, 2025

Conversation

usbalbin
Copy link
Member

@usbalbin usbalbin commented Apr 26, 2025

We should probably wait until some sort of release before we merge this or we could perhaps put it behind some experimental feature flag(?)

Fixes #69

@usbalbin usbalbin marked this pull request as draft April 26, 2025 21:45
@usbalbin usbalbin changed the base branch from staged-pac to main April 28, 2025 21:04
@usbalbin usbalbin force-pushed the hrtim branch 2 times, most recently from 51e7def to 7994199 Compare May 3, 2025 19:02
@usbalbin usbalbin force-pushed the hrtim branch 2 times, most recently from da010f2 to cca48ab Compare May 15, 2025 12:21
@usbalbin
Copy link
Member Author

usbalbin commented Jun 29, 2025

stm32-hrtim is by no means "done", lots of missing features, there is a lot of weird trait bounds etc. Overall there is room for improvement. With that said I do think it is useful for what it does as is.

@burrbull, @AdinAck and @boondocklabs what do you think is the best way to move this forward?

Some steps in no particular order

What are your thoughts? :)

@usbalbin usbalbin marked this pull request as ready for review June 29, 2025 17:19
@burrbull
Copy link
Member

I think first step is to release stm32-hrtim 0.1 on crates.io.
You can transfer its ownership any time after release.

@AdinAck
Copy link
Contributor

AdinAck commented Jun 29, 2025

Wow, this clearly took a great deal of effort and I commend you as such.

I do think this should eventually be included in stm32-rs just like any other peripheral, I can't say what intermediate steps should be taken.

Again, great stuff, thank you :) Let's make some buck regulators! Woohoo!

@usbalbin
Copy link
Member Author

Thanks :)

So I'll just

~/stm32-hrtim $ cargo publish --features stm32g474,defmt

then?

@usbalbin
Copy link
Member Author

usbalbin commented Jun 29, 2025

Done - stm32-hrtim

Cargo.toml Outdated
stm32g483 = ["stm32g4/stm32g483", "cat3", "adc3", "adc4", "adc5"]
stm32g484 = ["stm32g4/stm32g484", "cat3", "adc3", "adc4", "adc5"]
stm32g484 = ["stm32g4/stm32g484", "cat3", "adc3", "adc4", "adc5", "hrtim", "stm32-hrtim/stm32g484"]
Copy link
Member Author

Choose a reason for hiding this comment

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

How is this best done? I want the hrtim feature to be optional (just like can and cortic) but only available for stm32g474, stm32g484.

Is there any other/better way than

#[cfg(feature = "hrtim", not(any(feature = "stm32g474", feature = "stm32g484"))]
compile_error!("`hrtim` is only available for stm32g474 and stm32g484");

@usbalbin
Copy link
Member Author

usbalbin commented Jul 5, 2025

I'll merge this now unless someone objects :)

@usbalbin usbalbin changed the title Hrtim HRTIM Jul 6, 2025
@usbalbin usbalbin added this pull request to the merge queue Jul 6, 2025
Merged via the queue into stm32-rs:main with commit f51452f Jul 6, 2025
34 checks passed
@usbalbin
Copy link
Member Author

usbalbin commented Jul 6, 2025

Thank you all for all the help along the way! :)

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.

HRTIM
3 participants