I am using the STM32F407VG and try to read an SD Card over SDIO in 4 bit mode.
I have downloaded the fatfs driver from this site: http://stm32f4-discovery.net/2015/08/hal-library-20-fatfs-for-stm32fxxx/
The initialization works absolutely fine until the second invocation of check_fs in line 3008 of ff.c
"fmt = bsect ? check_fs(fs, bsect) : 3; /* Check the partition */"
(Note: The first invocation of check_fs in line 2998 "fmt = check_fs(fs, bsect);" returns the correct value (2))
Where it sticks after the check_fs invocation is in the interrupt of the DMA RX interrupt callback:
static void SD_DMA_RxCplt(DMA_HandleTypeDef *hdma)
SD_HandleTypeDef *hsd = (SD_HandleTypeDef*)((DMA_HandleTypeDef*)hdma)->Parent;
/* DMA transfer is complete */
hsd->DmaTransferCplt = 1U;
/* Wait until SD transfer is complete */
while(hsd->SdTransferCplt == 0U)
/* Disable the DMA channel */
/* Transfer complete user callback */
line 9 ("while(hsd->SdTransferCplt == 0U)).
Any ideas what is going wrong?