2025-04-02 11:51 PM - edited 2025-04-03 1:23 AM
Hey,
I have a chinese STM32H743 Board, with a 25Mhz Clock Source and sdcard 3.3V VDD.
my clock settings:
my SDMMC1 config:
static void MX_SDMMC1_SD_Init(void)
{
/* USER CODE BEGIN SDMMC1_Init 0 */
/* USER CODE END SDMMC1_Init 0 */
/* USER CODE BEGIN SDMMC1_Init 1 */
/* USER CODE END SDMMC1_Init 1 */
hsd1.Instance = SDMMC1;
hsd1.Init.ClockEdge = SDMMC_CLOCK_EDGE_RISING;
hsd1.Init.ClockPowerSave = SDMMC_CLOCK_POWER_SAVE_DISABLE;
hsd1.Init.BusWide = SDMMC_BUS_WIDE_4B;
hsd1.Init.HardwareFlowControl = SDMMC_HARDWARE_FLOW_CONTROL_DISABLE;
hsd1.Init.ClockDiv = 5;
/* USER CODE BEGIN SDMMC1_Init 2 */
/* USER CODE END SDMMC1_Init 2 */
}
My Code strikes at:
Mount_SD('/');
bool Mount_SD (const TCHAR* path)
{
fresult = f_mount(&fs, path, 1);
if (fresult != FR_OK)
{
Send_Uart ("[ERROR] Konnte SD-Karte nicht mounten...\r\n");
return false;
}
else
{
Send_Uart("[INFO] SD-Karte erfolgreich gemountet...\r\n");
return true;
}
}