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

Update stm32f3 to v0.11.0 #97

Merged
merged 3 commits into from
May 10, 2020
Merged

Update stm32f3 to v0.11.0 #97

merged 3 commits into from
May 10, 2020

Conversation

Sh3Rm4n
Copy link
Member

@Sh3Rm4n Sh3Rm4n commented Apr 26, 2020

Remove now unneeded unsafe from the flash state configuration in src/rcc.rs and use HCLK instead of SYSCLK as the reference manual suggests.

Copy link
Collaborator

@strom-und-spiele strom-und-spiele left a comment

Choose a reason for hiding this comment

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

Thanks for keeping an eye out for updates to stm32f3 and ways to make the code nicer :)

Cargo.toml Outdated
@@ -23,7 +23,7 @@ cortex-m = "0.6"
cortex-m-rt = "0.6"
embedded-hal = "0.2"
nb = "0.1"
stm32f3 = "0.10"
stm32f3 = "0.11.0"
Copy link
Collaborator

Choose a reason for hiding this comment

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

sure we don't want to go for the more general "0.11"?
Aus of the Changelog they seem to go from 0.n.0 to 0.n+1.0 quite reliabely so incoperating a sub-sub version might allow for a seamless bugfix.

Copy link
Member Author

Choose a reason for hiding this comment

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

For consistency, I should use "0.11". Thanks for pointing this out :)

Cargo's version always translates to the "^0.11.0" semver version number, unless stated otherwise. So it should not make a difference, as 0.11.1 would automatically be pulled in, when such a version would be released.

Comment on lines +341 to +533
acr.acr().modify(|_, w| {
if hclk <= 24_000_000 {
w.latency().ws0()
} else if hclk <= 48_000_000 {
w.latency().ws1()
Copy link
Collaborator

Choose a reason for hiding this comment

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

All those magic numbers make me nervous.
I'm not sure if it helps that they are documented but not explained in stm32f3

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, the documentation of the stm32f3 is always very brief. But more detailed explanation is not the intent of the stm32f3 crate, as this is auto-generated code from svd files. A more detailed explanation is always in the reference manual. However, it does not hurt to add documentation here, to explain, why this is needed.

@Sh3Rm4n Sh3Rm4n merged commit b2a4c0f into stm32-rs:master May 10, 2020
@Sh3Rm4n Sh3Rm4n deleted the stm32-rs branch November 28, 2023 07:16
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