Skip to main content
JLee.21
Associate II
June 29, 2021
Question

How to set? fatfs runs at 50MHz?

I set sdmmc and fatfs at 50MHz.

But under code error.

res = f_mkfs(USERPath, FM_ANY, 0, workBuffer, sizeof(workBuffer));

 if (res != FR_OK)

 {

Error_Handler();

 }

sdmmc clock set 20MHz it is ok.

Why sdmmc dosen't run at 50MHz?

cubemx version : 6.2.0

cubeide version : 1.5.1

Thank you.

This topic has been closed for replies.

2 replies

Tesla DeLorean
Guru
June 29, 2021

>>Why sdmmc doesn't run at 50MHz?

Cause your electrical implementation is broken. As frequency increases all that transmission line theory starts to be relevant.

You need to be concerned about signal edges and rise time, and for short wire lengths ringing/reflections.

There's no particular reason the STM32 can't clock an eMMC at 52 MHz or higher.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
TDK
June 29, 2021

It could also be that the software implementation is broken. You would need to dig into the details to find where the error actually occurs and what it is. An overflow/underflow error would be due to software. The HAL SD libraries are not particularly good for high speed. A CRC error would be due to hardware.

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