Revert "cortex_m3: add auto maskisr"
[openocd.git] / src / target / dsp563xx_once.c
index d19323ee7371bdb5ef7f137c538e9c1026a55b5a..267f475e51f586f3ee8708cc91ba77ed38dfe585 100644 (file)
@@ -29,6 +29,9 @@
 #include "dsp563xx.h"
 #include "dsp563xx_once.h"
 
+#define JTAG_STATUS_STATIC_MASK                0x03
+#define JTAG_STATUS_STATIC_VALUE       0x01
+
 #define JTAG_STATUS_NORMAL             0x01
 #define JTAG_STATUS_STOPWAIT           0x05
 #define JTAG_STATUS_BUSY               0x09
@@ -100,19 +103,16 @@ int dsp563xx_once_target_status(struct jtag_tap *tap)
        uint8_t jtag_status;
 
        if ((err = dsp563xx_jtag_sendinstr(tap, &jtag_status, JTAG_INSTR_ENABLE_ONCE)) != ERROR_OK)
-               return err;
+               return TARGET_UNKNOWN;
        if ((err = jtag_execute_queue()) != ERROR_OK)
-               return err;
+               return TARGET_UNKNOWN;
 
-       if ((jtag_status & 1) != 1)
-       {
+       /* verify correct static status pattern */
+       if ( (jtag_status & JTAG_STATUS_STATIC_MASK) != JTAG_STATUS_STATIC_VALUE )
                return TARGET_UNKNOWN;
-       }
 
        if (jtag_status != JTAG_STATUS_DEBUG)
-       {
                return TARGET_RUNNING;
-       }
 
        return TARGET_HALTED;
 }
@@ -188,7 +188,7 @@ int dsp563xx_once_request_debug(struct jtag_tap *tap, int reset_state)
 int dsp563xx_once_read_register(struct jtag_tap *tap, int flush, struct once_reg *regs, int len)
 {
        int i;
-       int err;
+       int err = ERROR_OK;
 
        for (i = 0; i < len; i++)
        {

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)