• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Microcontrollers » Stellaris® ARM® Microcontrollers » Stellaris® ARM® LM3S Microcontrollers Forum » USB composite device of generic_bulk and two VCP
Share
Stellaris® ARM® Microcontrollers
  • Forum
Options
  • Subscribe via RSS
Helpful Stellaris® LM4F Series Links
  • LM4F Series
  • Stellaris PinMux Utility
  • Stellaris® LM4F120 LaunchPad
  • LM4F MCU Applications
  • LM4F MCU Video
  • ARM Cortex-M4F Whitepaper
  • Stellaris MCU Brochure
  • LM4F232 Eval Kit
  • USB composite device of generic_bulk and two VCP

    USB composite device of generic_bulk and two VCP

    This question is answered
    IK
    Posted by IK
    on Jun 10 2012 06:02 AM
    Prodigy40 points

    Hi all!

    Im working with stellaris EKK-LM3S9D92 and trying to generate USB composite device of two VCP and generic_bulk data interface. I have successfully generated composite device of two VCP and it works fine, but when I add generic_bulk_device function, Windows can find it but cannot install driver for it. I don' t know how to generate suitable .inf file which can load drivers for two VCP and generic_bulk_device? I have modified usb_dev_cserial.inf file as shown bellow ( yellow lines are modifiad sections) but windows cannot load driver for generic bulk device.. Are there anybody who have solved similar problem?? Thanks a lot of!

    ;
    ;   Stellaris USB CDC (serial) driver installation file.
    ;
    ;   Copyright (c) 2010-2011 Texas Instruments Incorporated.  All rights reserved.
    ;

    [Version]
    Signature="$Windows NT$"
    Class=Ports
    ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}
    Provider=%MFGNAME%
    LayoutFile=layout.inf
    CatalogFile.NTx86=usb_dev_cserial_x86.cat
    CatalogFile.NTamd64=usb_dev_cserial_amd64.cat
    CatalogFile.NTx86=usb_dev_bulk_x86.cat
    CatalogFile.NTamd64=usb_dev_bulk_amd64.cat
    DriverVer=07/02/2011,1.3.7611

    [SourceDisksNames]
    1=%DISKNAME%,,,

    [SourceDisksFiles]
    %12%\usbser.sys=1

    [Manufacturer]
    %MFGNAME%=VirComDevice,NT,NTamd64,StellarisBulkDevice_WinUSB,NTx86

    [DestinationDirs]
    DefaultDestDir = 12

    [VirComDevice.NT]
    ;
    ; These entries are for the dual serial port composite example usb_dev_cserial.
    ;
    %DESCRIPTION_0%=DriverInstall,USB\Vid_1CBE&Pid_0007&MI_00
    %DESCRIPTION_1%=DriverInstall,USB\Vid_1CBE&Pid_0007&MI_02



    [StellarisBulkDevice_WinUSB.NTx86]
    %USB\StellarisBulkDevice.DeviceDesc% =USB_Install,USB\Vid_1CBE&Pid_0007&MI_04


    [VirComDevice.NTamd64]
    ;
    ; These entries are for the dual serial port composite example usb_dev_cserial.
    ;
    %DESCRIPTION_0%=DriverInstall,USB\Vid_1CBE&Pid_0007&MI_00
    %DESCRIPTION_1%=DriverInstall,USB\Vid_1CBE&Pid_0007&MI_02


    [StellarisBulkDevice_WinUSB.NTamd64]

    %USB\StellarisBulkDevice.DeviceDesc% =USB_Install,USB\Vid_1CBE&Pid_0007&MI_04


    ; =================== Installation ===================

    [ClassInstall32]
    AddReg=AddReg_ClassInstall

    [AddReg_ClassInstall]
    HKR,,,,"%DeviceClassDisplayName%"
    HKR,,Icon,,-1

    [USB_Install.NTx86]
    Include=winusb.inf
    Needs=WINUSB.NT
    CopyFiles=System32_CopyFiles

    [USB_Install.NTamd64]
    Include=winusb.inf
    Needs=WINUSB.NT
    CopyFiles=SysWOW64_CopyFiles
    CopyFiles=System64_CopyFiles

    [USB_Install.NTx86.Services]
    Include=winusb.inf
    AddService=WinUSB,0x00000002,WinUSB_ServiceInstall

    [USB_Install.NTamd64.Services]
    Include=winusb.inf
    AddService=WinUSB,0x00000002,WinUSB_ServiceInstall

    [WinUSB_ServiceInstall]
    DisplayName     = %WinUSB_SvcDesc%
    ServiceType     = 1
    StartType       = 3
    ErrorControl    = 1
    ServiceBinary   = %12%\WinUSB.sys

    [USB_Install.NTx86.Wdf]
    KmdfService=WINUSB, WinUsb_Install

    [USB_Install.NTamd64.Wdf]
    KmdfService=WINUSB, WinUsb_Install

    [WinUSB_Install]
    KmdfLibraryVersion=1.9

    [USB_Install.NTx86.HW]
    AddReg=Dev_AddReg

    [USB_Install.NTamd64.HW]
    AddReg=Dev_AddReg

    [Dev_AddReg]
    HKR,,DeviceInterfaceGUIDs,0x10000,"{6E45736A-2B1B-4078-B772-B3AF2B6FDE1C}"

    [USB_Install.NTx86.CoInstallers]
    AddReg=CoInstallers_AddReg
    CopyFiles=CoInstallers_CopyFiles

    [USB_Install.NTamd64.CoInstallers]
    AddReg=CoInstallers_AddReg
    CopyFiles=CoInstallers_CopyFiles

    [CoInstallers_AddReg]
    HKR,,CoInstallers32,0x00010000,"WdfCoInstaller01009.dll,WdfCoInstaller","WinUSBCoInstaller2.dll"

    [CoInstallers_CopyFiles]
    WinUSBCoInstaller2.dll
    WdfCoInstaller01009.dll

    [System32_CopyFiles]
    lmusbdll.dll
    lmusbdll.lib

    [System64_CopyFiles]
    lmusbdll.dll, lmusbdll64.dll
    lmusbdll.lib, lmusbdll64.lib

    [SysWOW64_CopyFiles]
    lmusbdll.dll
    lmusbdll.lib

    [DestinationDirs]
    CoInstallers_CopyFiles=11
    System32_CopyFiles=10,system32
    SysWOW64_CopyFiles=10,syswow64
    System64_CopyFiles=10,system32
    CoInstallers_CopyFiles=11

    ; ================= Source Media Section =====================

    [SourceDisksNames]
    1 = %DISK_NAME%,,,\i386
    2 = %DISK_NAME%,,,\amd64

    [SourceDisksFiles.x86]
    WinUSBCoInstaller2.dll=1
    WdfCoInstaller01009.dll=1
    lmusbdll.dll=1
    lmusbdll.lib=1

    [SourceDisksFiles.amd64]
    WinUSBCoInstaller2.dll=2
    WdfCoInstaller01009.dll=2
    lmusbdll.dll=1
    lmusbdll.lib=1
    lmusbdll64.dll=2
    lmusbdll64.lib=2

    [DriverInstall.NT]
    Include=mdmcpq.inf
    CopyFiles=FakeModemCopyFileSection
    AddReg=DriverInstall.NT.AddReg

    [DriverInstall.NT.AddReg]
    HKR,,DevLoader,,*ntkern
    HKR,,NTMPDriver,,usbser.sys
    HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"

    [DriverInstall.NT.Services]
    AddService=usbser, 0x00000002, DriverServiceInst

    [DriverServiceInst]
    DisplayName=%SERVICE%
    ServiceType=1
    StartType=3
    ErrorControl=1
    ServiceBinary=%12%\usbser.sys

    [Strings]
    MFGNAME       = "Texas Instruments, Inc."
    DISKNAME      = "Stellaris Composite Serial Device"
    DESCRIPTION_0 = "Stellaris USB Serial Port"
    DESCRIPTION_1 = "Stellaris USB Serial Command Port"
    DESCRIPTION_2 = "Generic Bulk Device"
    SERVICE       = "Stellaris USB CDC serial port"

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    All Replies
    • Tsuneo Chinzei
      Posted by Tsuneo Chinzei
      on Jun 10 2012 19:41 PM
      Verified Answer
      Verified by IK
      Expert2630 points

      IK
      CatalogFile.NTx86=usb_dev_bulk_x86.cat

      CatalogFile.NTamd64=usb_dev_bulk_amd64.cat

      Just single cat file for single INF file.

      When you touch to an INF file even at single character, the cat file becomes invalid.

      You have to generate new cat file for this INF. And apply to MS hardware certification.

      IK
      [Manufacturer]
      %MFGNAME%=VirComDevice,NT,NTamd64,StellarisBulkDevice_WinUSB,NTx86

      On Manufacturer section, the extra model-section name is placed on a separate line, as follows.

      [Manufacturer]
      %MFGNAME% = VirComDevice,NT,NTamd64
      %MFGNAME% = StellarisBulkDevice_WinUSB,NTx86

      INF Manufacturer Section
      http://msdn.microsoft.com/en-us/library/windows/hardware/ff547454(v=vs.85).aspx

      In the first place, you don't need to combine INF files, even for composite device.

      Each interface of composite device may have separate INF file.

      Leave the VCP INF alone. Modify generic_bulk INF just for the interface number (&MI_04)

      Tsuneo

      USB
      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • IK
      Posted by IK
      on Jun 11 2012 09:02 AM
      Prodigy40 points

      Hi Tsuneo and thanks a lot of your quick reply!

      I tested your advice and I leave the VCP INF alone and modified only generic_bulk INF by adding interface number (&MI_04) as you advised and this works! Now Windows starts to install driver for generic_bulk interface but unfortunately, cannot properly instal it. It says that "cannot start this hardware" and refers to error code 10. I did not generated new .cat file for this modified generic_bulk.INF so can this cause the error? It seems that installation gets stuck when it handles WdfCoInstaller01009.dll but I'm 100% sure. Do you have any ideas to solving this?

      Thanks Tsuneo for your help!

      Br IK

      USB composite device generic_bulk_device
      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Tsuneo Chinzei
      Posted by Tsuneo Chinzei
      on Jun 11 2012 09:44 AM
      Verified Answer
      Verified by IK
      Expert2630 points

      Windows make up device instance on its registry at USB device installation. Clean up (uninstall) wrong device instances of this VID/PID, and try installation once again.

      This utility is handy for this purpose.

      USBDeview
      http://www.nirsoft.net/utils/usb_devices_view.html

      1) Plug off your device from the PC, and run USBDeview
      2) Touch at "VID" column title, and USBDeview sorts its device list by VID/PID
      3) Right-click and uninstall all device instance of the target VID/PID
      4) Plug-in your device. New Hardware dialogs appear for each interface.

      If you would still see code 10 after cleanup, find clue on setupapi(.dev).log

      Troubleshooting Device Installation with the SetupAPI Log File
      http://msdn.microsoft.com/en-us/library/windows/hardware/gg463393.aspx

      Windows 7, Windows Server 2008 R2, and Windows Vista setup log file locations
      http://support.microsoft.com/kb/927521/en-us

      Tsuneo

      USB
      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • IK
      Posted by IK
      on Jun 13 2012 01:39 AM
      Prodigy40 points

      Tsuneo thanks your help!

      I uninstalled all device instances of my composite device by using USBDeview and tried to install drivers again but this procedure didn't removed the error, still same error exist. But when I find out problem from the SetupApi log file (Windows XP) I found this error "device not started: Device has problem: 0x0a: CM_PROB_FAILED_START". I have tried to find root cause(s) for this problem from the google but not yet found. However, many peoples who have been same problem refers to the correct .INF files. So I think that are my .INF files correct? , if they are correct, error may be located on the microcontroller side in my code... I put my .inf files (for composite VCP and Bulk data) below. Yellow lines are all what I have changed from the original.

      ; -----------------------------------------------------------------------------
      ;
      ; Stellaris Generic Bulk USB device driver installer
      ;
      ; This INF file may be used as a template when creating customized applications
      ; based on the Stellaris generic bulk devices. Areas of the file requiring
      ; customization for a new device are commented with NOTEs.
      ;
      ; -----------------------------------------------------------------------------

      ; NOTE: When you customize this INF for your own device, create a new class
      ; name (Class) and a new GUID (ClassGuid). GUIDs may be created using the
      ; guidgen tool from Windows Visual Studio.

      [Version]
      Signature = "$Windows NT$"
      Class = StellarisBulkDeviceClass
      ClassGuid={F5450C06-EB58-420e-8F98-A76C5D4AFB18}
      Provider = %ProviderName%
      CatalogFile.NTx86=usb_dev_bulk_x86.cat
      CatalogFile.NTamd64=usb_dev_bulk_amd64.cat
      DriverVer=07/02/2011,1.3.7611

      ; ========== Manufacturer/Models sections ===========

      [Manufacturer]
      %ProviderName% = StellarisBulkDevice_WinUSB,NTx86,NTamd64

      ; NOTE: Replace the VID and PID in the following two sections with the
      ; correct values for your device.
      ;

      [StellarisBulkDevice_WinUSB.NTx86]
      %USB\StellarisBulkDevice.DeviceDesc% =USB_Install, USB\VID_1CBE&PID_0003&MI_04

      [StellarisBulkDevice_WinUSB.NTamd64]
      %USB\StellarisBulkDevice.DeviceDesc% =USB_Install, USB\VID_1CBE&PID_0003&MI_04

      ; =================== Installation ===================

      [ClassInstall32]
      AddReg=AddReg_ClassInstall

      [AddReg_ClassInstall]
      HKR,,,,"%DeviceClassDisplayName%"
      HKR,,Icon,,-1

      [USB_Install.NTx86]
      Include=winusb.inf
      Needs=WINUSB.NT
      CopyFiles=System32_CopyFiles

      [USB_Install.NTamd64]
      Include=winusb.inf
      Needs=WINUSB.NT
      CopyFiles=SysWOW64_CopyFiles
      CopyFiles=System64_CopyFiles

      [USB_Install.NTx86.Services]
      Include=winusb.inf
      AddService=WinUSB,0x00000002,WinUSB_ServiceInstall

      [USB_Install.NTamd64.Services]
      Include=winusb.inf
      AddService=WinUSB,0x00000002,WinUSB_ServiceInstall

      [WinUSB_ServiceInstall]
      DisplayName     = %WinUSB_SvcDesc%
      ServiceType     = 1
      StartType       = 3
      ErrorControl    = 1
      ServiceBinary   = %12%\WinUSB.sys

      [USB_Install.NTx86.Wdf]
      KmdfService=WINUSB, WinUsb_Install

      [USB_Install.NTamd64.Wdf]
      KmdfService=WINUSB, WinUsb_Install

      [WinUSB_Install]
      KmdfLibraryVersion=1.9

      [USB_Install.NTx86.HW]
      AddReg=Dev_AddReg

      [USB_Install.NTamd64.HW]
      AddReg=Dev_AddReg

      [Dev_AddReg]
      HKR,,DeviceInterfaceGUIDs,0x10000,"{6E45736A-2B1B-4078-B772-B3AF2B6FDE1C}"

      [USB_Install.NTx86.CoInstallers]
      AddReg=CoInstallers_AddReg
      CopyFiles=CoInstallers_CopyFiles

      [USB_Install.NTamd64.CoInstallers]
      AddReg=CoInstallers_AddReg
      CopyFiles=CoInstallers_CopyFiles

      [CoInstallers_AddReg]
      HKR,,CoInstallers32,0x00010000,"WdfCoInstaller01009.dll,WdfCoInstaller","WinUSBCoInstaller2.dll"

      [CoInstallers_CopyFiles]
      WinUSBCoInstaller2.dll
      WdfCoInstaller01009.dll

      [System32_CopyFiles]
      lmusbdll.dll
      lmusbdll.lib

      [System64_CopyFiles]
      lmusbdll.dll, lmusbdll64.dll
      lmusbdll.lib, lmusbdll64.lib

      [SysWOW64_CopyFiles]
      lmusbdll.dll
      lmusbdll.lib

      [DestinationDirs]
      CoInstallers_CopyFiles=11
      System32_CopyFiles=10,system32
      SysWOW64_CopyFiles=10,syswow64
      System64_CopyFiles=10,system32
      CoInstallers_CopyFiles=11

      ; ================= Source Media Section =====================

      [SourceDisksNames]
      1 = %DISK_NAME%,,,\i386
      2 = %DISK_NAME%,,,\amd64

      [SourceDisksFiles.x86]
      WinUSBCoInstaller2.dll=1
      WdfCoInstaller01009.dll=1
      lmusbdll.dll=1
      lmusbdll.lib=1

      [SourceDisksFiles.amd64]
      WinUSBCoInstaller2.dll=2
      WdfCoInstaller01009.dll=2
      lmusbdll.dll=1
      lmusbdll.lib=1
      lmusbdll64.dll=2
      lmusbdll64.lib=2

      ; =================== Strings ===================

      ; Note: Replace these as appropriate to describe your device.

      [Strings]
      ProviderName="Texas Instruments Inc."
      USB\StellarisBulkDevice.DeviceDesc="Generic Bulk Device"
      WinUSB_SvcDesc="WinUSB"
      DISK_NAME="Stellaris Install Disk"
      DeviceClassDisplayName="Stellaris Bulk Devices"

      ;
      ;   Stellaris USB CDC (serial) driver installation file.
      ;
      ;   Copyright (c) 2010-2011 Texas Instruments Incorporated.  All rights reserved.
      ;

      [Version]
      Signature="$Windows NT$"
      Class=Ports
      ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}
      Provider=%MFGNAME%
      LayoutFile=layout.inf
      CatalogFile.NTx86=usb_dev_cserial_x86.cat
      CatalogFile.NTamd64=usb_dev_cserial_amd64.cat
      DriverVer=07/02/2011,1.3.7611

      [SourceDisksNames]
      1=%DISKNAME%,,,

      [SourceDisksFiles]
      %12%\usbser.sys=1

      [Manufacturer]
      %MFGNAME%=VirComDevice,NT,NTamd64

      [DestinationDirs]
      DefaultDestDir = 12

      [VirComDevice.NT]
      ;
      ; These entries are for the dual serial port composite example usb_dev_cserial.
      ;
      %DESCRIPTION_0%=DriverInstall,USB\Vid_1CBE&Pid_0007&MI_00
      %DESCRIPTION_1%=DriverInstall,USB\Vid_1CBE&Pid_0007&MI_02

      [VirComDevice.NTamd64]
      ;
      ; These entries are for the dual serial port composite example usb_dev_cserial.
      ;
      %DESCRIPTION_0%=DriverInstall,USB\Vid_1CBE&Pid_0007&MI_00
      %DESCRIPTION_1%=DriverInstall,USB\Vid_1CBE&Pid_0007&MI_02

      [DriverInstall.NT]
      Include=mdmcpq.inf
      CopyFiles=FakeModemCopyFileSection
      AddReg=DriverInstall.NT.AddReg

      [DriverInstall.NT.AddReg]
      HKR,,DevLoader,,*ntkern
      HKR,,NTMPDriver,,usbser.sys
      HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"

      [DriverInstall.NT.Services]
      AddService=usbser, 0x00000002, DriverServiceInst

      [DriverServiceInst]
      DisplayName=%SERVICE%
      ServiceType=1
      StartType=3
      ErrorControl=1
      ServiceBinary=%12%\usbser.sys

      [Strings]
      MFGNAME       = "Texas Instruments, Inc."
      DISKNAME      = "Stellaris Composite Serial Device"
      DESCRIPTION_0 = "Stellaris USB Serial Port"
      DESCRIPTION_1 = "Stellaris USB Serial Command Port"
      SERVICE       = "Stellaris USB CDC serial port"

      Br: IK

      USB generic_bulk_device .INF
      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Tsuneo Chinzei
      Posted by Tsuneo Chinzei
      on Jun 13 2012 04:05 AM
      Expert2630 points

      IK
      ; Stellaris Generic Bulk USB device driver installer
      [StellarisBulkDevice_WinUSB.NTx86]
      %USB\StellarisBulkDevice.DeviceDesc% =USB_Install, USB\VID_1CBE&PID_0003&MI_04

      [StellarisBulkDevice_WinUSB.NTamd64]
      %USB\StellarisBulkDevice.DeviceDesc% =USB_Install, USB\VID_1CBE&PID_0003&MI_04

      Ummm..
      Sorry, my words were too short.
      Your device assigns Vid_1CBE&Pid_0007 (in CDC INF), the generic_bulk INF is modified at VID/PID and interface number.

      [StellarisBulkDevice_WinUSB.NTx86]
      %USB\StellarisBulkDevice.DeviceDesc% =USB_Install, USB\VID_1CBE&Pid_0007&MI_04

      [StellarisBulkDevice_WinUSB.NTamd64]
      %USB\StellarisBulkDevice.DeviceDesc% =USB_Install, USB\VID_1CBE&Pid_0007&MI_04

      Tsuneo

      USB
      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • IK
      Posted by IK
      on Jun 13 2012 05:39 AM
      Prodigy40 points

      Tsuneo

      I figure out the problem, it was located in my code on the microcontroller side. Now Windows can be download the driver for bulk interface correctly and of course for two VCP. Thanks a lot of your help, our advices was really helpful for me!

      -IK

      USB generic bulk device
      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    TI E2E™ Community
    • Support Forums
    • Blogs
    • Videos
    • Groups
    • Site Support & Feedback
    • Settings
    TI E2E™ Community Groups
    • TI University Program
    • Make the Switch
    • Microcontroller Projects
    • Motor Drive & Control
    Other Communities
    • Deyisupport
    • Designsomething.org
    • beagleboard.org
    • TI on Element 14
    • TI on TechXchangeSM
    Other Technical & Support Resources
    • WEBENCH® Design Center
    • Product Information Centers
    • Technical Documents
    • TI Design Network
    • TI Technical Articles
    • TI Training

    All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

    Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

    Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
    TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

    TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
    embedded processors, along with software, tools and the industry’s largest sales/support staff.

    © Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
    Trademarks | Privacy Policy | Terms of Use