Skip to main content
torturecell
Associate II
May 19, 2012
Question

sdio initialization

  • May 19, 2012
  • 3 replies
  • 1110 views
Posted on May 19, 2012 at 18:45

Hello,

I am trying to use the SD card which is connected via SDIO interface. I am using STM3221G-EVAL evaluation board.

Problem is response of ACMD41 comes with a crc error. I have seen in errata that crc will be detected by SDIO host but even the response command and response1 registers holds weird values. Also if i ignore it and give command 2, i get the same response 

RESPCMD = 0x3f,   RESP1 = 0xff8000, 

order of initialization

pll

nvic,

lcd,

i2c

ethernet,

sdio

i get correct response of command 0 and command 55

Please help, I am stuck on it for quite some time now.

thanks
    This topic has been closed for replies.

    3 replies

    Andrew Neil
    Super User
    May 19, 2012
    Posted on May 19, 2012 at 22:57

    /352bebf8

    A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
    torturecell
    Associate II
    May 20, 2012
    Posted on May 20, 2012 at 17:57

    hello neil,

    thats what exactly i am facing

    unfortunately there is no response to that query either

    so any suggestions??

    torturecell
    Associate II
    May 21, 2012
    Posted on May 21, 2012 at 10:46

    Hello,

    found the issue, had defined one define wrong

    i defined

    #define SDIO_CMD_WAITRESP_SHORTRSP          ((u16)0x60)

    instead of

    #define SDIO_CMD_WAITRESP_SHORTRSP          ((u16)0x40)

    It made any command which had its msb 1, return ok and failing others

    a stupid mistake

    thanks