I'm having some serious problems to communicate with a SDCard through the QSPI.
I using the QSPI just like any SPI module, using the first Read/Write RAM possitions.
I start the initialization
Enable CS
send 10 bytes of 0xFF
disable CS
wait delay
Enable CS
Send CMD0
Receive IDLE_STATE
Disable CS
Enable CS
Send CMD55
Receive 0x05: ILLEGAL_COMMAND & IDLE_STATE
Send ACMD41
Receive 0x05: ILLEGAL_COMMAND & IDLE_STATE
I can't finish the initialization. Just get 0x05 for every command until the SD Card goes into tristate and just get 0xFF because of the pull ups.
Obviously, there's something I'm doing wrong. In some forums I read that you have to keep on sending CLK signal between commands, but the CLK is activated by the QSPI module automatically.
What could be my problem??
Thanks in advance
Cristian Pena
Solved! Go to Solution.
I found the problem that was causing that issue. After you send a message you need to wait 8 clocks before you have a valid answer. Otherway the output of the SD card enters in Tri-State mode and you won't get any answer after that.
Check carefully the timming page of your SD card datasheet and you'll solve your issue.
Hello,
I am working with an MCF 52235 and with the QSPI I work properly also with a SD card reader.
The only little thing I havr to do when the Software has to "work" with the SD is to manage the CSx nopt with the QSPI but in "manual" configuration (to avoid the deactivation of Chip select of SD card).
If you need some help you can find some interesting library at this link:
http://elm-chan.org/fsw_e.html
BR,
Paolo.
Hi,
I am also facing the same issue. For CMD0, it responds with 0x01. For all other commands [Set Block Length, Read, Write], its returning 0x05. After a while,it returns 0x00.
What could be the problem?
Thanks,
I found the problem that was causing that issue. After you send a message you need to wait 8 clocks before you have a valid answer. Otherway the output of the SD card enters in Tri-State mode and you won't get any answer after that.
Check carefully the timming page of your SD card datasheet and you'll solve your issue.