Embedded USB Stack

Overview

The emsys emcpp_usb is a portable software stack for embedded USB applications which addresses USB Device, USB Host as well as USB On-The-Go (OTG) solutions.

Its modular architecture, combined with an optimized memory footprint, makes emcpp_usb a preferred choice for mobile applications. The library is completely implemented in ANSI C/C++ and can be easily ported to any combination of microprocessor, USB hardware and operating system. emcpp_usb is fully compliant to the USB 3.0 standard and backward-compatible to USB 2.0 and older specifications as well as the On-The-Go supplement.

Product Features

The emcpp_usb library provides all features necessary to establish basic USB Transfers, which includes the following key attributes:

  • Device, Host, Dual Role and OTG support
  • Interchip USB support
  • Multiple instances and multiple types of USB cores in same compilation unit are supported
  • Supports multiple instances of stacks and interfaces
  • Profile support allow change of behavior at run time
  • Hardware, OS and processor independent
  • Optimized for high throughput at low CPU load
  • Optimized footprint sizes by role specific customization
  • Abstraction layer for USB hardware, specific port access (memory-mapped, PCI, etc.) and general operating systemservices (threads, mutex, …) for high portability
  • SMP safe
  • Support of all transfer modes (control, interrupt, bulk, isochronous) and speed grades (Low-Speed, Full-Speed, High-Speed and Super-Speed)
  • Extendable to vendor specific protocols
  • Association Descriptors and Microsoft OS Descriptor supported

Technical Specifications

The emcpp_usb has been ported to the following DSPs and MCs (abridgement of the complete list):

  • 16-bit and 32-bit Controllers (e.g., Infineon, Motorola MPC, MGT, ARM, IA, TI-OMAP)
  • DSPs (e.g., Analog Devices, Texas Instruments)

The emcpp_usb supports the following USB interface components:

  • Bridges (with parallel or serial interface)
  • Controllers (with integrated USB interface)
  • IP cores (Synopsys, MentorGraphics, FHG_USBx, …)

OS abstraction (see emcpp_base) is available for:

  • General Purpose OS (Linux, Mac OS, Windows)
  • RTOS (e.g., ucLinux, Nucleus, OSE, ThreadX, embOS)
  • Libraries (PThreads)
  • OS-less

Powerful build environment available with setups for all established tool chains such as Keil, Tasking, RealView, Metrowerks, IAR, GCC, ICC, MSVC, etc.

Prototyping development under Linux (if target hardware is available) or based on transport layer emulation by sockets (if hardware is unavailable).

Architecture

The library has a layered architecture. All layers and data types are modeled as objects (structs and access macros in C; classes in C++).

Deliverables

Complete ANSI C/C++ implementation can be supplied as object code and optional source code together with build environment and interactive documentation.

USB Device ClassHostDevice
MSC – Mass Storage Class (SCSI, RBC)
CDC – Communications Device Class (ACM, ECM, EEM, NCM, MBIM)
WMC – Wireless Mobile Communications Devices (OBEX, MDLM)
HID – Human Interface Device Class (Boot, Full Featured)
DFU – Device Firmware Update
DvC – Debug
CS – Content Security
ICCD/CCID – SmartCard
Still Image (PictPridge, PTP, MTP)
AV – Audio/Video
USB Hub
Printer
MCPC FOMA
Google ADB

Quality & Certification

The quality of the package is ensured by:

  • Unit test of every module with CppUnit and Check
  • Formal static code analysis with Lint and Klocwork
  • Formal memory leak check via internal memory leak checker

Compliance to USB is guaranteed by:

  • Compliance Certification within customer projects
  • Passing USB Command Verifier
  • emsys membership at USB Integrators Forum (USB-IF)