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

Add support for STM32WBA's HSE pre-scaler #2512

Closed
wants to merge 1 commit into from

Conversation

Ecco
Copy link
Contributor

@Ecco Ecco commented Feb 1, 2024

This adds support for STM32WBA's prescaler. Several notes:

  • RCC_CR should probably be modify-ed than write-en. But that's another PR.
  • We may want to add something similar for STM32WB (in l.rs), because on that chip the prescaler option just doesn't do anything.

Also note that the Hse struct only has one field, but I did this to match the structure of other STM32s (as implemented in l.rs).

@Dirbaio
Copy link
Member

Dirbaio commented Feb 1, 2024

can you change HSI/HSE so it works like l.rs? i.e an hse field that turns on HSE if Some, an hsi field that turns HSI if true, then mux selects which of them is in use (which must be turned on, of course). https://github.com/embassy-rs/embassy/blob/main/embassy-stm32/src/rcc/l.rs#L41-L42

Please try to keep the RCC API as close as possible as the "newer" RCCs (l.rs, h.rs, f.rs). The WBA RCC is not using the newest API design, it would be preferable if the new features you implement already work like the new design. See this issue for the context on the different API designs we have and why the newer one is better.

@Ecco
Copy link
Contributor Author

Ecco commented Feb 2, 2024

Superseded by #2520

@Ecco Ecco closed this Feb 2, 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