Skip to main content
  • 产品
  • Evaluate our Software
  • 下载
  • Free Utilities
  • 购买
  • 支持
  • 关于我们
  • Search
    • Contact Us
    • Forum
    • Knowledge Base
    • Newsletter
    • RSS
  •   工作机会
  •   视频
  •   永续性
  • emUSB-Device
  • Combining Interfaces/Addons
  • Technology
  • Add-Ons

Combining USB Interfaces/Add-ons

Combining interfaces is nowadays a very important feature and is being used in a multitude of USB devices such as multi-function printers, smartphones, tablets, modems and data loggers.

Contact us
Downloads
Documentation
SEGGER emUSB-Device
  1. 1.What are the Advantages of a multi interface?
  2. 2.Why do I have to do either?
  3. 3.Using multi-interface with emUSB-Device
  4. 4.Limitation

What are the Advantages of a multi interface?

  • Allows to have different or even multiple instances of the same interfaces combined in one device.
    A smartphone can have an interface for controlling the smartphone itself, an additional one for data transfer and one that allows to access to the modem of the phone to connect to the Internet.

  • Having a device with multiple interfaces allows the user to simultaneously access his device in different ways. For example MSD or VirtualMSD can be used for firmware update or making log files available while using a host application that communicates with the device via Bulk or CDC-ACM.
    J-Link is a great example for this. Different J-Link models do not only have access to the debug interface, they can also communicate via CDC-ACM with the target MCU's UART. VirtualMSD is used to update the application of the debug target MCU. Or you can access the Webserver on the J-Link via IP-over-USB in order to configure the J-Link.

Why do I have to do either?

  • Enhances the customer's user experience.
  • Increases the value of the USB device.
  • Nowadays devices have to support different protocols or tasks. Those can be realized by using different emUSB-Device interfaces.
  • Migrate an IP-based protocol to an existing USB device.

Using multi-interface with emUSB-Device

Combining different add-ons or USB classes with emUSB-Device is quite easy. Simply sequentially call the dedicated *_Add() function of the add-on.

For example adding a multi-interface device with HID and MSD enabled looks like the following:

void MainTask(void) {
  USBD_Init();
  _PrepareUSBInitData();
  USBD_HID_Add(&_HidInitData);
  USBD_MSD_Add(&_MsdInitData);
  USBD_MSD_AddUnit(&_MsdUnitData);
  USBD_SetDeviceInfo(&_DeviceInfo);
  USBD_Start();
  //CreateTasks for USB Interface for handling dedicated interfaces
  [...]
}

This will make sure that all interfaces will be added to the stack. emUSB-Device will then handle the enumeration of the device and will provide the descriptors automatically to the host.

Please note that for special add-ons/USB classes a special call is needed before the dedicated *_Add() function is called. A call of USBD_EnabledIAD() is needed before calling any *_Add() function.
The following add-on/USB classes need this call:

  • CDC-ACM
  • IP-over-USB
  • CDC-ECM
  • RNDIS

Limitation

To use multi-interface with a USB device it must be verified that the desired USB device controller has enough endpoints to support all interfaces/classes.

Furthermore we have experienced that there is an issue with some add-ons/USB classes when used with multi-interface. This error only shows up when using Windows 7 and third party USB 3.0 host controller drivers. These add-ons/USB classes make use of the "MS OS Descriptor" feature. This feature facilitates these add-ons by not providing a driver installation for Windows.

Building a multi-interface device with the mentioned add-ons shows that the device is not enumerated properly as the USB Host 3.0 drivers do not properly pass the MS OS descriptor information to Windows. As a result of this the device is not enumerated as a "Composite Device". It is rather enumerated as a single interface device. Normally the interface which is described by the MS OS Descriptor.

The following add-ons are affected by this issues:

  • Bulk add-on
  • IP-over-USB
  • MTP
  • RNDIS

A special tool, the Composite Device Driver Fixer, can be downloaded from our website free of charge to fix this Windows issue.

全球总部

德国: SEGGER Microcontroller GmbH

地址: Ecolab-Allee 5
40789 Monheim am Rhein, Germany
电邮: info@segger.com
电话: +49-2173-99312-0
传真: +49-2173-99312-28

网点分布

中国:哲戈微系统科技(上海)有限公司

地址: 中国上海市闵行区秀涟路133号
大虹桥国际A 栋218室
邮编201199
电邮: china@segger.com
电话: +86-133-619-907-60

通过ISO 9001认证

ISO 9001

30多年的嵌入式行业经验

First-class embedded software tools since 1992
  • 版本说明
  • 免责声明
  • 隐私策略
  • 沪ICP备2022005181号
  • 沪公网安备 31011202014525号
© 2025 SEGGER - 版权所有.

您即将离开 segger.cn 而访问境外网站,是否继续?