>> Having it set to true doesn't call stop_write() at all.
sd_stop_write() does get called, in the sample.
a stop write is just to send 0xFD, then wait till the card is ready with sd_set_idle(), and repeats. The card should have gotten the commands the first time. SD_STOP_TRANSMISSION, SD_GO_IDLE_STATE that are in set_idle.
Maybe these old cards require the clock pulses or can't listen while busy, but that is not in the datasheets. These are the only reason I can think of, and would explain why 2 calls of stop_write fixes it. weird.
I actually think I read somewhere in the datasheets that a disable of the select line would stop any reads/writes, and after some time the card would be ready again. This is of course not working here.
I suggest we try going with FALSE as default, and maybe eventually get rid of TRUE.
High capacity needs a much different init procedure, and it's smallest addressing is a block of 512 bytes. on standard capcity you can address bytes.
In sd_start_read() you can see this line:
address = address * SD_BYTE_PER_SECTOR
This line would be commented out on high capacity.
I think I got the init procedure working once and received a reply from a high capacity card (one out of my 2 cards), but I never was able to read/write anything. I can look around to see if I still have that code if you want.
Matt.