mirror of https://github.com/YosysHQ/icestorm.git
iceprog: Improve reset to disable both CRM and QPI
It's hard to cover 100% of cases, but this seems to improve probability that a reset works, at least for me on the icebreaker. Some other flash have a different QPI disable command though :/ Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
This commit is contained in:
parent
502d847b41
commit
c5a8beffec
|
|
@ -202,9 +202,15 @@ static void flash_reset()
|
|||
{
|
||||
uint8_t data[8] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
|
||||
|
||||
// This disables CRM is if it was enabled
|
||||
flash_chip_select();
|
||||
mpsse_xfer_spi(data, 8);
|
||||
flash_chip_deselect();
|
||||
|
||||
// This disables QPI if it was enable
|
||||
flash_chip_select();
|
||||
mpsse_xfer_spi_bits(0xFF, 2);
|
||||
flash_chip_deselect();
|
||||
}
|
||||
|
||||
static void flash_power_up()
|
||||
|
|
|
|||
Loading…
Reference in New Issue