one-line change to make all GPIOs usable on the 80-pin 261x packages
authorbushing <bushing@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Fri, 30 Apr 2010 11:15:19 +0000 (11:15 +0000)
committerbushing <bushing@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Fri, 30 Apr 2010 11:15:19 +0000 (11:15 +0000)
added an "app constant" for 0x80 -- the RESET app.  Otherwise, naive
firmware coders might be tempted to use that as an app ID *cough*

git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@469 12e2690d-a6be-4b82-a7b7-67c4a43b65c8

firmware/goodfet.c
firmware/include/apps.h
firmware/lib/msp430x2618.c

index f82c5b3..39c8753 100644 (file)
@@ -134,7 +134,7 @@ int main(void)
     app=serial_rx();
 
        // If the app is the reset byte (0x80) increment and loop
-       if (app == 0x80) {
+       if (app == RESET) {
                reset_count++;
 
                if (reset_count > 4) {
index e8d2463..7c7d11a 100644 (file)
@@ -21,4 +21,6 @@
 #define PLUGIN 0x72
 #define SMARTCARD 0x73
 
+#define RESET 0x80     // not a real app -- causes firmware to reset
+
 #define DEBUGAPP 0xFF
index 6e8675e..6d49366 100644 (file)
@@ -140,6 +140,7 @@ CALDCO_16MHZ 0x96 CALBC1_16MHZ 0x8f   2619-001.txt
 
 //! Initialize the MSP430 clock.
 void msp430_init_dco() {
+    P8SEL = 0; // disable XT2 on P8.7/8
   if(CALBC1_16MHZ!=0xFF){
     //Info is intact, use it.
     BCSCTL1 = CALBC1_16MHZ;