File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
storage/blockdevice/COMPONENT_QSPIF/source Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -1113,12 +1113,14 @@ int QSPIFBlockDevice::_handle_vendor_quirks()
11131113 case 0xc2 :
11141114 // Macronix devices have several quirks:
11151115 // 1. Have one status register and several config registers, with a nonstandard instruction for reading the config registers
1116- // 2. Require setting a "fast mode" bit in config register 2 to operate at higher clock rates
1116+ // 2. Require setting a "fast mode" bit in config register 2 to operate at higher clock rates (if config register 2 exists)
11171117 // 3. Should never attempt to enable 4-byte addressing (it causes reads and writes to fail)
11181118 tr_debug (" Applying quirks for macronix" );
1119- _needs_fast_mode = true ;
11201119 _num_status_registers = MBED_CONF_QSPI_MACRONIX_NUM_STATUS_REGISTER;
11211120 _read_status_reg_2_inst = QSPIF_INST_RDCR;
1121+ if (MBED_CONF_QSPI_MACRONIX_NUM_STATUS_REGISTER >= 3 ) {
1122+ _needs_fast_mode = true ;
1123+ }
11221124 break ;
11231125 case 0x9d :
11241126 // ISSI devices have only one status register
You can’t perform that action at this time.
0 commit comments