Skip to content
Permalink
Browse files

shift output data from bscane2 one more bit

  • Loading branch information
KireinaHoro committed Feb 27, 2020
1 parent cb7f6be commit 11238e1eb4ecb883ee36fcf24668187c782ade5a
Showing with 2 additions and 2 deletions.
  1. +1 −1 src/target/riscv/riscv-013.c
  2. +1 −1 src/target/riscv/riscv.c
@@ -529,7 +529,7 @@ static dmi_status_t dmi_scan(struct target *target, uint32_t *address_in,

if (bscan_tunnel_ir_width != 0) {
/* need to right-shift "in" by one bit, because of clock skew between BSCAN TAP and DM TAP */
buffer_shr(in, num_bytes, 1);
buffer_shr(in, num_bytes, 2);
}

if (data_in)
@@ -396,7 +396,7 @@ uint32_t dtmcontrol_scan_via_bscan(struct target *target, uint32_t out)
}
/* Note the starting offset is bit 1, not bit 0. In BSCAN tunnel, there is a one-bit TCK skew between
output and input */
uint32_t in = buf_get_u32(in_value, 1, 32);
uint32_t in = buf_get_u32(in_value, 2, 32);
LOG_DEBUG("DTMCS: 0x%x -> 0x%x", out, in);

return in;

0 comments on commit 11238e1

Please sign in to comment.
You can’t perform that action at this time.