TargeteMMC™ Embedded MMC Device Manager

Overview

TargeteMMC is a manager for eMMC devices. It queries the device’s capabilities and size at initialization, adds its volume to a file system, and acts as the file system driver, relying on a host controller driver to access the media.

Features

  • Conforms to latest JEDEC standard (JESD84-B51A).

  • Manages Embedded Multi-Media Cards for Blunk’s TargetXFS Unix-like embedded file system. Hosts separate TargetXFS volumes in the User partition, boot partitions, and any configured general partition.

  • Supports standard (<= 2GB) and high (>2GB) capacity devices, using byte or sector addressing as needed. Maximum volume size for high-capacity devices is 2TB.

  • Supports small 512B sector devices and large 4KB sector devices.

  • An application layer announcement is made when the eMMC device is initialized and its volumes are available to the application.

  • Simple documented driver interface works with microcontroller eMMC Host Controllers and Host Controllers compatible with the latest JEDEC Standard. Includes sample drivers.

  • Timeouts and retries automatically performed in response to CRC and other errors. Intelligent command retries in protocol layer, versus driver level retries, for more efficient error recovery.

  • For best device performance, unused sectors (from file deletion, truncation, or overwrite) are automatically freed using either DISCARD, if available (> MMC spec 4.41), or TRIM.

  • Minimal power consumption, including removing the NAND flash Vcc supply, is achieved using emmcSleep(). This is safe even with mounted volumes and open files. The device is woken either by emmcWake() or any regular file system call that results in eMMC I/O.

  • Zero power consumption is achieved via emmcPowerRemove(). Volumes must be unmounted first. Power is restored using emmcPowerRestore().

  • For background garbage collection, eMMC housekeeping can be invoked during times of inactivity by calling Vclean() from a low priority task. Maximizes responsiveness during high-priority use.

  • emmcConfig() shows eMMC device’s OEM ID, product name, MMC version, serial number, bus frequency, bit width, page size, cache size, attributes and size of each partition.

  • emmcDiag() shows maximum number of command retries and count of each response error or bus error that occurred.

  • The sector size and the reset signal use (active or inactive) are easily configured via #defines in the “em_config.h” header file.

  • The best way to determine TargeteMMC’s memory footprint (and performance) is to measure it on your target board using your development environment. Blunk supports source code evaluations for that purpose. For estimation, a measurement of TargetXFS and TargeteMMC memory footprint for the ARM Cortex-A9 using a 16GB eMMC device is shown below. Full details in manual.

    Footprint Code RAM
    TargetXFS 64KB 143KB
    TargeteMMC 16KB 4KB
    Total 80KB 147KB
  • For efficient DMA use, all buffers passed to the driver are aligned on CPU cache line boundaries.

  • Developed using TargetOS™-Lite, Blunk’s free RTOS. Easily ported to other RTOSes or used in polled mode, without a kernel.

  • Source code is 100% Standard C and has been tested using PC-lint and multiple Standard C compilers, including GCC.

  • Royalty-free license. Includes complete source code, sample applications, sample drivers, user’s manual, and one year of technical support. Electronic delivery via customer-specific web portal.