I am trying to read an microSD card through an unbranded SD slot and a Basys3 FPGA. The microSD card, Kingston microSD HC 8GB Class 4, is used via an SD card adapter, also Kingston.
I am having trouble with getting past
CMD8 of the initialization process. After I sent
CMD0 it responded with
0x01 which is normal. After
CMD0 I sent the
CMD8 command; it responded with
0x000000021F. I wasn't able to find anything related to this code in any documentation.
To test, I tried using a SanDisk Ultra SDHC 32GB Class 10 with the same code. It successfully initialized.
Other things I have tried:
Always / Not Always Sending
The first one shows all of the initialization process.
SD_CD is Card Detect (Active Low) and
SD_WP is Write Protect (Active Low).
SD_CLK is running at 390 kHz, 256 times slower than
_cpuClock. Please note that the
_cpuClock are all simulated manually (i.e. doesn't receive any signal from the SD module). After card is detected, 1 millisecond is waited, followed by 74
The second image is a zoom in of
CMD0 and its response.
The third image is a zoom in of
CMD8 and its response.
The final image is a zoom in of
CMD55 and its response.
Update 1 (Prior to @Annoymous Answer) I managed to get my hands on a couple more cards. After testing it seems that only SanDisk Class 10 SDHC (both SD and microSD) returns an initialization finished state. The Kingston Class 4 SDHC SD returns a timeout after
CMD0 while the Kingston Class 4 SDHC microSD returns a
0x000000021F. Changing the adapter made no difference in all cases. In the image below, the successful ones are in green and the unsuccessful ones are in red.
Update 2 (Response to @Annoymous Answer) After changing
negedge, the Kingston Class 4 SD card seems to initialized (which was previously timeouted). However, the Kingston Class 4 microSD card still respondsed with