summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDavid Brownell <dbrownell@users.sourceforge.net>2009-10-19 22:50:51 -0700
committerDavid Brownell <dbrownell@users.sourceforge.net>2009-10-19 22:50:51 -0700
commitd243e641d3169674082f3cdae2d9a7242b96f2c2 (patch)
tree716365f00a5ea1565ae1dfcce67e0e25a2ad00ef /src
parent3cc147efd95502bd4d873596b60c3c6d8e92ab71 (diff)
downloadopenocd+libswd-d243e641d3169674082f3cdae2d9a7242b96f2c2.tar.gz
openocd+libswd-d243e641d3169674082f3cdae2d9a7242b96f2c2.tar.bz2
openocd+libswd-d243e641d3169674082f3cdae2d9a7242b96f2c2.tar.xz
openocd+libswd-d243e641d3169674082f3cdae2d9a7242b96f2c2.zip
jtag_add_statemove() always uses TLR to get to RESET
As decided a while back, this isn't a transition we want to chance. Whenever someone wants to got to RESET, force it. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Diffstat (limited to 'src')
-rw-r--r--src/jtag/core.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/jtag/core.c b/src/jtag/core.c
index 415d1e82..7c85839b 100644
--- a/src/jtag/core.c
+++ b/src/jtag/core.c
@@ -567,12 +567,14 @@ int jtag_add_statemove(tap_state_t goal_state)
tap_state_name(goal_state));
- if (goal_state == cur_state)
- ; /* nothing to do */
- else if (goal_state == TAP_RESET)
- {
+ /* If goal is RESET, be paranoid and force that that transition
+ * (e.g. five TCK cycles, TMS high). Else trust "cur_state".
+ */
+ if (goal_state == TAP_RESET)
jtag_add_tlr();
- }
+ else if (goal_state == cur_state)
+ /* nothing to do */ ;
+
else if (tap_is_state_stable(cur_state) && tap_is_state_stable(goal_state))
{
unsigned tms_bits = tap_get_tms_path(cur_state, goal_state);