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

JTAG state machine #379

Closed
wants to merge 1 commit into from
Closed
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
3 changes: 0 additions & 3 deletions src/gowin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1076,7 +1076,6 @@ int Gowin::spi_put_gw5a(const uint8_t cmd, const uint8_t *tx, uint8_t *rx,
// set TMS/CS high by moving to a state where TMS == 1
_jtag->set_state(Jtag::TEST_LOGIC_RESET, curr_tdi);
_jtag->toggleClk(5); // Required ?
_jtag->flushTMS(true);
if (rx) { // Reconstruct read sequence and drop first 3bits.
for (uint32_t i = 0; i < len; i++)
rx[i] = FsParser::reverseByte((jrx[i] >> 3) |
Expand Down Expand Up @@ -1148,7 +1147,6 @@ bool Gowin::gw5a_disable_spi()
*/
_jtag->setWriteEdge(_prev_wr_edge);
_jtag->setReadEdge(_prev_rd_edge);
_jtag->flushTMS(true);
_jtag->flush();
// 1. sent 15 TMS pulse
// TEST_LOGIC_RESET to SELECT_DR_SCAN: 01
Expand All @@ -1167,7 +1165,6 @@ bool Gowin::gw5a_disable_spi()
_jtag->set_state(Jtag::EXIT1_DR); // 01 : 16
_jtag->set_state(Jtag::PAUSE_DR); // 0

_jtag->flushTMS(true);
_jtag->flush();
// 2. 8 TCK clock cycle with TMS=1
_jtag->set_state(Jtag::TEST_LOGIC_RESET); // 5 cycles
Expand Down
Loading
Loading