summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--supervisor/shared/external_flash/external_flash.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/supervisor/shared/external_flash/external_flash.c b/supervisor/shared/external_flash/external_flash.c
index 69eeec43d..bfc434664 100644
--- a/supervisor/shared/external_flash/external_flash.c
+++ b/supervisor/shared/external_flash/external_flash.c
@@ -218,11 +218,12 @@ void supervisor_flash_init(void) {
do {
spi_flash_read_command(CMD_READ_STATUS, read_status_response, 1);
} while ((read_status_response[0] & 0x1) != 0);
- // The suspended write/erase bit should be low.
- do {
+ if (!flash_device->single_status_byte) {
+ // The suspended write/erase bit should be low.
+ do {
spi_flash_read_command(CMD_READ_STATUS2, read_status_response, 1);
- } while ((read_status_response[0] & 0x80) != 0);
-
+ } while ((read_status_response[0] & 0x80) != 0);
+ }
spi_flash_command(CMD_ENABLE_RESET);
spi_flash_command(CMD_RESET);