MCU:STM32F2XX,使用SDIO,生成FATFS代码后,调度不成功
retSD = FATFS_LinkDriver(&SD_Driver, SD_Path);
if(retSD==0)
{
if((RE_mount=f_mount(&Fat,(TCHAR const*)SD_Path,0)) == FR_OK)
{
HAL_GPIO_WritePin(GPIOE,GPIO_PIN_3,GPIO_PIN_RESET);
if((RE=f_open(&MyFile,"yy1.txt", FA_CREATE_ALWAYS | FA_WRITE))==FR_OK)
{
HAL_GPIO_WritePin(GPIOE,GPIO_PIN_2,GPIO_PIN_RESET);
if(f_write(&MyFile, wtext, sizeof(wtext), (void *)&wbytes) == FR_OK)
{
f_close(&MyFile);
}
}
}
}
f_open这一步就出错了,返回结果是FR_NOT_READY, /* (3) The physical drive cannot work */ |