+#if NEEDS_CC1111_CLOCK_HACK
+ /* Power up both oscillators */
+ SLEEP &= ~(SLEEP_OSC_PD);
+
+ /* Switch to the HFRC oscillator */
+ CLKCON = (CLKCON & ~CLKCON_OSC_MASK) | (CLKCON_OSC_RC);
+
+ /* Wait for the HFRC oscillator to be stable */
+ while (!(SLEEP & SLEEP_HFRC_STB))
+ ;
+
+ /* Delay for 'a while' waiting for the crystal to
+ * stabilize -- the XOSC_STB bit isn't reliable
+ *
+ * http://www.ti.com/lit/er/swrz022c/swrz022c.pdf
+ */
+
+ ao_clock_delay();
+#endif
+