Skip to content

Commit 5e42fc0

Browse files
author
Cruz Monrreal
authored
Merge pull request #9057 from offirko/offir_qspif_prefer_144_mode
Prefer QSPI Bus mode 1-4-4 as highest priority for QSPIFBlockDevice
2 parents f0a2b1d + b79c64e commit 5e42fc0

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

components/storage/blockdevice/COMPONENT_QSPIF/QSPIFBlockDevice.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ int QSPIFBlockDevice::erase(bd_addr_t addr, bd_size_t in_size)
421421
if (_set_write_enable() != 0) {
422422
tr_error("QSPI Erase Device not ready - failed");
423423
erase_failed = true;
424-
status = QSPIF_BD_ERROR_READY_FAILED;
424+
status = QSPIF_BD_ERROR_WREN_FAILED;
425425
goto exit_point;
426426
}
427427

@@ -1024,12 +1024,9 @@ int QSPIFBlockDevice::_sfdp_detect_best_bus_read_mode(uint8_t *basic_param_table
10241024
//_inst_width = QSPI_CFG_BUS_QUAD;
10251025
_address_width = QSPI_CFG_BUS_QUAD;
10261026
_data_width = QSPI_CFG_BUS_QUAD;
1027-
1028-
break;
10291027
}
10301028
}
1031-
1032-
1029+
is_qpi_mode = false;
10331030
examined_byte = basic_param_table_ptr[QSPIF_BASIC_PARAM_TABLE_FAST_READ_SUPPORT_BYTE];
10341031
if (examined_byte & 0x40) {
10351032
// Fast Read 1-4-4 Supported

components/storage/blockdevice/COMPONENT_QSPIF/TESTS/block_device/qspif/main.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ void basic_erase_program_read_test(QSPIFBlockDevice &blockD, bd_size_t block_siz
4848
{
4949
int err = 0;
5050
_mutex->lock();
51+
52+
static unsigned block_seed = 1;
53+
srand(block_seed++);
54+
5155
// Find a random block
5256
bd_addr_t block = (rand() * block_size) % blockD.size();
5357

0 commit comments

Comments
 (0)