This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RTOS/AM3352: FATFS open fails on MMC2

Part Number: AM3352

Tool/software: TI-RTOS

Hellow

     I want to use write/read files use MMCSD FATFS by MMC2 .when executed FATFS_open(2U, NULL, &fatfsHandle);

it returns -1.

I have modified the mmc2 config to EMMC,and it worked.

as I know in function FATFS_open,the argument index is 0 or 1 from the RTOS examples.

but my HW is mmc2 .and I need to use EMMC driver.

what can I do for my pupose.

thansk!

  • my RTOS version is 5.2
  • when I debug to FATFS_drv.c,the error occurs on f_mount.it seems mount failed.

    I print the error code fo f_mount,it returns 3:FR_NOT_READY, /* (3) The physical drive cannot work */

    I think there are some errors on driver MMCSD,I don't know where FATFS init the mmcsd,and open mmcsd handle.

  • Hi,

    We don't have MMC2 on our board for testing. You can step through:

    FATFS_open=====> FATFS_diskInitialize=====> ((FATFS_Config *) handle)->drvFxnTablePtr->initDrvFxn(); this MMCSD_init().

    Then ((FATFS_Config *) handle)->drvFxnTablePtr->openDrvFxn(object->drvInst, object->FATFSConfigParams.drvParams, &drvHandle)) This is MMCSD_open()=====>MMCSD_v1_open()

    Then you can determine where the function failed.

    Regards, Eric
  • Hi Eric

            I mean where can I init the soc config of MMCSD,and I want to use EMMC,

    I don't find any config about this in example MMCSD_FatfsConsole_bbbAM335x_armExampleProject.

    in example MMCSD_bbbAM335x_armTestproject,I can config the pinmux or clock in board_init and MMCSD_socSetInitCfg.

  • Hi,

    We have EMMC on AM335x CCS project already, just a different MMC instance number. See the pdk_am335x_1_0_14\packages\ti\drv\mmcsd\test\am335x\armv7\bios\mmcsd_emmc_bbbam335x.txt this is used for you to create CCS project. You can refer to the setup of EMMC.

    Regards, Eric