2024-12-02 04:43 PM - edited 2024-12-02 04:49 PM
I am using the STM32H7B3I-DK and followed How to create a file system on a SD card using STM32CubeIDE. I noticed that DMA options are not available on the SDMMC1 configuration tab, so I just skipped that step. The rest of the steps I followed. In FATFS Platform settings I set Detect_SDIO GPIO:Input PI8.
I do not have a microSD card inserted but the f_mount() is still successful:
void SDInit(void)
{
// Mount the file system on the SD card (assumes SDPath is defined)
if (f_mount(&SDFatFS, (TCHAR const*)SDPath, 0) != FR_OK)
{
printf("Failed to mount\r\n");
}
else{
printf("Mount Good\r\n");
}
}
I have checked PI8 state and it is set which is correct for no device inserted, so I am unsure why f_mount() passes
Solved! Go to Solution.
2024-12-03 12:11 AM - edited 2024-12-03 12:19 AM
It just seems successful, because you are using parameter 0, for delayed mount.
Try with parameter 1, for " mount now" and you will see, whether it can mount now - or not.
Btw,
I always use mount with "1" , because it's my first check for SD card okay : card is here, not defective, access seems good.
2024-12-03 12:11 AM - edited 2024-12-03 12:19 AM
It just seems successful, because you are using parameter 0, for delayed mount.
Try with parameter 1, for " mount now" and you will see, whether it can mount now - or not.
Btw,
I always use mount with "1" , because it's my first check for SD card okay : card is here, not defective, access seems good.
2024-12-03 08:42 AM
Thanks for the heads up, that makes sense. Solved my issue