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

rcc enable #152

Merged
merged 1 commit into from
Nov 9, 2021
Merged

rcc enable #152

merged 1 commit into from
Nov 9, 2021

Conversation

burrbull
Copy link
Member

No description provided.

@hannobraun
Copy link
Contributor

Thank you for the pull request, @burrbull. Since this is a bit longer, I don't have time to review it immediately. I will try to take a look soon. Maybe after I release the next version (#150), I'm not sure yet.

Looks like there's a conflict now, probably due to merging #151. Can you take a look?

@burrbull
Copy link
Member Author

burrbull commented Nov 1, 2021

Rebased

@burrbull
Copy link
Member Author

burrbull commented Nov 1, 2021

I would say you need to decide what API you want.
Now all peripheral init functions are different.
Some take &mut APBx, other &mut Rcc. Some take nothing and make peripheral enable in unsafe, other in interrupt::free mode.

@hannobraun
Copy link
Contributor

@burrbull

Rebased

Thank you!

I would say you need to decide what API you want.

Not sure, to be honest. It's been a while since I actually used this HAL, or worked on the design of a STM32 HAL, or really thought about the design of STM32 HALs.

It would be better if it was consistent, of course, but I don't know which of the options is best. Suggestions welcome!

Copy link
Contributor

@hannobraun hannobraun left a comment

Choose a reason for hiding this comment

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

Thank you, @burrbull, this looks great! I think that new infrastructure in RCC is a nice improvement.

You mentioned last time that you don't have F7 hardware. I assume this is still true, and this change hasn't been tested. Since this affects pretty much everything, I'd like to see some testing done before merging. As usual, it might take a while before I can get to it myself.

If anyone is reading this and wants to help out, please run some examples or your own code, and let us know how it works for you!

@hannobraun hannobraun added help wanted Extra attention is needed needs testing Testing is required, before code can be merged. labels Nov 3, 2021
@hannobraun
Copy link
Contributor

As for the inconsistencies, I've opened #154.

@systec-ms
Copy link
Contributor

LGTM, tested with a STM32F767.

Comment on lines +166 to +170
#[cfg(any(feature = "svd-f730", feature = "svd-f7x2", feature = "svd-f7x3",))]
bus! {
AES => (AHB2, aesen, aeslpen, aesrst), // 4

SDMMC2 => (APB2, sdmmc2en, sdmmc2lpen, sdmmc2rst), // 7
Copy link
Contributor

@systec-ms systec-ms Nov 9, 2021

Choose a reason for hiding this comment

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

The SDMMC2 is not only available in svdf7x2 and svd-f7x3:

stm32f7xx/svd$ rg SDMMC2 -l --sort-files
STM32F7x2.svd
STM32F7x3.svd
STM32F7x7.svd
STM32F7x9.svd

I did not take a look into svd-f730, svd-f745 and svd-f765.

Copy link
Member Author

Choose a reason for hiding this comment

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

f765, f7x7 and f7x9 doesn't have sdmmc2en and sdmmc2rst fields in RCC.
This should be fixed in stm32-rs first

@hannobraun
Copy link
Contributor

Thanks for testing, @systec-ms, and thanks again for the pull request, @burrbull!

@hannobraun hannobraun merged commit e84d5a3 into stm32-rs:master Nov 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed needs testing Testing is required, before code can be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants