- jtag_goto_shift_dr();
- // if the next instruction is to run using MCLK (master clock), set TDI
- if (breakpt)
- {
- SETMOSI;
- }
- else
- {
- CLRMOSI;
- }
- jtag_tcktock();
-
- // Now shift in the 32 bits
- retval = jtagtransn(instr, 32, 0); // Must return to RUN-TEST/IDLE state for instruction to enter pipeline, and causes debug clock.
+ if (last_instr != instr && last_sysstate != breakpt){
+ jtag_goto_shift_dr();
+ // if the next instruction is to run using MCLK (master clock), set TDI
+ if (breakpt)
+ {
+ SETMOSI;
+ }
+ else
+ {
+ CLRMOSI;
+ }
+ jtag_tcktock();
+
+ // Now shift in the 32 bits
+ retval = jtagtransn(instr, 32, 0); // Must return to RUN-TEST/IDLE state for instruction to enter pipeline, and causes debug clock.
+ tapstate = RunTest_Idle;
+ last_instr = instr;
+ last_sysstate = breakpt;
+ } else
+ jtag_tcktock();