Skip to content

Commit

Permalink
fix: fixed async stm32 example due to progressed embassy main branch
Browse files Browse the repository at this point in the history
Crucial commit in embassy is

embassy-rs/embassy@a39ae12
  • Loading branch information
mputz86 committed Oct 27, 2023
1 parent 56e84dd commit 1322785
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/embassy-stm32-example/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,17 +77,17 @@ async fn main_task(spawner: Spawner) {
let mut config = Config::default();
{
use embassy_stm32::rcc::*;
config.rcc.hsi = Some(Hsi::Mhz64);
config.rcc.hsi = Some(HSIPrescaler::DIV1);
config.rcc.csi = true;
config.rcc.pll_src = PllSource::Hsi;
config.rcc.pll1 = Some(Pll {
source: PllSource::HSI,
prediv: PllPreDiv::DIV4,
mul: PllMul::MUL50,
divp: Some(PllDiv::DIV2),
divq: Some(PllDiv::DIV8), // used by SPI3. 100Mhz.
divr: None,
});
config.rcc.sys = Sysclk::Pll1P; // 400 Mhz
config.rcc.sys = Sysclk::PLL1_P; // 400 Mhz
config.rcc.ahb_pre = AHBPrescaler::DIV2; // 200 Mhz
config.rcc.apb1_pre = APBPrescaler::DIV2; // 100 Mhz
config.rcc.apb2_pre = APBPrescaler::DIV2; // 100 Mhz
Expand Down Expand Up @@ -196,4 +196,4 @@ fn main() -> ! {
executor.run(|spawner| {
unwrap!(spawner.spawn(main_task(spawner)));
})
}
}

0 comments on commit 1322785

Please sign in to comment.