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;
	}
}
3 REPLIES 3
CMYL
ST Employee

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

 

AScha.3
Chief III

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.

If you feel a post has answered your question, please click "Accept as Solution".

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