openocd/src
Angus Gratton 9fce8a21ca stlink_usb: Fix swallowed error on read/write operations, add retries on SWD WAIT, clean up error debug output.
- stlink_usb_get_rw_status() had a bug where FAULT or WAIT responses
  in read/write operations were ignored, leading to incomplete data.

- Added wrapper stlink_cmd_allow_retry to handle
  SWD_AP_WAIT/SWD_DP_WAIT statuses in most commands. These statuses
  appear if an SWD read or write received a WAIT ACK response from the
  target more than 4 times in a row. The driver retries the operation
  (with exponential backoff) before failing outright (in testing 1
  retry was always enough.)

- As part of the implementation of stlink_cmd_allow_retry a large
  number of lines of boilerplate were refactored.

- Fleshed out stlink_usb_error_check and added it to some more code
  paths so WAIT or FAULT responses are logged to debug. WAIT responses
  will be logged even if they are subsequently retried, which should
  help in case the retries have subtle side effects (none
  anticipated.)

Tested with two targets: STLINK F0 Discovery, Nordic NRF51822. Only
tested with STLINK V2 programmers.

Change-Id: I9af24e8f0121b035356dbb9978d6bbf4feb2e4d3
Signed-off-by: Angus Gratton <gus@projectgus.com>
Reviewed-on: http://openocd.zylin.com/2201
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2014-08-11 22:34:52 +00:00
..
flash Adding support for the Atmel SAMR21. 2014-07-10 21:18:30 +00:00
helper stlink_usb: Fix swallowed error on read/write operations, add retries on SWD WAIT, clean up error debug output. 2014-08-11 22:34:52 +00:00
jtag stlink_usb: Fix swallowed error on read/write operations, add retries on SWD WAIT, clean up error debug output. 2014-08-11 22:34:52 +00:00
pld update files to correct FSF address 2013-06-05 19:52:42 +00:00
rtos Don't cast return value of [cm]alloc 2014-03-30 03:53:45 +00:00
server openrisc: add support for JTAG Serial Port 2014-06-22 08:39:08 +00:00
svf Openocd: svf: Add ability to ignore svf_check_tdo errors 2014-07-03 18:08:48 +00:00
target Allow transports to override the selected target (hla configs unification) 2014-08-11 21:25:56 +00:00
transport Allow transports to override the selected target (hla configs unification) 2014-08-11 21:25:56 +00:00
xsvf update files to correct FSF address 2013-06-05 19:52:42 +00:00
hello.c update files to correct FSF address 2013-06-05 19:52:42 +00:00
hello.h update files to correct FSF address 2013-06-05 19:52:42 +00:00
main.c update files to correct FSF address 2013-06-05 19:52:42 +00:00
Makefile.am Fix some problems with the bin2char utility 2014-08-02 09:01:32 +00:00
openocd.c Fix some problems with the bin2char utility 2014-08-02 09:01:32 +00:00
openocd.h Fix some problems with the bin2char utility 2014-08-02 09:01:32 +00:00