Skip to content

Commit 2154948

Browse files
Matthew MacovskyKyle Kearney
authored andcommitted
Update QSPI format after enabling 4-byte addressing
1 parent 19330da commit 2154948

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

components/storage/blockdevice/COMPONENT_QSPIF/QSPIFBlockDevice.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1079,6 +1079,15 @@ int QSPIFBlockDevice::_sfdp_detect_and_enable_4byte_addressing(uint8_t *basic_pa
10791079
tr_debug("_sfdp_detect_and_enable_4byte_addressing - 4-byte addressing not supported, falling back to 3-byte addressing");
10801080
_address_size = QSPI_CFG_ADDR_SIZE_24;
10811081
}
1082+
1083+
if (_address_size == QSPI_CFG_ADDR_SIZE_32) {
1084+
// Update 1-1-1 format to match new address size
1085+
if (QSPI_STATUS_OK != _qspi.configure_format(QSPI_CFG_BUS_SINGLE, QSPI_CFG_BUS_SINGLE, _address_size, QSPI_CFG_BUS_SINGLE,
1086+
0, QSPI_CFG_BUS_SINGLE, 0)) {
1087+
tr_error("_qspi_configure_format failed");
1088+
status = QSPIF_BD_ERROR_DEVICE_ERROR;
1089+
}
1090+
}
10821091
}
10831092

10841093
return status;

0 commit comments

Comments
 (0)