ColdFire MDF52259C QSPI SDCard Reader

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

ColdFire MDF52259C QSPI SDCard Reader

ソリューションへジャンプ
3,228件の閲覧回数
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,535件の閲覧回数
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,535件の閲覧回数
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,535件の閲覧回数
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,536件の閲覧回数
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 件の賞賛
返信