From 23875462d82ae4a5b55c4e966e23d5196657378c Mon Sep 17 00:00:00 2001 From: bushing Date: Fri, 30 Apr 2010 11:15:19 +0000 Subject: [PATCH] one-line change to make all GPIOs usable on the 80-pin 261x packages 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 | 2 +- firmware/include/apps.h | 2 ++ firmware/lib/msp430x2618.c | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/firmware/goodfet.c b/firmware/goodfet.c index f82c5b3..39c8753 100644 --- a/firmware/goodfet.c +++ b/firmware/goodfet.c @@ -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) { diff --git a/firmware/include/apps.h b/firmware/include/apps.h index e8d2463..7c7d11a 100644 --- a/firmware/include/apps.h +++ b/firmware/include/apps.h @@ -21,4 +21,6 @@ #define PLUGIN 0x72 #define SMARTCARD 0x73 +#define RESET 0x80 // not a real app -- causes firmware to reset + #define DEBUGAPP 0xFF diff --git a/firmware/lib/msp430x2618.c b/firmware/lib/msp430x2618.c index 6e8675e..6d49366 100644 --- a/firmware/lib/msp430x2618.c +++ b/firmware/lib/msp430x2618.c @@ -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; -- 2.20.1