openocd/src
Luis de Arquer b44948985f drivers/ftdi: drscan: Skip DR-PAUSE when endstate == IDLE
Currently, all drscan commands will cycle through DR-PAUSE before reaching
TAP-IDLE. This patch provides a different path on FTDI driver.

This change is required for the ST On Chip Emulator (OnCE), to avoid
re-enabling the OnCE tap after every DRSCAN. This is because the OnCE
TAP (see ST Application Note AN4035) gets disabled if DR-PAUSE is entered
before DR-UPDATE.

With this commit, the current path:

DR-SHIFT -> DR-EXIT1 -> DR-PAUSE -> DR-EXIT2 -> DR-UPDATE -> IDLE

is changed to:

DR-SHIFT -> DR-EXIT1 -> DR-UPDATE -> IDLE

only if IDLE is the endstate (which is the driver default).

Before this patch, once the SHIFT sequence is complete, the driver would
normally move to the nearest stable state, which is DR-PAUSE, by clocking
out a '10' binary sequence. Then it would follow the path provided by
tap_get_tms_path() to reach endstate. It is done this way because
tap_get_tms_path() only supports stable states.

After this patch, the strategy is mostly the same, with the exception that,
if TAP_IDLE is the endstate, a '110' binary sequence is output after completing
the SHIFT sequence. This takes the TAP directly to IDLE, with no further action
required.

A scheme of the DR chain is shown below. A * character is used to mark the
stable states.

 ----------------------------------------------------------------------
 |                                                                    | 0
 v    1         0          0         1        0         1        1    |
IDLE* -> SEL-DR -> CAPTURE -> SHIFT* -> EXIT1 -> PAUSE* -> EXIT2 -> UPDATE
                                          |                           ^
                                        1 |                           |
                                          -----------------------------

Change-Id: Ib413e5c4c0bbf75dae0b4672119bae4ef03d0258
Signed-off-by: Luis de Arquer <luis.dearquer@inertim.com>
Reviewed-on: http://openocd.zylin.com/6123
Tested-by: jenkins
Reviewed-by: Christopher Head <chead@zaber.com>
Reviewed-by: Oleksij Rempel <linux@rempel-privat.de>
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2021-05-01 14:21:38 +01:00
..
flash flash/nor/nrf5: Fix data types and const correctness 2021-04-22 13:06:26 +01:00
helper helper/command: drop the TCL variable 'ocd_HOSTOS' 2021-05-01 13:37:21 +01:00
jtag drivers/ftdi: drscan: Skip DR-PAUSE when endstate == IDLE 2021-05-01 14:21:38 +01:00
pld helper/command: pass command prefix to command registration 2021-04-18 15:33:30 +01:00
rtos target/armv7m: change FPv4_SP and FPv5_SP/DP identifiers to uppercase 2021-04-30 08:20:54 +01:00
rtt openocd: fix doxygen parameters of functions 2021-01-13 11:33:53 +00:00
server telnet: auto-completion of "registered" commands 2021-05-01 13:53:57 +01:00
svf openocd: fix command's usage string 2020-09-05 17:13:10 +01:00
target target/image: report error if ELF file contains no loadable sections 2021-05-01 13:36:28 +01:00
transport jtag: remove minidriver code and minidriver-dummy 2021-03-19 21:56:06 +00:00
xsvf openocd: avoid checking for non NULL pointer to free it 2020-09-05 17:11:50 +01:00
Makefile.am build: Fix out-of-tree with --disable-dependency-tracking configure flag 2021-04-05 23:24:14 +01:00
hello.c helper/command: change prototype of command_print/command_print_sameline 2019-05-14 19:37:11 +01:00
hello.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
main.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
openocd.c help: re-implement 'help' independent from tree of struct command 2021-04-18 15:33:54 +01:00
openocd.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00