Skip to content

Commit

Permalink
Merge pull request #15493 from macronix/macronix_qspi_driver
Browse files Browse the repository at this point in the history
Add configurable status register number in mbed_lib.json for QSPIBlockDevice driver to support different Flash EPN
  • Loading branch information
0xc0170 committed May 27, 2024
2 parents e04a55f + 9385ec8 commit 869f0d7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions storage/blockdevice/COMPONENT_QSPIF/mbed_lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@
"QSPI_POLARITY_MODE": 0,
"QSPI_FREQ": "40000000",
"QSPI_MIN_READ_SIZE": "1",
"QSPI_MIN_PROG_SIZE": "1"
"QSPI_MIN_PROG_SIZE": "1",
"QSPI_NUM_STATUS_REGISTER":"2"
},
"target_overrides": {
"MX25R6435F": {
"QSPI_FREQ": "8000000"
"QSPI_FREQ": "8000000",
"QSPI_NUM_STATUS_REGISTER":"3"
},
"MX25L51245G": {
"QSPI_FREQ": "8000000"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1093,7 +1093,7 @@ int QSPIFBlockDevice::_handle_vendor_quirks()
// 3. Should never attempt to enable 4-byte addressing (it causes reads and writes to fail)
tr_debug("Applying quirks for macronix");
_needs_fast_mode = true;
_num_status_registers = 3;
_num_status_registers = MBED_CONF_QSPI_NUM_STATUS_REGISTER;
_read_status_reg_2_inst = QSPIF_INST_RDCR;
_attempt_4_byte_addressing = false;
break;
Expand Down

0 comments on commit 869f0d7

Please sign in to comment.