Skip to content

Commit 898963a

Browse files
committed
QSPI: call is_mem_ready before trying to set write enable bit for AT25SF128A
This reverts commit f6d960e023a8d2300f3e850f5d721e87eeb95948.
1 parent 87ecffb commit 898963a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

storage/blockdevice/COMPONENT_QSPIF/source/QSPIFBlockDevice.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1243,7 +1243,13 @@ int QSPIFBlockDevice::_set_write_enable()
12431243
uint8_t status_value = 0;
12441244
int status = -1;
12451245

1246+
if (_AT25SF128A_quirk && (false == _is_mem_ready())) {
1247+
tr_error("Device not ready, set_write_enable failed");
1248+
return -1;
1249+
}
1250+
12461251
do {
1252+
12471253
if (QSPI_STATUS_OK != _qspi_send_general_command(QSPIF_INST_WREN, QSPI_NO_ADDRESS_COMMAND, NULL, 0, NULL, 0)) {
12481254
tr_error("Sending WREN command FAILED");
12491255
break;

0 commit comments

Comments
 (0)