diff options
author | Antonio Borneo <borneo.antonio@gmail.com> | 2021-11-11 22:29:32 +0100 |
---|---|---|
committer | Antonio Borneo <borneo.antonio@gmail.com> | 2021-11-20 14:37:21 +0000 |
commit | fdaa16506d121f4d4616a2bcafe7dee017d55d81 (patch) | |
tree | 00fd15aa0e6578acdaad33eda60d386119d26b67 /src | |
parent | 560f0d83392bafc03d674e13880940d52d3f7f94 (diff) | |
download | riscv-openocd-fdaa16506d121f4d4616a2bcafe7dee017d55d81.zip riscv-openocd-fdaa16506d121f4d4616a2bcafe7dee017d55d81.tar.gz riscv-openocd-fdaa16506d121f4d4616a2bcafe7dee017d55d81.tar.bz2 |
ftdi: add support to switch to/from dormant state
Partially extracted from https://review.openocd.org/4935
Change-Id: Ia3f197b257434a1a7979fdbc08936c7c541db1e2
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Signed-off-by: graham sanderson <graham.sanderson@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6693
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/jtag/drivers/ftdi.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/jtag/drivers/ftdi.c b/src/jtag/drivers/ftdi.c index 6e2e184..d03a4ca 100644 --- a/src/jtag/drivers/ftdi.c +++ b/src/jtag/drivers/ftdi.c @@ -1238,11 +1238,31 @@ static int ftdi_swd_switch_seq(enum swd_special_seq seq) ftdi_swd_swdio_en(true); mpsse_clock_data_out(mpsse_ctx, swd_seq_jtag_to_swd, 0, swd_seq_jtag_to_swd_len, SWD_MODE); break; + case JTAG_TO_DORMANT: + LOG_DEBUG("JTAG-to-DORMANT"); + ftdi_swd_swdio_en(true); + mpsse_clock_data_out(mpsse_ctx, swd_seq_jtag_to_dormant, 0, swd_seq_jtag_to_dormant_len, SWD_MODE); + break; case SWD_TO_JTAG: LOG_DEBUG("SWD-to-JTAG"); ftdi_swd_swdio_en(true); mpsse_clock_data_out(mpsse_ctx, swd_seq_swd_to_jtag, 0, swd_seq_swd_to_jtag_len, SWD_MODE); break; + case SWD_TO_DORMANT: + LOG_DEBUG("SWD-to-DORMANT"); + ftdi_swd_swdio_en(true); + mpsse_clock_data_out(mpsse_ctx, swd_seq_swd_to_dormant, 0, swd_seq_swd_to_dormant_len, SWD_MODE); + break; + case DORMANT_TO_SWD: + LOG_DEBUG("DORMANT-to-SWD"); + ftdi_swd_swdio_en(true); + mpsse_clock_data_out(mpsse_ctx, swd_seq_dormant_to_swd, 0, swd_seq_dormant_to_swd_len, SWD_MODE); + break; + case DORMANT_TO_JTAG: + LOG_DEBUG("DORMANT-to-JTAG"); + ftdi_swd_swdio_en(true); + mpsse_clock_data_out(mpsse_ctx, swd_seq_dormant_to_jtag, 0, swd_seq_dormant_to_jtag_len, SWD_MODE); + break; default: LOG_ERROR("Sequence %d not supported", seq); return ERROR_FAIL; |