Nothing major, just CC1110 crystal routines.
[goodfet] / shellcode / chipcon / cc1110 / crystal.c
index f32e755..875c667 100644 (file)
@@ -8,10 +8,22 @@ void main(){
   // Wait until xtal oscillator is stable
   while( !(SLEEP & SLEEP_XOSC_S) ); 
 
   // Wait until xtal oscillator is stable
   while( !(SLEEP & SLEEP_XOSC_S) ); 
 
+  
+  
   // Select xtal osc, 26 MHz
   // Select xtal osc, 26 MHz
+  // This doesn't work for the USB dongles.
   CLKCON = 
     (CLKCON & ~(CLKCON_CLKSPD | CLKCON_OSC))
   CLKCON = 
     (CLKCON & ~(CLKCON_CLKSPD | CLKCON_OSC))
-    | CLKSPD_DIV_1; 
+    | CLKSPD_DIV_1;
+  
+  
+  /*
+  //Needed for CC1111?
+  CLKCON = 
+    (CLKCON & ~(CLKCON_CLKSPD | CLKCON_OSC))
+    | CLKSPD_DIV_2;
+  */
+  
   // Wait for change to take effect
   while (CLKCON & CLKCON_OSC); 
   // Turn off the RC osc.
   // Wait for change to take effect
   while (CLKCON & CLKCON_OSC); 
   // Turn off the RC osc.