Hello,
I am stuck in implementing USB composite (VCP+MSC) using FS-Device_Lib_V4.0.0 (STM32L151). Individually both works but when I try composite VCP+MSC, MSC works well but PC can't communicate via VCP (although it can recognize as COM port).
I've edited .inf file and updated device descriptions. What else I am missing to config? I request your suggestion how to fix this issue. I posted same query in ST forum, didnt have any clue there.
Thank you in advance.
NB: I'm using ENDP1 in+out for MSC, ENDP3 in+out for VCP, ENDP2 in for VCP interrupt. End point address combined as:
#define BTABLE_ADDRESS (0x00) #define ENDP0_RXADDR (0x0040) #define ENDP0_TXADDR (0x0080) /* EP1 MSC */ #define ENDP1_TXADDR (0x0150) #define ENDP1_RXADDR (0x0190) /* EP2 VCP Int*/ #define ENDP2_TXADDR (0x0100) /* EP3 VCP*/ #define ENDP3_TXADDR (0x00C0) #define ENDP3_RXADDR (0x0110)
To include VCP interfaces (interface 0 for MSC, 1 and 2 for VCP int), I've edited stmcdc.inf file of virtual com port driver like this:
[Version] Signature="$Windows NT$" Class=Ports ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318} Provider=%PRVDR% CatalogFile=stmcdc.cat DriverVer=04/25/2010,1.3.1 ;[SourceDisksNames] ;1=%DriversDisk%,,, ;[SourceDisksFiles] [Manufacturer] %MFGNAME%=DeviceList,NT,NTamd64 ;[DestinationDirs] ;DefaultDestDir = 12 ; ========== VID PID =========== [DeviceList.NT] %DESCRIPTION%=DriverInstall,USB\VID_0483&PID_5741&MI_00 %DESCRIPTION%=DriverInstall,USB\VID_0483&PID_5741&MI_01 %DESCRIPTION%=DriverInstall,USB\VID_0483&PID_5741&MI_02 [DeviceList.NTamd64] %DESCRIPTION%=DriverInstall,USB\VID_0483&PID_5741&MI_00 %DESCRIPTION%=DriverInstall,USB\VID_0483&PID_5741&MI_01 %DESCRIPTION%=DriverInstall,USB\VID_0483&PID_5741&MI_02 ; ========== Class definition =========== [ClassInstall32] AddReg = ClassInstall_AddReg [ClassInstall_AddReg] HKR,,,,%ClassName% HKR,,NoInstallClass,,1 HKR,,IconPath,%REG_MULTI_SZ%,"%systemroot%\system32\setupapi.dll,-20" HKR,,LowerLogoVersion,,5.2 ; =================== Installation =================== [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 ; SERVICE_KERNEL_DRIVER StartType = 3 ; SERVICE_DEMAND_START ErrorControl = 1 ; SERVICE_ERROR_NORMAL ServiceBinary= %12%\usbser.sys LoadOrderGroup = Base [Strings] PRVDR = "STMicroelectronics" MFGNAME = "STMicroelectronics." DESCRIPTION = "STMicroelectronics Virtual COM Port" SERVICE = "STM Virtual COM Port" DriversDisk = "STM Drivers Disk" REG_MULTI_SZ = 0x00010000 ClassName="Universal Serial Bus devices"
[contd. Device des]
/******************** Descriptor of Mass Storage interface ********************/ 0x09, /* bLength: Interface Descriptor size */ 0x04, /* bDescriptorType: */ 0x00, /* bInterfaceNumber: Number of Interface */ 0x00, /* bAlternateSetting: Alternate setting */ 0x02, /* bNumEndpoints*/ 0x08, /* bInterfaceClass: MASS STORAGE Class */ 0x06, /* bInterfaceSubClass : SCSI transparent*/ 0x50, /* nInterfaceProtocol */ 5, /* iInterface: */ 0x07, /*Endpoint descriptor length = 7*/ 0x05, /*Endpoint descriptor type */ 0x81, /*Endpoint address (IN, address 1) */ 0x02, /*Bulk endpoint type */ 0x40, /*Maximum packet size (64 bytes) */ 0x00, 0x00, /*Polling interval in milliseconds */ 0x07, /*Endpoint descriptor length = 7 */ 0x05, /*Endpoint descriptor type */ 0x01, /*Endpoint address (OUT, address 1) */ 0x02, /*Bulk endpoint type */ 0x40, /*Maximum packet size (64 bytes) */ 0x00, 0x00 /*Polling interval in milliseconds*/ };