Function stm32wlxx_hal::rcc::set_sysclk_hsi
source · pub unsafe fn set_sysclk_hsi(
flash: &mut FLASH,
pwr: &mut PWR,
rcc: &mut RCC,
cs: &CriticalSection
)
Expand description
Set the sysclk to use the HSI 16MHz clock.
Safety
- Peripherals must not be in-use before calling this function.
- Peripherals may need their prescalers adjusted for the new sysclk frequency.
Example
use stm32wlxx_hal::{pac, rcc::set_sysclk_hsi};
let mut dp: pac::Peripherals = pac::Peripherals::take().unwrap();
cortex_m::interrupt::free(|cs| unsafe {
set_sysclk_hsi(&mut dp.FLASH, &mut dp.PWR, &mut dp.RCC, cs)
});