I have an external Flash, connected via SPI (DUAL not quad) to my STM32.
Initial communication like readID (JEDEC) is working.
I changed the statusregister from QUAD to Normal SPI and this should be persistant but on the next try it is set again.
My problem is that writing, erasing does not work. On every attempt to read from any address, the readID data 0x(9d 60 18) is returned from the Flash and fills the provided dataarray.
Has anyone some experiance using this type of flash?
best regards!
Robert
1
Thank you for your answer!
Hardware:
My Flash is conencted as serial to the MC (#WP -> HIGH, IO3 -> HIGH). The datasheet tells me, that in QPI mode, the command “0xF5” is expected to be sent in QPI mode.
Software:
When I then try to disable the QPI mode with the command “0xF5”, the statusregister returned shows the bit deactivated but only till the next command. The statusregister is a a non-volatile register. I´m confused 🙁
1
You seem to be confused over the difference between Quad-Enable and QPI mode. Indeed I was when I made my previous answer, which I have now deleted.
Quad-Enable is non-volatile, it persists across power cycles. It’s only function is to switch the control pins pins (WP# and HOLD#/RESET#) into data pins (IO2 and IO3). Even after you have set Quad-Enable, all serial and dual data commands are still available. You can use command 05h (read status register) to read Quad-Enable, and 06h,01h (write enable, write status register) to write it.
On the other hand, QPI mode is non volatile and is disabled every time you power cycle the device. This means that the commands themselves are sent 4 bits at a time.
Once you have entered QPI mode by sending command 35h serially, you can only get out of it by sending command f5h in parallel, or resetting the device.
Since you only have two data lines connected, you cannot possibly ever send command f5h. In that case you had better make sure you never send 35h to begin with.
Since your write protect pin is tied high, you should be able to write to the device in serial, irrespective of the state of the Quad-Enable. Make sure you set the correct write protection bits and send a write enable command first, as with any SPI flash.