cancel
Showing results for 
Search instead for 
Did you mean: 

SDIO clock doesn't seem to enable

dmg0048
Associate II
Posted on November 22, 2013 at 17:19

Hello community,

I am trying to communicate a STM32F207 uC with a uSD card via the SDIO interface, what I am trying to do is to get the CID of the inserted uSD using CMD commands, and verify that both parts are communicating with each other.

In order to initialize the interface I use the procedure described in stm32f2xx_sdio.c of the latest Standard Peripheral Library, I configure the SDIO interface with less than 400KHz (for initialization, as mentioned in the manual reference) and 1-bit wide, I plan to use 4-bit in the future though. I have also correctly set up the clocks (SDIO 48MHz enabled) using the configuration tool provided by ST.

I follow the procedure described in the reference manual to identify the card and get the CID, however, when I send commands using the SendCommand function I get no response on the RESPx registers, no matter the command I send, nor the GetCommandResponse function returns the index of the command I sent. I suspect that the clock is not initializing properly as the 'clken' bit of the SDIO clock register never sets.

I would appreciate any help or directions, thanks in advance.

#sdio-sd-usd-cid-cmd-initializati
2 REPLIES 2
Posted on November 22, 2013 at 18:04

Parts of you question seem to suggest things are clocking, but just an FYI

The PLL has to be running for SDIO to work (uses Q tap at up to 75 MHz), so both APB2 and SDIOCLK must be ticking into the peripheral.

Check also that PLL and HSE are starting. SystemInit() fail-over not so good.

Don't use BYPASS mode for the SDIO, see errata. At clocks >48MHz USB won't work

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
dmg0048
Associate II
Posted on November 24, 2013 at 13:24

The problem was that the file generated by the system configuration tool didn't set (1) the PLLON bit as I originally thought, once I took notice of this I easily fixed it and everything worked fine.