Use HSI16 for exemple since HSE might have a different value depending on board
This commit is contained in:
parent
6fe853a7d3
commit
e83762e979
@ -5,7 +5,6 @@
|
||||
use defmt::*;
|
||||
use embassy_executor::Spawner;
|
||||
use embassy_stm32::rcc::{ClockSrc, PllClkDiv, PllM, PllN, PllSrc};
|
||||
use embassy_stm32::time::mhz;
|
||||
use embassy_stm32::Config;
|
||||
use embassy_time::{Duration, Timer};
|
||||
use {defmt_rtt as _, panic_probe as _};
|
||||
@ -14,8 +13,8 @@ use {defmt_rtt as _, panic_probe as _};
|
||||
async fn main(_spawner: Spawner) {
|
||||
let mut config = Config::default();
|
||||
|
||||
// Configure PLL to max frequency of 170 MHz
|
||||
config.rcc.mux = ClockSrc::PLL(PllSrc::HSE(mhz(16)), PllM::Div4, PllN::Mul85, PllClkDiv::Div2);
|
||||
// Configure PLL to 128Mhz frequency
|
||||
config.rcc.mux = ClockSrc::PLL(PllSrc::HSI16, PllM::Div4, PllN::Mul64, PllClkDiv::Div2);
|
||||
|
||||
let _p = embassy_stm32::init(config);
|
||||
info!("Hello World!");
|
||||
|
Loading…
Reference in New Issue
Block a user