Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: SWD to JTAG sequence #1443

Merged
merged 2 commits into from
Apr 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/platforms/common/jtagtap.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ void jtagtap_init(void)
jtag_proc.tap_idle_cycles = 1;

/* Ensure we're in JTAG mode */
for (size_t i = 0; i < 50U; ++i)
jtagtap_next(true, false); /* 50 idle cylces for SWD reset */
for (size_t i = 0; i <= 50U; ++i)
jtagtap_next(true, false); /* 50 + 1 idle cycles for SWD reset */
jtagtap_tms_seq(0xe73cU, 16U); /* SWD to JTAG sequence */
}

Expand Down
4 changes: 2 additions & 2 deletions src/platforms/hosted/libftdi_jtagtap.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ bool ftdi_jtag_init(void)
ftdi_jtag_drain_potential_garbage();

/* Ensure we're in JTAG mode */
for (size_t i = 0; i < 50U; ++i)
ftdi_jtag_next(true, false); /* 50 idle cycles for SWD reset */
for (size_t i = 0; i <= 50U; ++i)
ftdi_jtag_next(true, false); /* 50 + 1 idle cycles for SWD reset */
ftdi_jtag_tms_seq(0xe73cU, 16U); /* SWD to JTAG sequence */
return true;
}
Expand Down