cancel
Showing results for 
Search instead for 
Did you mean: 

How to set? fatfs runs at 50MHz?

JLee.21
Associate II

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.

2 REPLIES 2

>>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
Up vote any posts that you find helpful, it shows what's working..
TDK
Guru

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".