]> git.sur5r.net Git - openocd/commitdiff
jtag/drivers/stlink: fix SRST issue with stlink-v1
authorPaul Fertser <fercerpav@gmail.com>
Sun, 10 May 2015 10:12:14 +0000 (13:12 +0300)
committerPaul Fertser <fercerpav@gmail.com>
Sun, 17 May 2015 20:52:51 +0000 (21:52 +0100)
Even though the latest firmware version for stlink-v1 supports "v2"
JTAG API, the hardware SRST handling is still broken; amend the check
accordingly.

Change-Id: I62c662cd7aa209d2d6e9fe260f5c0be81d0ce672
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2761
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
src/jtag/drivers/stlink_usb.c

index 18498dd22e2dd8b3f75a50e1818e9badde045536..e129e8099e1e29020b11bd6580f740b11c9ca006 100644 (file)
@@ -974,7 +974,7 @@ static int stlink_usb_assert_srst(void *handle, int srst)
 
        assert(handle != NULL);
 
-       if (h->jtag_api == STLINK_JTAG_API_V1)
+       if (h->version.stlink == 1)
                return ERROR_COMMAND_NOTFOUND;
 
        stlink_usb_init_buffer(handle, h->rx_ep, 2);