STM32Cube_FW_F1_V1.8.5
STM32CubeIDE:1.13.2
MCU:STM32F103RCT6
问题描述::::::::SDIO读取TF卡,1bit模式正常,4bit模式无法读取,断点找到的错误如下:::SDMMC_ERROR_REQUEST_NOT_APPLICABLE
f_mkfs((TCHAR const*)SDPath, 0, 0)
或是 f_open(&SDFile, "STM32.TXT", FA_CREATE_ALWAYS | FA_WRITE|FA_READ)
[ff.c 4170] ---->stat = disk_initialize(pdrv);
[diskio.c 99] ---->stat = disk.drv[pdrv]->disk_initialize(disk.lun[pdrv]);
[sd_diskio.c 94] ---->if (BSP_SD_Init()==MSD_OK)
[bsp_driver_sd.c 62] ----> HAL_SD_ConfigWideBusOperation (&hsd,SDIO_BUS_WIDE_4B)
[stm32faXX_hal_sd.c 2204]---->errorstate = SD_WideBus_Enable(hsd);
[stm32faXX_hal_sd.c 2979]---->return HAL_SD_ERROR_REQUEST_NOT_APPLICABLE;
errorstate = HAL_SD_ERROR_REQUEST_NOT_APPLICABLE
断点信息因为scr[1U]=0x00;
所以[stm32faXX_hal_sd.c 2959]----> if((scr[1U] & SDMMC_WIDE_BUS_SUPPORT) != SDMMC_ALLZERO)这句判断过不去。 |