Skip to content

Commit 869f0d7

Browse files
authored
Merge pull request #15493 from macronix/macronix_qspi_driver
Add configurable status register number in mbed_lib.json for QSPIBlockDevice driver to support different Flash EPN
2 parents e04a55f + 9385ec8 commit 869f0d7

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

storage/blockdevice/COMPONENT_QSPIF/mbed_lib.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,13 @@
1818
"QSPI_POLARITY_MODE": 0,
1919
"QSPI_FREQ": "40000000",
2020
"QSPI_MIN_READ_SIZE": "1",
21-
"QSPI_MIN_PROG_SIZE": "1"
21+
"QSPI_MIN_PROG_SIZE": "1",
22+
"QSPI_NUM_STATUS_REGISTER":"2"
2223
},
2324
"target_overrides": {
2425
"MX25R6435F": {
25-
"QSPI_FREQ": "8000000"
26+
"QSPI_FREQ": "8000000",
27+
"QSPI_NUM_STATUS_REGISTER":"3"
2628
},
2729
"MX25L51245G": {
2830
"QSPI_FREQ": "8000000"

storage/blockdevice/COMPONENT_QSPIF/source/QSPIFBlockDevice.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1093,7 +1093,7 @@ int QSPIFBlockDevice::_handle_vendor_quirks()
10931093
// 3. Should never attempt to enable 4-byte addressing (it causes reads and writes to fail)
10941094
tr_debug("Applying quirks for macronix");
10951095
_needs_fast_mode = true;
1096-
_num_status_registers = 3;
1096+
_num_status_registers = MBED_CONF_QSPI_NUM_STATUS_REGISTER;
10971097
_read_status_reg_2_inst = QSPIF_INST_RDCR;
10981098
_attempt_4_byte_addressing = false;
10991099
break;

0 commit comments

Comments
 (0)