summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorduane <duane@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-12-27 03:13:50 +0000
committerduane <duane@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-12-27 03:13:50 +0000
commit274b3a56ef018f5689d85ed69b4c37218984bc05 (patch)
tree7c03cd3674375e7a678eb8dcad5c02479edfd898
parent45e44118a8572e601e5b462246e02d3ba895928f (diff)
downloadopenocd+libswd-274b3a56ef018f5689d85ed69b4c37218984bc05.tar.gz
openocd+libswd-274b3a56ef018f5689d85ed69b4c37218984bc05.tar.bz2
openocd+libswd-274b3a56ef018f5689d85ed69b4c37218984bc05.tar.xz
openocd+libswd-274b3a56ef018f5689d85ed69b4c37218984bc05.zip
From Lou.openocd012@fixit.nospammail.net
git-svn-id: svn://svn.berlios.de/openocd/trunk@1282 b42882b7-edfa-0310-969c-e2dbd0fdcd60
-rw-r--r--src/jtag/rlink/rlink.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/jtag/rlink/rlink.c b/src/jtag/rlink/rlink.c
index 9fc4a75a..188ea56d 100644
--- a/src/jtag/rlink/rlink.c
+++ b/src/jtag/rlink/rlink.c
@@ -1001,18 +1001,29 @@ void rlink_reset(int trst, int srst)
}
usb_err = ep1_generic_commandl(
- pHDev, 5,
+ pHDev, 6,
EP1_CMD_MEMORY_WRITE,
ST7_PADR >> 8,
ST7_PADR,
1,
- bitmap
+ bitmap,
+ EP1_CMD_DTC_GET_CACHED_STATUS
);
if(usb_err < 0) {
LOG_ERROR("%s: %s\n", __func__, usb_strerror());
exit(1);
}
+
+ usb_err = usb_bulk_read(
+ pHDev, USB_EP1IN_ADDR,
+ &bitmap, 1,
+ USB_TIMEOUT_MS
+ );
+ if(usb_err < 1) {
+ LOG_ERROR("%s: %s\n", __func__, usb_strerror());
+ exit(1);
+ }
}