(Re)Init cJTAG only after trst (not after srst)

This commit is contained in:
mrv96 2022-10-07 14:50:03 +02:00
parent b411a955c8
commit 29983fd98d
1 changed files with 5 additions and 4 deletions

View File

@ -676,18 +676,19 @@ static void ftdi_execute_stableclocks(struct jtag_command *cmd)
static void ftdi_execute_command(struct jtag_command *cmd) static void ftdi_execute_command(struct jtag_command *cmd)
{ {
switch (cmd->type) { switch (cmd->type) {
case JTAG_RESET:
#if BUILD_FTDI_CJTAG == 1 #if BUILD_FTDI_CJTAG == 1
cjtag_reset_online_activate(); /* put the target back into selected cJTAG mode */ case JTAG_RESET:
#endif if (cmd->cmd.reset->trst)
cjtag_reset_online_activate(); /* put the target (back) into selected cJTAG mode */
break; break;
#endif
case JTAG_RUNTEST: case JTAG_RUNTEST:
ftdi_execute_runtest(cmd); ftdi_execute_runtest(cmd);
break; break;
case JTAG_TLR_RESET: case JTAG_TLR_RESET:
ftdi_execute_statemove(cmd); ftdi_execute_statemove(cmd);
#if BUILD_FTDI_CJTAG == 1 #if BUILD_FTDI_CJTAG == 1
cjtag_reset_online_activate(); /* put the target back into selected cJTAG mode */ cjtag_reset_online_activate(); /* put the target (back) into selected cJTAG mode */
#endif #endif
break; break;
case JTAG_PATHMOVE: case JTAG_PATHMOVE: