pub fn enable_internal_32kosc(sysctrl: &mut SYSCTRL) {
    let calibration = super::calibration::osc32k_cal();
    sysctrl.osc32k.write(|w| {
        unsafe {
            w.ondemand().clear_bit();
            w.calib().bits(calibration);
            // 6 here means: use 66 cycles of OSC32k to start up this oscillator
            w.startup().bits(6);
        }
        w.en32k().set_bit();
        w.enable().set_bit();
        w.runstdby().set_bit()
    });
    while sysctrl.pclksr.read().osc32krdy().bit_is_clear() {
        // Wait for the oscillator to stabilize
    }
}
/// Turn on the internal 32hkz oscillator
Turn on the internal 32hkz oscillator
Turn on the internal 32hkz oscillator
pub fn enable_internal_32kosc(sysctrl: &mut SYSCTRL) {
    let calibration = super::calibration::osc32k_cal();
    sysctrl.osc32k.write(|w| {
        unsafe {
            w.ondemand().clear_bit();
            w.calib().bits(calibration);
            // 6 here means: use 66 cycles of OSC32k to start up this oscillator
            w.startup().bits(6);
        }
        w.en32k().set_bit();
        w.enable().set_bit();
        w.runstdby().set_bit()
    });
    while sysctrl.pclksr.read().osc32krdy().bit_is_clear() {
        // Wait for the oscillator to stabilize
    }
}
pub fn enable_internal_32kosc ( sysctrl : & mut SYSCTRL ) { let calibration = super :: calibration :: osc32k_cal ( ) ; sysctrl . osc32k . write ( | w | { unsafe { w . ondemand ( ) . clear_bit ( ) ; w . calib ( ) . bits ( calibration ) ; // 6 here means: use 66 cycles of OSC32k to start up this oscillator w . startup ( ) . bits ( 6 ) ; } w . en32k ( ) . set_bit ( ) ; w . enable ( ) . set_bit ( ) ; w . runstdby ( ) . set_bit ( ) } ) ; while sysctrl . pclksr . read ( ) . osc32krdy ( ) . bit_is_clear ( ) { // Wait for the oscillator to stabilize } }
Turn on the internal 32hkz oscillator
Turn on the internal 32hkz oscillator
sysctrl
&mut SYSCTRL
sysctrl
&mut SYSCTRL