cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H743 problem with sdcard clock

Sany
Associate III

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;
	}
}
0 REPLIES 0