Skip to main content
Explorer
April 3, 2025
Question

STM32H743 problem with sdcard clock

  • April 3, 2025
  • 2 replies
  • 591 views

Hey,

I have a chinese STM32H743 Board, with a 25Mhz Clock Source and sdcard 3.3V VDD.

my clock settings:

clock1.pngclock2.png

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;
	}
}
    This topic has been closed for replies.

    2 replies

    Technical Moderator
    April 5, 2025

    Hi @Sany 

    CMYL_0-1743855707015.png

    • Otherwise can you share the link to the Chinese board ?
    • You can also ask them, they should tested the SD-card with a demo code.

     

    Best regards

     

    Super User
    April 5, 2025

    Hi,

    if you talk about the DEV-E board, H743V , i have it also :

    AScha3_0-1743857128621.png

    25M clock and sd-card:

    AScha3_1-1743857167673.png

    + check: you set it using the correct pins !

    Try with 1bit mode first...and set pin speed medium, withh pullups ON (on all pins);

    Mine is working fine, at full speed (100M + div1) , 4 bit mode.

    SanyAuthor
    Explorer
    April 10, 2025

    Hey,

    Wiring works fine, the Clocksignal for the Card is fine.

    I found the Problem, when i deactivate the DCache function, the SDcard works fine in 4 bit mode and 100M.
    if i activate the DCache function, SDCard don't work.. is there a trick to work with SDcards and DCache? i need DCache for my ext RAM..