avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] [PATCH] avarice: JTAG ICE: Cannot synchonise


From: Shaun Jackman
Subject: [avr-gcc-list] [PATCH] avarice: JTAG ICE: Cannot synchonise
Date: Fri, 6 Jul 2007 14:15:08 -0600

Good and bad news! The good news is I was able to make my AVR Dragon
work and have a patch. The bad news is the oddness of the solution. I
incremented JTAG_RESPONSE_TIMEOUT from 1000 ms to 1010 ms and it works
now! I've attached two debug logs. The 1000 ms log is very quirky and
interesting reading.

A timeout was also incorrectly reported as a byte in the debug log. My
patch fixes that.

Cheers!
Shaun

2007-07-06  Shaun Jackman  <address@hidden>

        * src/jtag.h (JTAG_RESPONSE_TIMEOUT): Increase to 1010000 for the
        AVR Dragon.
        * src/jtag2io.cc (recvFrame): Correctly report a timeout.

Index: src/jtag.h
===================================================================
RCS file: /cvsroot/avarice/avarice/src/jtag.h,v
retrieving revision 1.26
diff -u -p -r1.26 jtag.h
--- src/jtag.h  17 Feb 2007 22:41:46 -0000      1.26
+++ src/jtag.h  6 Jul 2007 20:12:41 -0000
@@ -195,7 +195,7 @@ enum
    MAX_JTAG_COMM_ATTEMPS             = 10,
    MAX_JTAG_SYNC_ATTEMPS             = 3,

-    JTAG_RESPONSE_TIMEOUT            = 1000000,
+    JTAG_RESPONSE_TIMEOUT            = 1010000,
    JTAG_COMM_TIMEOUT                 = 100000,

    // Lock Bit Values
Index: src/jtag2io.cc
===================================================================
RCS file: /cvsroot/avarice/avarice/src/jtag2io.cc,v
retrieving revision 1.11
diff -u -p -r1.11 jtag2io.cc
--- src/jtag2io.cc      17 Feb 2007 22:41:46 -0000      1.11
+++ src/jtag2io.cc      6 Jul 2007 20:12:41 -0000
@@ -141,10 +141,12 @@ int jtag2::recvFrame(unsigned char *&msg
                break;
        } else {
            rv = timeout_read(&c, 1, JTAG_RESPONSE_TIMEOUT);
-           debugOut("recv: 0x%02x\n", c);
-           if (rv == 0)
+           if (rv == 0) {
                /* timeout */
+               debugOut("recv: timeout\n");
                break;
+           }
+           debugOut("recv: 0x%02x\n", c);
        }
        checksum ^= c;

Attachment: avarice-dragon.diff
Description: Text document

Attachment: avarice-1000.log
Description: Text Data

Attachment: avarice-1010.log
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]