cancel
Showing results for 
Search instead for 
Did you mean: 

SDMMC impssible to get working

MBanatovski
Associate

Hello,

I'm using a custom board and have gone through 3 iterations one with stm made EMI filter for SD, one with F2 chip with SDIO and now I'm using stm32l496zg with 4.7k pullups on D0-D3 and CMD lines. When running the completely unchanged code generated by cubemx I keep getting sdmmc_error_cmd_rsp_timeout on initialization. With oscilloscope I have observed 2 of same/similar messages and for some reason there is no clock on the CLK line. I have triple-checked my schematics and tried the following

1. 1B and 4B modes
2. Different clock sources (HSI48, PLL)
3. Different clock divider factors from 0-254
4. More things I can't recall

All this happens with sd card either in or out.

Ask for additional info if needed and any help appreciated been stuck on this problem for over 50 hours now.

2 REPLIES 2
SofLit
ST Employee

Hello,

Hard to tell what is the issue. Need to check first your SDcard in a PC or whatever and inspire from the example provided in github for 32L496GDISCOVERY board:

https://github.com/STMicroelectronics/STM32CubeL4/tree/master/Projects/32L496GDISCOVERY/Applications/FatFs/FatFs_uSD_Standalone

 

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
AScha.3
Chief II

Hi,

>for some reason there is no clock on the CLK line. 

really ? Then look for a short or no connect to cpu pin - or wrong pin (check which pin used/set in Cube for sdmmc!).

no clock = no fun.

+

4k7 is low value for pullups - better 20k...47k .

+

set port/pin speed medium or medium/high.

If you feel a post has answered your question, please click "Accept as Solution".