From 5d44bcad82ecc1c9dce53a8af6b45233e46af0d7 Mon Sep 17 00:00:00 2001 From: travisutk Date: Sat, 22 Jan 2011 23:14:19 +0000 Subject: [PATCH] Nothing major, just CC1110 crystal routines. git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@855 12e2690d-a6be-4b82-a7b7-67c4a43b65c8 --- shellcode/chipcon/cc1110/crystal.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/shellcode/chipcon/cc1110/crystal.c b/shellcode/chipcon/cc1110/crystal.c index f32e755..875c667 100644 --- a/shellcode/chipcon/cc1110/crystal.c +++ b/shellcode/chipcon/cc1110/crystal.c @@ -8,10 +8,22 @@ void main(){ // Wait until xtal oscillator is stable while( !(SLEEP & SLEEP_XOSC_S) ); + + // Select xtal osc, 26 MHz + // This doesn't work for the USB dongles. 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. -- 2.20.1