A lot of the tutorials on using SPI to talk to SD cards seem to show code that sends a 8 or so "reads" to the device before writing data.
Almost always anyway. I have gotten the beginnings of an explanation here and there, but nothing really descriptive.
The best I can gather is that you need to do some fake reads just to get the device a look at the clock so it can be ready when the writes come in.
First, is that about right?
Second, should I precede EVERY write operation with some of these pretend reads?
Third, 8 reads seems common. Is that a good rule of thumb?
Finally, if I'm completely wrong about the whole thing, care to set me straight?
Just get the official standard document and look it up for yourself:
https://www.sdcard.org/downloads/pls/You will need the first document "Physical Layer Simplified Specification", and SPI mode is described in section 7.
fchk
Already have, and have been reading said doc. Maybe it's in there, but I can't find it. I thought maybe it was an SPI thing rather than just an SD card specific thing, but who knows.