X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=src%2Fcc1111%2Fao_timer.c;h=75cc4ce8b562e6f339d76451a103b9e3bdd73fc0;hp=54af9605b59bb997fa75b89508bb45e41f06e8d8;hb=de2e812b02a99a2f6d85f15a9600265931f6f6b0;hpb=473ae38ade0552c5ff3ca088b21345ed5dfad5d0 diff --git a/src/cc1111/ao_timer.c b/src/cc1111/ao_timer.c index 54af9605..75cc4ce8 100644 --- a/src/cc1111/ao_timer.c +++ b/src/cc1111/ao_timer.c @@ -95,6 +95,13 @@ ao_clock_init(void) while (!(SLEEP & SLEEP_XOSC_STB)) ; + /* Power down the unused HFRC oscillator */ + SLEEP |= SLEEP_OSC_PD; + + /* Wait for HFRC to power down */ + while ((SLEEP & SLEEP_HFRC_STB) != 0) + ; + /* Crank up the timer tick and system clock speed */ CLKCON = ((CLKCON & ~(CLKCON_TICKSPD_MASK | CLKCON_CLKSPD_MASK)) | (CLKCON_TICKSPD_1 | CLKCON_CLKSPD_1));