CC2640的SCLK_HF如何切换到XOSC
时间:10-02
整理:3721RD
点击:
hi,我切换的流程是
AON_WUC->AUXCTL |= (1 << 0); while(0 == (AON_WUC->PWRSTAT & (1 << 5))); AUX_WUC->MODCLKEN0 |= (1 << 6); // MUST enable clock for AUX_DDI0_OSC,or AUX_DDI0_OSC can't rw AUX_DDI0_OSC->CTL0 |= (1 << 0); // set SCLK_HF to XOSC while((AUX_DDI0_OSC->STAT0 & (1 << 0))); AUX_DDI0_OSC->CTL0 |= (1 << 16); // switch it while(AUX_DDI0_OSC->STAT0 & (1 << 0));
但是执行完这些后DDI_0_OSC:STAT0:SCLK_HF_SRC依然是RCOSC,无法切换到XOSC,请问还有哪个步骤有问题?
When the 24-MHz crystal oscillator is enabled (by selecting XOSCHF as source for SCLK_HF), the XOSCHF must not be turned off, or SCLK_HF source must not be changed to another source, before the XOSCHF is reported as stable and switched to. The XOSCHF is stable when the DDI_0_OSC:STAT0.PENDINGSCLKHFSWITCHING is asserted after starting the crystal. DriverLib API should be used to switch SCLK_HF source, and interrupts must be disabled while doing so.