cancel
Showing results for 
Search instead for 
Did you mean: 

Error using multiples USB CDC using STM32l4 for win7 32 bits

valverdelucas
Associate
Posted on October 28, 2016 at 17:45

Hi all,

We are trying to implement two CDC using an stm32l4.

Both CDC works find with a win7 64 bits and also with Linux.

We also get success using win7 32bit but only when we implement one CDC.

We are using the last STM32 driver V1.4.0 (same problems with 1.3.1)

The problem occurs when we plug the USB to the PC, we get an BSOD, writting ''usbser.sys''

Here is our descriptors configuration:

/*

USB Standard Device Descriptor */

__ALIGN_BEGIN uint8_t USBD_FS_DeviceDesc[USB_LEN_DEV_DESC] __ALIGN_END =

  {

    0x12,                       /*bLength */

    USB_DESC_TYPE_DEVICE,       /*bDescriptorType*/

&sharpif (USBD_LPM_ENABLED == 1)

    0x01,                       /*bcdUSB */ /* changed to USB version 2.01

                                               in order to support LPM L1 suspend

                                               resume test of USBCV3.0*/

&sharpelse  

    0x00,                       /* bcdUSB */

&sharpendif

    0x02,

    0x02,                        /*bDeviceClass*/

    0x02,                       /*bDeviceSubClass*/

    0x00,                       /*bDeviceProtocol*/

    USB_MAX_EP0_SIZE,          /*bMaxPacketSize*/

    LOBYTE(USBD_VID),           /*idVendor*/

    HIBYTE(USBD_VID),           /*idVendor*/

    LOBYTE(USBD_PID_FS),           /*idVendor*/

    HIBYTE(USBD_PID_FS),           /*idVendor*/

    0x00,                       /*bcdDevice rel. 2.00*/

    0x02,

    USBD_IDX_MFC_STR,           /*Index of manufacturer  string*/

    USBD_IDX_PRODUCT_STR,       /*Index of product string*/

    USBD_IDX_SERIAL_STR,        /*Index of serial number string*/

    USBD_MAX_NUM_CONFIGURATION  /*bNumConfigurations*/

  } ;

Here is our stmcdc.inf

;------------------------------------------------------------------------------

; STMicroelectronics Comunication Device Class driver (CDC) INF FILE

; (C)2010 Copyright STMicroelectronics

;------------------------------------------------------------------------------

[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 Settings

;------------------------------------------------------------------------------

[DeviceList.NT]

%DESCRIPTION%=DriverInstall,USB\VID_0483&PID_5740

[DeviceList.NTamd64]

%DESCRIPTION%=DriverInstall,USB\VID_0483&PID_5740

[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

;------------------------------------------------------------------------------

;              String Definitions

;------------------------------------------------------------------------------

[Strings]

PRVDR = ''STMicroelectronics''

MFGNAME = ''STMicroelectronics.''

DESCRIPTION = ''STMicroelectronics Virtual COM Port''

SERVICE = ''STM Virtual COM Port''

DriversDisk = ''STM Drivers Disk'' 

Any idea ?

Thank you, for your support.

#usb #stm32l4 #cdc #vcp #32bits
1 REPLY 1

Sorry, bumping old zombie unanswered threads off my feed

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..