4.20. MMCSD¶
4.20.1. Introduction¶
MMCSD module provides an interface between CPU and any MMCSD-bus-compatible device that connects via MMCSD serial bus. External components attached to MMCSD bus can serially transmit/receive data to/from the CPU device through two-wire interface
Key Features
- Read
- Write
- Write followed by read
- Blocking(interrupt or Non interrupt)
- Callback mode(interrupt)
4.20.2. User Interface¶
4.20.2.1. Driver Configuration¶
Board Specific Configuration
All board specific configurations eg:enabling clock and pin-mux for UART pins are required before calling any driver APIs.By default Board_Init() API supports all initialization sequence for TI supported EVMs. In addition it initializes UART instance for Console/STDIO. Once board specific configuration is complete MMCSD_init() API can be called to initialize driver.
MMCSD Configuration Structure
The MMCSD_soc.c file binds driver with hardware attributes on the board through MMCSD_config structure. This structure must be initialized before the MMCSD_init() function is called and cannot be changed afterwards. For details about the individual fields of this structure, see the API Guide.
4.20.3. Application¶
4.20.3.1. Examples & Unit tests¶
Name | Description | Expected Results | Supported SOCs | Build Type |
---|---|---|---|---|
MMCSD_TestApp | Unit Test application demonstrating write and read a fixed number of bytes into MMCSD card. Verifies written data pattern to conclude PASS/FAIL. | Prints on console All tests have passed | AM65x J721e J7200 AM64x | Makefile |
MMCSD_DMA_TestApp | Functionally same as MMCSD_TestApp but with DMA enabled | Prints on console All tests have passed | AM65x J721e J7200 AM64x | Makefile |
MMCSD_EMMC_TestApp | Unit Test application demonstrating write and read a fixed number of bytes into the onboard EMMC.Verifies written data pattern to conclude PASS/FAIL. | Prints on console All tests have passed | AM65x J721e J7200 AM64x | Makefile |
MMCSD_EMMC_DMA_TestApp | Functionally Same as EMMC_TestApp but using DMA mode | Prints on console All tests have passed | J7200 AM65x J721e AM64x | Makefile |
MMCSD_Baremetal_TestApp | Baremetal version of MMCSD_TestApp | Prints on console All tests have passed | J7200 AM65x J721e AM64x | Makefile |
MMCSD_Baremetal_DMA_TestApp | Baremetal version of MMCSD_EMMC_TestApp | Prints on console All tests have passed | J7200 AM65x J721e AM64x | Makefile |
MMCSD_Baremetal_EMMC_TestApp | Baremetal version of MMCSD_EMMC_TestApp | Prints on console All tests have passed | J7200 AM65x J721e AM64x | Makefile |
MMCSD_Baremetal_EMMC_DMA_TestApp | Functionally same as MMCSD_Baremetal_EMMC_TestApp but with DMA enabled | Prints on console All tests have passed | J7200 AM65x J721e AM64x | Makefile |
MMCSD_Regression_TestApp | Menu driven regression test which tests various configurations of SD card | Prints on console All tests have passed | J7200 AM65x J721e AM64x | Makefile |
MMCSD_EMMC_Regression_TestApp | Menu driven regression test which tests various configurations of EMMC | Prints on console All tests have passed | J7200 AM65x J721e AM64x | Makefile |
4.20.4. Building MMCSD Test applications via makefiles¶
- MMCSD Test applications and dependent libraries are built from the top level mmcsd makefile
- Refer to the Processor SDK RTOS Getting Started Guide for details
of how to setup the build environment. Once you have setup the build environment, issue the following commands:
- cd <pdk>/packages/
- To build: make mmcsd
- To clean: make mmcsd_clean
- Similarly, to build at the module level, issue the following commands for rebuilding :
- cd <pdk>/packages/ti/drv/mmcsd
- To build: make all
- To clean: make clean