From 97aa44bacf6b5ab46b6d967a2617e0ac83e2f6e5 Mon Sep 17 00:00:00 2001 From: I--P Date: Fri, 11 Oct 2024 10:40:19 +0200 Subject: [PATCH] Fix build issues --- embassy-stm32/src/rcc/f247.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/embassy-stm32/src/rcc/f247.rs b/embassy-stm32/src/rcc/f247.rs index 584fbc40c..a6be1e2b2 100644 --- a/embassy-stm32/src/rcc/f247.rs +++ b/embassy-stm32/src/rcc/f247.rs @@ -198,8 +198,14 @@ pub(crate) unsafe fn init(config: Config) { let mut pllsai = init_pll(PllInstance::Pllsai, config.pllsai, &pll_input); #[cfg(any(stm32f446, stm32f427, stm32f437, stm32f4x9, stm32f7))] RCC.dckcfgr().modify(|w| w.set_pllsaidivq(config.pllsai_divdivq)); - pllsai.q = Some(unwrap!(pllsai.q) / (1 + config.pllsai_divdivq.to_bits())); + pllsai.q = match pllsai.q { + Some(q) => { + Some(q/ (1 + config.pllsai_divdivq.to_bits())) + }, + None => {None} + }; + info!("KAPOUE {}",pllsai.q); // Configure sysclk let sys = match config.sys { Sysclk::HSI => unwrap!(hsi),