ColdFire MDF52259C QSPI SDCard Reader

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

ColdFire MDF52259C QSPI SDCard Reader

跳至解决方案
3,160 次查看
CristianPena
Contributor I

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

标签 (1)
0 项奖励
回复
1 解答
1,467 次查看
CristianPena
Contributor I

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.

 

 

在原帖中查看解决方案

0 项奖励
回复
3 回复数
1,467 次查看
p_vagnoni
Contributor III

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.

0 项奖励
回复
1,467 次查看
lel_chen
Contributor I

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,

 

0 项奖励
回复
1,468 次查看
CristianPena
Contributor I

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.

 

 

0 项奖励
回复