In the start_xosc function, the frequency range is set twice. Remove the redundant one.

This commit is contained in:
QWS 2024-05-13 19:48:23 +08:00
parent 763b57449f
commit 75cf17994f

View File

@ -714,10 +714,6 @@ pub fn clk_rtc_freq() -> u16 {
} }
fn start_xosc(crystal_hz: u32, delay_multiplier: u32) { fn start_xosc(crystal_hz: u32, delay_multiplier: u32) {
pac::XOSC
.ctrl()
.write(|w| w.set_freq_range(pac::xosc::vals::CtrlFreqRange::_1_15MHZ));
let startup_delay = (((crystal_hz / 1000) * delay_multiplier) + 128) / 256; let startup_delay = (((crystal_hz / 1000) * delay_multiplier) + 128) / 256;
pac::XOSC.startup().write(|w| w.set_delay(startup_delay as u16)); pac::XOSC.startup().write(|w| w.set_delay(startup_delay as u16));
pac::XOSC.ctrl().write(|w| { pac::XOSC.ctrl().write(|w| {