You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The reference manual for the STM32L4+ Series indicates in Section 6.2.8 (p.252) that, indeed, after a system reset, the system clock is provided by the multispeed internal RC oscillator (MSI) set at 4MHz and details a procedure to switch to a high speed clock source with an intermediate frequency step.
We also have an example (for a different STM32 board) on how to do this with embassy_stm32:
letmut config = Config::default();{use embassy_stm32::rcc::*;// By default, HSE on the board comes from a 8 MHz clock signal (not a crystal)
config.rcc.hse = Some(Hse{freq:Hertz(8_000_000),mode:HseMode::Bypass,});// PLL uses HSE as the clock source
config.rcc.pll_src = PllSource::HSE;
config.rcc.pll = Some(Pll{// 8 MHz clock source / 8 = 1 MHz PLL inputprediv:unwrap!(PllPreDiv::try_from(8)),// 1 MHz PLL input * 240 = 240 MHz PLL VCOmul:unwrap!(PllMul::try_from(240)),// 240 MHz PLL VCO / 2 = 120 MHz main PLL outputdivp:Some(PllPDiv::DIV2),// 240 MHz PLL VCO / 5 = 48 MHz PLL48 outputdivq:Some(PllQDiv::DIV5),divr:None,});// System clock comes from PLL (= the 120 MHz main PLL output)
config.rcc.sys = Sysclk::PLL1_P;// 120 MHz / 4 = 30 MHz APB1 frequency
config.rcc.apb1_pre = APBPrescaler::DIV4;// 120 MHz / 2 = 60 MHz APB2 frequency
config.rcc.apb2_pre = APBPrescaler::DIV2;}let _p = embassy_stm32::init(config);
I still need to learn why the values in the example are set as they are, but providing a config like that for our reference board should fix this issue.
No description provided.
The text was updated successfully, but these errors were encountered: