Problem with SD Card with STM32H743ZIT6
Hello, i am trying to make a file with a text on a SD card without success.
I followed this tutorial:
But i have a stm32h743zit6 and it is a bit different.First, I can't configure DMA on SDMMC in stm32cubemx.
I've configured the pins of the stm to the pins slot i have in my board (Is a custom board made by me using this microcontroller and the sd card slot.)
I activated in cubemx: DMA (I think it is not necessary), SDMMC, FATFS, GPIO and freertos (for threads in the future).
Then, i wrote a simple code shown in the tutorial:
/* USER CODE BEGIN 1 */
FRESULT res; //Fatfs function common result code
uint32_t byteswritten, bytesread; // File writes/read counts
uint8_t wtext[]= "PRUEBA ESCRITURA"; //Buffer de escritura de archivo
uint8_t rtext[_MAX_SS]; //Lectura de buffer de fichero
/* USER CODE END 1 *//* USER CODE BEGIN 2 */
if(f_mount(&SDFatFS, (TCHAR const*)SDPath, 0) != FR_OK)
{
printf("Error mount\r\n");
}
else
{
printf("mount correct \r\n");
if(f_mkfs((TCHAR const*)SDPath, FM_ANY, 0, rtext, sizeof(rtext)) != FR_OK)
{
printf("Error make file\r\n");
}
else
{
printf("File created \r\n");
//Open file for writing (Create)
if(f_open(&SDFile, "Prueba_para_ficheros.TXT", FA_CREATE_ALWAYS | FA_WRITE) != FR_OK)
{
printf("Error writing\r\n");
}
else
{
printf("File opened \r\n");
//Write to the text file
res = f_write(&SDFile, wtext, strlen((char *)wtext), (void *)&byteswritten);
printf("Writing in file\r\n");
if((byteswritten == 0) || (res != FR_OK))
{
}
else
{
printf("File closed\r\n");
f_close(&SDFile);
}
}
}
}
f_mount(&SDFatFS, (TCHAR const*)NULL, 0);
/* USER CODE END 2 */
I have an error doing f_mkfs, and the program does not do the opening or writing thing.

Can anyone tell me what it could be happening here? Any ideas?
Thank you so much!
