Hi,
the a read command must be issued to the slave and so the direction is from M to S. And the data read back is from S to M.
I guess I need to clarify a bit.
SPI interface was defined is always a synchronous full duplex interface. It basicall has some signals:
* SCK: 2 state. Clock generated by the master, for synchrounous data transfer (clock out ot clock in data).
* /SS: 2 state slave select from master to salve. Individually for each slave.
* MOSI: 2 state, data from master to slave.
* MISO: 3 state, data from slave to master. HIGH-Z on each slave if the according /SS signal is inactive. Usually the MISO is immediately LOW_Z when /SS is active.
In so far it usually does not matter whether you write or read from an SPI device.
Usually....
But some SPI memory devices may work differently compared to many other SPI devices. They may keep the MISO line in HIGH-Z even if /SS is active.
To be sure: you need to read the FLASH device datasheet.
In either case: Reading from a flash is the convenient one.
* it surely uses MISO line in all three states
* It does not alter the FLASH contents.
* you may read the same address to get identical (known) data pattern.
* you may load the FLASH with pseudo-random pattern and do a sequential read to get a better quality eye diagram.
Klaus