Skip to content

Commit 637ffa9

Browse files
committed
hifive hal: switch back to "hw mode" after erase/write operations
1 parent c46cf51 commit 637ffa9

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

hal/hifive1.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,7 @@ int RAMFUNCTION hal_flash_write(uint32_t address, const uint8_t *data, int len)
426426
fespi_sw_tx(data[i]);
427427
fespi_wait_txwm();
428428
fespi_csmode_auto();
429+
fespi_hwmode();
429430
return 0;
430431
}
431432

@@ -455,5 +456,6 @@ int RAMFUNCTION hal_flash_erase(uint32_t address, int len)
455456
fespi_csmode_auto();
456457
fespi_wait_flash_busy();
457458
}
459+
fespi_hwmode();
458460
return 0;
459461
}

0 commit comments

Comments
 (0)