2024-09-07 08:33 AM
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.
2024-09-07 09:04 AM
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:
2024-09-07 10:27 AM
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.