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 MCO support #143

Merged
merged 1 commit into from
Feb 12, 2021
Merged

Add MCO support #143

merged 1 commit into from
Feb 12, 2021

Conversation

jamwaffles
Copy link
Contributor

I've added MCO (Microcontroller Clock Output) support in a hopefully sensible and typesafe way.

I'm reasonably happy with the impl, but will happily take any improvements. I tested the example with my L053 Nucleo using HSI16 as the clock reference. I can get PA8 and/or PA9 to show a nice steady 2MHz, so the code seems to be working as expected.

MCO consumes the output pin, which I think the API reflects. I'm also assuming MCO is available on all variants, so nothing is feature gated in this PR.

@jamwaffles jamwaffles marked this pull request as draft February 7, 2021 10:19
@jamwaffles jamwaffles force-pushed the add-mco branch 3 times, most recently from f86c620 to 8b743e5 Compare February 7, 2021 11:00
@jamwaffles jamwaffles marked this pull request as ready for review February 7, 2021 11:02
@jamwaffles
Copy link
Contributor Author

I've rebased as #144 is merged. Would appreciate another look from @dbrgn or @hannobraun!

Aside: Nightly has started passing in Travis 🤔

@hannobraun
Copy link
Contributor

Thank you, @jamwaffles!

I'm not familiar with this feature, but the code looks good to me. And it's a new feature anyway, so unlikely to break existing use cases. Merging.

@hannobraun hannobraun merged commit 22aeb3a into stm32-rs:master Feb 12, 2021
@jamwaffles jamwaffles deleted the add-mco branch February 12, 2021 11:42
@jamwaffles
Copy link
Contributor Author

Awesome! Thank you 😊

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