Zach Welch <zw@superlucidity.net> do not pad TMS
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Wed, 22 Apr 2009 13:54:04 +0000 (13:54 +0000)
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Wed, 22 Apr 2009 13:54:04 +0000 (13:54 +0000)
git-svn-id: svn://svn.berlios.de/openocd/trunk@1509 b42882b7-edfa-0310-969c-e2dbd0fdcd60

src/jtag/jlink.c

index f16be361d47e64921e039e8bcd74320dc703fa20..a229cec58180c8cef9bac5d74de7c670074b9c65 100644 (file)
@@ -623,6 +623,10 @@ static void jlink_tap_append_step(int tms, int tdi)
        int bit_index = tap_length % 8;
        u8 bit = 1 << bit_index;
 
+       // we do not pad TMS, so be sure to initialize all bits
+       if (0 == bit_index)
+               tms_buffer[index] = tdi_buffer[index] = 0;
+
        if (tms)
                tms_buffer[index] |= bit;
        else
@@ -669,15 +673,8 @@ static int jlink_tap_execute(void)
        if (!tap_length)
                return ERROR_OK;
 
-       /* Pad last byte so that tap_length is divisible by 8 */
-       while (tap_length % 8 != 0)
-       {
-               /* More of the last TMS value keeps us in the same state,
-                * analogous to free-running JTAG interfaces. */
-               jlink_tap_append_step(last_tms, 0);
-       }
-
-       byte_length = tap_length / 8;
+       // number of full bytes (plus one if some would be left over)
+       byte_length = tap_length / 8 + !!(tap_length % 8);
 
        usb_out_buffer[0] = EMU_CMD_HW_JTAG3;
        usb_out_buffer[1] = 0;

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)