Skip to content

Commit

Permalink
lattice: added support for reset method (only tested with ECP5
Browse files Browse the repository at this point in the history
  • Loading branch information
trabucayre committed Dec 19, 2024
1 parent 318ebca commit 2103316
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/lattice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -702,6 +702,13 @@ bool Lattice::post_flash_access()
_jtag->go_test_logic_reset();
return true;
}
void Lattice::reset()
{
if (_fpga_family == ECP5_FAMILY)
post_flash_access();
else
printError("Lattice Reset only tested on ECP5 Family.");
}

bool Lattice::clearSRAM()
{
Expand Down
2 changes: 1 addition & 1 deletion src/lattice.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class Lattice: public Device, SPIInterface {
int8_t verbose, bool skip_load_bridge, bool skip_reset);
uint32_t idCode() override;
int userCode();
void reset() override {}
void reset() override;
void program(unsigned int offset, bool unprotect_flash) override;
bool program_mem();
bool program_flash(unsigned int offset, bool unprotect_flash);
Expand Down

0 comments on commit 2103316

Please sign in to comment.