about SD...

ZXNet echo conference «hardware.zx»

From Igor Afonkin To All 5 June 2006

Hello, DVS DVS> According to the 1st: SPI mode is successfully enabled on the Panasonic 8Mb SD card, but DVS> the card is not output from Idle mode. I tried the commands CMD1, CMD5, DVS> ACMD41. I will dig further. DVS> initialization algorithm (tested on several cards): CS=1, put 10 bytes #0FFh into the card, (hereinafter as for each team) CS=1 send out sync byte #0FFh CS=0 send out sync byte #0FFh issue #040h (CMD0, "go idle") issue four #000h (parameters) issue #095h (CRC7 for CMD0, you can leave it unchanged for other commands) (further again only for initialization) issue #0FFh, while the response is read at the same time, if the response is #0FFh, then read the response again if the received response is not equal to #001h, then there is an error (we are entering a stupor or at the beginning ;)) (now we output the map from IDLE) CS=1 send out sync byte #0FFh CS=0 send out sync byte #0FFh issue #041h (CMD1, "card init") issue four #000h (parameters) issue #095h (CRC7 for CMD0, for other CMDs this is incorrect, but is ignored card...) (waiting for the card to be ready) issue #0FFh, while the response is read at the same time, if the response is #0FFh, then read the response again if the received response is not equal to #000h, then we continue to read the response "until victorious." if response =0 at this point, the card can be considered initialized, and then work with her without problems.PS; I hope; will be useful for someone :)