Simplified bscan_shift routine (never need to stay in shift state at conclusion).
This commit is contained in:
parent
2b73796a5c
commit
fc35fd25fe
|
@ -504,10 +504,9 @@ static void ftdi_execute_pathmove(struct jtag_command *cmd)
|
||||||
}
|
}
|
||||||
|
|
||||||
#if BUILD_FTDI_BSCAN == 1
|
#if BUILD_FTDI_BSCAN == 1
|
||||||
static void bscan_shift(bool traverse_to_end_state, const uint8_t *out, unsigned out_offset, uint8_t *in,
|
static void bscan_shift_and_traverse_to_end_state(const uint8_t *out, unsigned out_offset, uint8_t *in,
|
||||||
unsigned in_offset, unsigned length)
|
unsigned in_offset, unsigned length)
|
||||||
{
|
{
|
||||||
if (traverse_to_end_state) {
|
|
||||||
DO_CLOCK_DATA(mpsse_ctx,
|
DO_CLOCK_DATA(mpsse_ctx,
|
||||||
out,
|
out,
|
||||||
out_offset,
|
out_offset,
|
||||||
|
@ -538,15 +537,6 @@ static void bscan_shift(bool traverse_to_end_state, const uint8_t *out, unsigned
|
||||||
|
|
||||||
if (tap_get_state() != tap_get_end_state())
|
if (tap_get_state() != tap_get_end_state())
|
||||||
move_to_state(tap_get_end_state());
|
move_to_state(tap_get_end_state());
|
||||||
} else {
|
|
||||||
DO_CLOCK_DATA(mpsse_ctx,
|
|
||||||
out,
|
|
||||||
out_offset,
|
|
||||||
in,
|
|
||||||
in_offset,
|
|
||||||
length,
|
|
||||||
ftdi_jtag_mode);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -576,7 +566,7 @@ static void ftdi_execute_scan_via_bscan(struct jtag_command *cmd)
|
||||||
|
|
||||||
// Do the 6-bit IR scan of 0x23 (USER4)
|
// Do the 6-bit IR scan of 0x23 (USER4)
|
||||||
|
|
||||||
bscan_shift(true, &bscan_ir_user, 0, NULL, 0, bscan_ir_user_width);
|
bscan_shift_and_traverse_to_end_state(&bscan_ir_user, 0, NULL, 0, bscan_ir_user_width);
|
||||||
|
|
||||||
if (tap_get_state() != tap_get_end_state())
|
if (tap_get_state() != tap_get_end_state())
|
||||||
move_to_state(tap_get_end_state());
|
move_to_state(tap_get_end_state());
|
||||||
|
@ -650,7 +640,7 @@ static void ftdi_execute_scan_via_bscan(struct jtag_command *cmd)
|
||||||
|
|
||||||
|
|
||||||
// shift in epilogue (3 bits of value zero), exiting shift state and traversing to idle state
|
// shift in epilogue (3 bits of value zero), exiting shift state and traversing to idle state
|
||||||
bscan_shift(true, &epilogue, 0, NULL, 0, 3);
|
bscan_shift_and_traverse_to_end_state(&epilogue, 0, NULL, 0, 3);
|
||||||
|
|
||||||
if (tap_get_state() != tap_get_end_state())
|
if (tap_get_state() != tap_get_end_state())
|
||||||
move_to_state(tap_get_end_state());
|
move_to_state(tap_get_end_state());
|
||||||
|
|
Loading…
Reference in New Issue