Skip to content

Commit

Permalink
gowin: GW5AST work around
Browse files Browse the repository at this point in the history
  • Loading branch information
trabucayre committed Dec 11, 2023
1 parent 1c7a4af commit d8186c5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/gowin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ void Gowin::programSRAM()
displayReadReg("before program sram", readStatusReg());
}
/* Work around FPGA stuck in Bad Command status */
if (is_gw5a) {
if (is_gw5a) { // 20231112: no more required but left
reset();
_jtag->set_state(Jtag::RUN_TEST_IDLE);
_jtag->toggleClk(1000000);
Expand Down Expand Up @@ -774,6 +774,8 @@ bool Gowin::eraseSRAM()
* is send and goes high after erase
* this check seems enough
*/
if (_idcode == 0x0001081b) // seems required for GW5AST...
sendClkUs(10000);
if (pollFlag(STATUS_MEMORY_ERASE, STATUS_MEMORY_ERASE)) {
if (_verbose)
displayReadReg("after erase sram", readStatusReg());
Expand Down

0 comments on commit d8186c5

Please sign in to comment.