From c1b79a85bbf1d6f4f8ea6a0b885392d4c997a38a Mon Sep 17 00:00:00 2001 From: Greg Savin Date: Tue, 5 Nov 2019 13:44:25 -0800 Subject: Whenever bscan mode is entered, reset the variable that tracks whether we are certain that USER4 has already been selected into IR. --- src/target/riscv/riscv.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/target/riscv/riscv.c b/src/target/riscv/riscv.c index 70c5e2f..1ac7aaf 100644 --- a/src/target/riscv/riscv.c +++ b/src/target/riscv/riscv.c @@ -2257,6 +2257,13 @@ COMMAND_HANDLER(riscv_use_bscan_tunnel) bscan_tunnel_type = tunnel_type; bscan_tunnel_ir_width = irwidth; + /* Set things up to generate another one-time loading of USER4 into IR the first time + a RISCV scan happens from this point, in case somebody transitioned out of bscan + tunneling mode and did some other activity on the outer JTAG chain after having + been in bscan tunneling mode at an earlier time within the same lifetime of this + process (which may have loaded a different IR value). */ + bscan_user4_selected = false; + return ERROR_OK; } -- cgit v1.1