Fixed restart in JTAG430 module to prevent a reconnection warning on startup.
authortravisutk <travisutk@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Thu, 3 Feb 2011 21:37:19 +0000 (21:37 +0000)
committertravisutk <travisutk@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Thu, 3 Feb 2011 21:37:19 +0000 (21:37 +0000)
git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@871 12e2690d-a6be-4b82-a7b7-67c4a43b65c8

firmware/apps/jtag/jtag430.c

index a8a07bd..cd8b6b8 100644 (file)
@@ -403,11 +403,12 @@ void jtag430_handle_fn(uint8_t const app,
    * chip ID cannot be read.  Should print warning
    * for testing server.
    */
    * chip ID cannot be read.  Should print warning
    * for testing server.
    */
-  while((i=jtag430_readmem(0xff0))==0xFFFF){
-    debugstr("Reconnecting to target MSP430.");
-    jtag430x2_start();
-    PLEDOUT^=PLEDPIN;
-  }
+  if (jtagid!=0)
+    while((i=jtag430_readmem(0xff0))==0xFFFF){
+      debugstr("Reconnecting to target MSP430.");
+      jtag430x2_start();
+      PLEDOUT^=PLEDPIN;
+    }
   PLEDOUT&=~PLEDPIN;
   
   
   PLEDOUT&=~PLEDPIN;