diff options
| author | Max Holliday <maholli@stanford.edu> | 2020-05-09 12:09:01 -0700 |
|---|---|---|
| committer | Max Holliday <maholli@stanford.edu> | 2020-05-09 12:09:01 -0700 |
| commit | 8b6587a0c646089608b0c8bbace97a73462cf88f (patch) | |
| tree | 81d9e593d3b6f46918e368bf7a36c3d60cddfc17 /supervisor/shared | |
| parent | 9e01bb213617fd46723f3dbb869ba51c1985ac21 (diff) | |
Unified single_status_byte & no_reset_cmd behavior
Diffstat (limited to 'supervisor/shared')
| -rw-r--r-- | supervisor/shared/external_flash/external_flash.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/supervisor/shared/external_flash/external_flash.c b/supervisor/shared/external_flash/external_flash.c index a2d8ff5f3..71b2d6d54 100644 --- a/supervisor/shared/external_flash/external_flash.c +++ b/supervisor/shared/external_flash/external_flash.c @@ -244,13 +244,14 @@ void supervisor_flash_init(void) { do { spi_flash_read_command(CMD_READ_STATUS, read_status_response, 1); } while ((read_status_response[0] & 0x1) != 0); - - if (!(flash_device->no_reset_cmd)){ + 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); - } else { + } + + if (!(flash_device->no_reset_cmd)){ spi_flash_command(CMD_ENABLE_RESET); spi_flash_command(CMD_RESET); } |
