Skip to content

Commit

Permalink
gatemate: fix jtag-spi-bypass with dirtyJtag
Browse files Browse the repository at this point in the history
  • Loading branch information
pu-cc committed Mar 14, 2024
1 parent e52d647 commit 7dc3ff7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/colognechip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ int CologneChip::spi_put(const uint8_t *tx, uint8_t *rx, uint32_t len)
}

/**
* Overrides spi_put() to access SPI components via JTAG-SPI-bypass.
* Overrides spi_wait() to access SPI components via JTAG-SPI-bypass.
*/
int CologneChip::spi_wait(uint8_t cmd, uint8_t mask, uint8_t cond,
uint32_t timeout, bool verbose)
Expand All @@ -413,7 +413,7 @@ int CologneChip::spi_wait(uint8_t cmd, uint8_t mask, uint8_t cond,

do {
if (count == 0) {
_jtag->read_write(dummy, rx, 9, 0);
_jtag->read_write(dummy, rx, 16, 0);
uint8_t b0 = ConfigBitstreamParser::reverseByte(rx[0]);
uint8_t b1 = ConfigBitstreamParser::reverseByte(rx[1]);
tmp = (b0 << 1) | ((b1 >> 7) & 0x01);
Expand Down

0 comments on commit 7dc3ff7

Please sign in to comment.