2021-06-28 06:22 PM
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.
2021-06-28 06:59 PM
>>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.
2021-06-28 08:43 PM
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.