pub fn enable_external_32kosc(sysctrl: &mut SYSCTRL) {
    sysctrl.xosc32k.modify(|_, w| {
        unsafe {
            // 6 here means: use 64k cycles of OSCULP32k to start up this oscillator
            w.startup().bits(6);
        }
        w.ondemand().clear_bit();
        // Enable 32khz output
        w.en32k().set_bit();
        // Crystal connected to xin32/xout32
        w.xtalen().set_bit();
        w.runstdby().set_bit()
    });
    sysctrl.xosc32k.modify(|_, w| w.enable().set_bit());
    while sysctrl.pclksr.read().xosc32krdy().bit_is_clear() {
        // Wait for the oscillator to stabilize
    }
}
/// Turn on the external 32hkz oscillator
Turn on the external 32hkz oscillator
Turn on the external 32hkz oscillator
pub fn enable_external_32kosc(sysctrl: &mut SYSCTRL) {
    sysctrl.xosc32k.modify(|_, w| {
        unsafe {
            // 6 here means: use 64k cycles of OSCULP32k to start up this oscillator
            w.startup().bits(6);
        }
        w.ondemand().clear_bit();
        // Enable 32khz output
        w.en32k().set_bit();
        // Crystal connected to xin32/xout32
        w.xtalen().set_bit();
        w.runstdby().set_bit()
    });
    sysctrl.xosc32k.modify(|_, w| w.enable().set_bit());
    while sysctrl.pclksr.read().xosc32krdy().bit_is_clear() {
        // Wait for the oscillator to stabilize
    }
}
pub fn enable_external_32kosc ( sysctrl : & mut SYSCTRL ) { sysctrl . xosc32k . modify ( | _ , w | { unsafe { // 6 here means: use 64k cycles of OSCULP32k to start up this oscillator w . startup ( ) . bits ( 6 ) ; } w . ondemand ( ) . clear_bit ( ) ; // Enable 32khz output w . en32k ( ) . set_bit ( ) ; // Crystal connected to xin32/xout32 w . xtalen ( ) . set_bit ( ) ; w . runstdby ( ) . set_bit ( ) } ) ; sysctrl . xosc32k . modify ( | _ , w | w . enable ( ) . set_bit ( ) ) ; while sysctrl . pclksr . read ( ) . xosc32krdy ( ) . bit_is_clear ( ) { // Wait for the oscillator to stabilize } }
Turn on the external 32hkz oscillator
Turn on the external 32hkz oscillator
sysctrl
&mut SYSCTRL
sysctrl
&mut SYSCTRL