Merge pull request #744 from mrv96/cjtag

Handle correctly cJTAG reset
This commit is contained in:
Tim Newsome 2022-10-10 09:43:11 -07:00 committed by GitHub
commit f6163aacb4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 5 deletions

View File

@ -676,19 +676,20 @@ 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);
#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
ftdi_execute_statemove(cmd);
break; break;
case JTAG_PATHMOVE: case JTAG_PATHMOVE:
ftdi_execute_pathmove(cmd); ftdi_execute_pathmove(cmd);