Skip to content

Commit 2103316

Browse files
committed
lattice: added support for reset method (only tested with ECP5
1 parent 318ebca commit 2103316

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

src/lattice.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -702,6 +702,13 @@ bool Lattice::post_flash_access()
702702
_jtag->go_test_logic_reset();
703703
return true;
704704
}
705+
void Lattice::reset()
706+
{
707+
if (_fpga_family == ECP5_FAMILY)
708+
post_flash_access();
709+
else
710+
printError("Lattice Reset only tested on ECP5 Family.");
711+
}
705712

706713
bool Lattice::clearSRAM()
707714
{

src/lattice.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class Lattice: public Device, SPIInterface {
2525
int8_t verbose, bool skip_load_bridge, bool skip_reset);
2626
uint32_t idCode() override;
2727
int userCode();
28-
void reset() override {}
28+
void reset() override;
2929
void program(unsigned int offset, bool unprotect_flash) override;
3030
bool program_mem();
3131
bool program_flash(unsigned int offset, bool unprotect_flash);

0 commit comments

Comments
 (0)