Some devices such as AVR will return 0xffffffff instead of the TDI
[openocd.git] / src / jtag / jtag.c
index 408f88fa5c351642d8f59ef08faabd0583283404..59f1991630d453c6d72d02d4a5783c508131cc85 100644 (file)
@@ -1531,7 +1531,9 @@ int jtag_examine_chain(void)
                        u32 part;
                        u32 version;
 
-                       if (idcode == 0x000000FF)
+                       /* some devices, such as AVR will output all 1's instead of TDI
+                       input value at end of chain. */
+                       if ((idcode == 0x000000FF)||(idcode == 0xFFFFFFFF))
                        {
                                int unexpected=0;
                                /* End of chain (invalid manufacturer ID)
@@ -1548,7 +1550,7 @@ int jtag_examine_chain(void)
                                for (bit_count += 32; bit_count < (JTAG_MAX_CHAIN_SIZE * 32) - 31;bit_count += 32)
                                {
                                        idcode = buf_get_u32(idcode_buffer, bit_count, 32);
-                                       if (unexpected||(idcode != 0x000000FF))
+                                       if (unexpected||((idcode != 0x000000FF)&&(idcode != 0xFFFFFFFF)))
                                        {
                                                LOG_WARNING("Unexpected idcode after end of chain! %d 0x%08x", bit_count, idcode);
                                                unexpected = 1;
@@ -3306,7 +3308,7 @@ tap_state_t jtag_debug_state_machine(const void *tms_buf, const void *tdi_buf,
 
        tap_state_t last_state;
 
-       // set startstate (and possibly last, if tap_bits == 0) 
+       // set startstate (and possibly last, if tap_bits == 0)
        last_state = next_state;
        DEBUG_JTAG_IO("TAP/SM: START state: %s", tap_state_name(next_state));
 

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)