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/AM5746: about FATFS/MMCSD driver software in PROCESSOR-SDK-RTOS-AM57X

Guru 10235 points
Part Number: AM5746

Tool/software: TI-RTOS

Hello, TI Experts,

 

Our customer sent us questions about FATFS/MMCSD driver software in PROCESSOR-SDK-RTOS-AM57X.

 

Question:

- Could you tell us When/How to use "FATFS_defaultParams" in FATFS_drv.c?

- Could you tell us When/How to use "MMCSD_Params_init" in MMCSD_drv.c?

 

We would appreciate if you tell us the purpose and use-case of those functions.

 

Best regards,

  • Hi,

    For the FATFS_defaultParams, this is a structure (NOT A FUNCTION) inside FATFS_drv.c, and it is initialized to NULL:

    const FATFS_ConfigParams FATFS_defaultParams = {
    NULL,
    NULL,
    NULL, /* Custom argument used by driver implementation */
    NULL
    };

    This is part of FATFS_Object;
    /*!
    * @brief SDAm572x Object
    *
    * The application must not access any member variables of this structure!
    */
    typedef struct FATFS_Object_s {
    FATFS_DrvHandle drvHandle; /*!< Driver Handle. */
    uint32_t drvInst; /*!< SD driver instance if SD driver is not
    opened. */
    uint32_t driveNumber; /*!< Drive number used by FatFs */
    DSTATUS diskState; /*!< Disk status */
    FATFS filesystem; /*!< FATFS data object */

    FATFS_ConfigParams FATFSConfigParams; /*! Stores SD parameters */

    uint32_t isOpen; /*! flag to indicate module is open */
    } FATFS_Object;

    You are not supposed to access this! In your application level, you just declare:

    /* FATFS objects */
    FATFS_Object FATFS_objects[_VOLUMES];

    Regards, Eric
  • Hi,

    For MMCSD_Params_init, this is a function inside MMCSD_drv.c. It is called by MMCSD_v0/1/2_open() function, this is part of the driver code. You are not suppose to call it directly.

    From API level, you only call MMCSD_open().

    Regards, Eric
  • Hi,

    Thank you very much for your detail explanation.
    I really appreciate your help.
    I will send the answer to the customer.

    Best regards,