Pavel Chromy: TCK returns to zero before state of reset line is changed.
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Wed, 4 Jun 2008 17:09:10 +0000 (17:09 +0000)
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Wed, 4 Jun 2008 17:09:10 +0000 (17:09 +0000)
git-svn-id: svn://svn.berlios.de/openocd/trunk@703 b42882b7-edfa-0310-969c-e2dbd0fdcd60

src/jtag/presto.c

index c031d94b1dac8f30b8d7f9811e7019f6c28ab7a1..3fd0ee1219f1069fc9d6c7cf38270ee8d92aca76 100644 (file)
@@ -573,10 +573,10 @@ int presto_bitq_out(int tms, int tdi, int tdo_req)
 
        if (presto->jtag_tck == 0)
        {
-               presto_sendbyte(0xA4);
-               presto->jtag_tck = 1;
+               presto_sendbyte(0xA4); /* jtag activity */
+               presto->jtag_tck = 1; /* clock remains high after the function returns */
+               /* do just a single tick first, accelerated shifting needs TCK=1 */
        }
-
        else if (!tdo_req && tms == presto->jtag_tms)
        {
                if (presto->jtag_tdi_count == 0)
@@ -617,7 +617,7 @@ int presto_bitq_out(int tms, int tdi, int tdo_req)
        }
 
        if (tdo_req)
-               presto_sendbyte(0xD4 | cmdparam);
+               presto_sendbyte(0xD4|cmdparam);
        else
                presto_sendbyte(0xC4|cmdparam);
 
@@ -634,8 +634,11 @@ int presto_bitq_flush(void)
                presto->jtag_tdi_count = 0;
        }
 
-       presto_sendbyte(0xCA);
-       presto->jtag_tck = 0;
+       if (presto->jtag_tck == 1) 
+       {
+               presto_sendbyte(0xCA);
+               presto->jtag_tck = 0;
+       }
 
        presto_sendbyte(0xA0);
 
@@ -664,6 +667,12 @@ int presto_bitq_sleep(unsigned long us)
 {
        long waits;
 
+       if (presto->jtag_tck == 1) 
+       {
+               presto_sendbyte(0xCA);
+               presto->jtag_tck = 0;
+       }
+
        if (us > 100000)
        {
                presto_bitq_flush();
@@ -683,6 +692,12 @@ int presto_bitq_reset(int trst, int srst)
 {
        unsigned char cmd;
 
+       if (presto->jtag_tck == 1) 
+       {
+               presto_sendbyte(0xCA);
+               presto->jtag_tck = 0;
+       }
+
        cmd = 0xE8;
        if (presto->jtag_tms)
                cmd |= 0x04;

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)