Using 2 flash chips over SPIFI

Discussion created by lpcware Employee on Jun 15, 2016
Content originally posted in LPCWare by jurrien on Thu Jan 22 02:46:59 MST 2015

I am using 2 flash chips to store and load data (not to execute from). I use some logic gates and a GPIO to gate the chip select of the flash chips and the SPIFI for reading and writing the data. When I use this to read something from the chips I can select one without any problem and read them. I do, however, have to call the spifi init function after I switch between the chips. This goes fine as long as I am only reading, but if I switch after a write operation the init function returns 0x2000A. My first though was that I had to wait until the write operation has completed before I switch between the flash chips. However, as far as I understand, calling the __ISB() followed with the __DSB() function should enforce this, but does not change the return value of the init call. Can anyone explain what changed after a write operation compared to the read operation and why the chip suddenly isn't recognized anymore? And what should I do to make this work, do I have to reset anything after a write and a switch between the chips?
Thanks in advance,