Support for STATICDCO timing calibrations.
authortravisutk <travisutk@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Tue, 30 Aug 2011 15:38:11 +0000 (15:38 +0000)
committertravisutk <travisutk@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Tue, 30 Aug 2011 15:38:11 +0000 (15:38 +0000)
git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@1044 12e2690d-a6be-4b82-a7b7-67c4a43b65c8

firmware/README.txt
firmware/lib/msp430x2618.c

index 6e7cc44..ea75e38 100644 (file)
@@ -11,3 +11,8 @@ in MSPGCC from CVS.
 export mcu=msp430x2618
 make -e
 
+
+
+Some weird switches,
+1) Build for a static DCO configuration.  Useful for standalone firmware.
+CFLAGS="-DSTATICDCO=0x8F9E" make clean all
index dcdafd5..947cf14 100644 (file)
@@ -131,6 +131,10 @@ void msp430_init_dco() {
   #endif
   
   
+  #ifdef STATICDCO
+  BCSCTL1 = (STATICDCO>>8);
+  DCOCTL  = (STATICDCO&0xFF);
+  #else
   if(CALBC1_16MHZ!=0xFF){
     //Info is intact, use it.
     BCSCTL1 = CALBC1_16MHZ;
@@ -149,6 +153,7 @@ void msp430_init_dco() {
     choice[0]++;
     choice[0]%=dco_calibrations_count;
   }
+  #endif
   
   //Minor delay.
   while(i--);