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

PLL2 and PLL3 on STM32F107 #456

Open
unsanded opened this issue Jan 12, 2023 · 1 comment
Open

PLL2 and PLL3 on STM32F107 #456

unsanded opened this issue Jan 12, 2023 · 1 comment

Comments

@unsanded
Copy link

related to #448
Stm32f107 has 3 plls in the clock system. My board uses a 25MHz crystal, so the only way to get to a round 72MHz SYSCLK is to do: 25 / 5 * 8 / 5 * 9 (see the screenshot from cubeMX.

image

The PLL3 is not on the screenshot, but it feeds the i2c, and not in my usecase.

I am considering writing this myself, but i am just getting into rust.

@burrbull
Copy link
Contributor

dividers could be passed directly. See

// Alternative configuration using dividers and multipliers directly
let clocks = rcc.cfgr.freeze_with_config(rcc::Config {
hse: Some(8_000_000),
pllmul: Some(7),
hpre: rcc::HPre::DIV1,
ppre1: rcc::PPre::DIV2,
ppre2: rcc::PPre::DIV1,
usbpre: rcc::UsbPre::DIV1_5,
adcpre: rcc::AdcPre::DIV2,
}, &mut flash.acr);*/

But you are right PLL3 is absent. You need to make PR to support it.

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