Hi,
What exactly is the problem you are seeing?
If I understand correctly, the status from the read status register command *should* be in rcv[1].
rcv[0] should be ignored -- that is the data that was being shifted in while you were shifting out the read status register command -- it will be undefined.
If it helps, what I do after starting a transfer is:
// start the transfer
MCF_QSPI_QDLYR = MCF_QSPI_QDLYR_SPE;
// wait for transfer complete
assert(! (MCF_QSPI_QIR & MCF_QSPI_QIR_SPIF));
while (! (MCF_QSPI_QIR & MCF_QSPI_QIR_SPIF)) {
}
MCF_QSPI_QIR = MCF_QSPI_QIR_SPIF;
assert((MCF_QSPI_QWR & 0xf0) >> 4 == request-1);
assert(! (MCF_QSPI_QDLYR & MCF_QSPI_QDLYR_SPE));
I use QSPI to talk to EzPort of another MCU, which is similar to, but not identical to, a generic SPI flash memory.
You can see all my code, including the qspi driver in qspi.[ch] and the flash access driver above it in clone.[ch] here:
Another guy is having some issues with QSPI/EzPort interaction here:
-- Rich