pub unsafe fn set_sysclk_msi_max(
    flash: &mut FLASH,
    pwr: &mut PWR,
    rcc: &mut RCC,
    cs: &CriticalSection
)
Expand description

Set the sysclk to the MSI source at 48MHz.

This is a convenience function that wraps set_sysclk_msi to set the system clock to the highest frequency.

Safety

  1. Peripherals must not be in-use before calling this function.
  2. Peripherals may need their prescalers adjusted for the new sysclk frequency.

Example

use stm32wlxx_hal::{pac, rcc::set_sysclk_msi_max};

let mut dp: pac::Peripherals = pac::Peripherals::take().unwrap();
cortex_m::interrupt::free(|cs| unsafe {
    set_sysclk_msi_max(&mut dp.FLASH, &mut dp.PWR, &mut dp.RCC, cs)
});