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

Clock setup #50

Open
dbrgn opened this issue Dec 25, 2019 · 2 comments
Open

Clock setup #50

dbrgn opened this issue Dec 25, 2019 · 2 comments
Assignees
Milestone

Comments

@dbrgn
Copy link
Contributor

dbrgn commented Dec 25, 2019

Use the external clock, if it makes sense.

@dbrgn
Copy link
Contributor Author

dbrgn commented May 10, 2020

The LSE (Low Speed External) clock source is only used for certain use cases like low power timers, the RTC, etc. It can't be used as sysclock, it's only a secondary clock.

Right now we're using the HSI (High Speed Internal) clock at 16 MHz. I tried switching to MSI (Multi Speed Internal):

let mut rcc = dp.RCC.freeze(
    hal::rcc::Config::msi(hal::rcc::MSIRange::Range5) // ~2.097 MHz
);

This is also the default configuration after reset. However, with that config the timer (TIM6) could not be initialized anymore (it hangs). We should probably investigate what the problem is.

@rnestler what are tradeoffs of faster/slower clock speed? Slower speeds use less energy but take longer to get things done, right? How can we decide whether HSI or MSI with a slower clock is better?

Also, when does one use the PLL instead?

@dbrgn
Copy link
Contributor Author

dbrgn commented Jul 20, 2021

@rnestler ping!

@dbrgn dbrgn added this to the v2.0.0 milestone Jul 20, 2021
@dbrgn dbrgn modified the milestones: v2.0.0, v2.1.0 Aug 17, 2021
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

No branches or pull requests

2 participants