cancel
Showing results for 
Search instead for 
Did you mean: 

FatFs/SDMMC with 4 wires times out, 1 wire works

Lars Beiderbecke
Senior III

I'm still trying to get FatFs to work with 4 wires. My PCB has been properly traced, each line is within a few mm of all others, and has a 33K pull-up. Internal pull-ups are off.

This setup works fine at full-speed (45 MHz) when using only 1 wire, but when I select all 4 wires in CubeMX, the code hangs in stm32f7xx_hal_sd.c, in the /* Poll on SDMMC flags */ loop. It probably should time out, but doesn't. This doesn't change if I lower the speed to 3 MHz.

My concern is not the timeout, though, but why 4 wires are still not working. Could someone advise on my PCB if everything is alright there? Are the pull-ups placed OK? The SD1 trace accidentally hit the resistor pad, but is this already enough to mess everything up?

0690X000006D1yYQAS.png(Note that seemingly unconnected resistors are connected by copper pours.)

11 REPLIES 11

Thank you, got the mail.

I was leaning toward double checking the pin ordering on the socket.

Just glad it wasn't something like cross-talk.

Having something independent covers potential issues with clocks or pin configurations.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Steve Melnikoff
Associate III