none
Custom driver development for WEC2013 RRS feed

  • Question

  • Hi,

    I have a custom board running WEC 2013.  The board has a PCIe connector which allows a GPRS modem to be connected to it.  We have built the driver for the modem into the kernel, and this produces a file called CDCACM.DLL in the Windows folder of the device.  This generally works well.  But, after the system has been running for a few days, a fault appears which requires the board to be restarted.  This is not acceptable in our application.

    I have taken the source code for the driver and built it as a separate DLL, called CDCACM2.DLL.  I copy this DLL to the WINDOWS folder, and change the LoadDriver registry entry to point to CDCACM2.DLL rather than CDCACM.DLL.  There are no obvious errors generated on the system (for example, the 'Unrecognized USB device' message is NOT displayed), but the DLL does not seem to run.

    Any ideas what the cause of the problem might be?

    Thanks

    Andrew

    Friday, June 7, 2019 2:38 PM

All replies

  • When you reviewed the debug output, what did it tell you?

    Bruce Eitman
    Senior Enginer
    Bruce.Eitman AT Synopsys DOT com
    My BLOG http://geekswithblogs.net/bruceeitman
    I work for
    Synopsys

    Monday, June 10, 2019 1:31 PM
    Moderator
  • Bruce,

    Which debug output are you referring to?

    Andrew

    Monday, June 10, 2019 1:34 PM
  • Which problem are you referring to?

    For the first problem, you will need to log information on you customer's device.  For the second problem, probably serial output from the kernel, device manager, bus enum, your driver, ...


    Bruce Eitman
    Senior Enginer
    Bruce.Eitman AT Synopsys DOT com
    My BLOG http://geekswithblogs.net/bruceeitman
    I work for
    Synopsys

    Monday, June 10, 2019 7:28 PM
    Moderator
  • Bruce,

    The first problem with the driver built into the kernel is that a call to lpIssueInterruptTransfer fails and returns a value of 0.  GetLastError returns a code of 55 (ERROR_DEV_NOT_EXIST).  After this, DeviceNotify messages stop working and the board has to be rebooted.

    For the second problem we have an issue with viewing the serial output from the kernel, because it defaults to COM1, and this port is also used for communication with a microcontroller which is responsible (among other things) for powering the USB hubs on the board.

    Regards

    Andrew


    Tuesday, June 11, 2019 8:39 AM
  • This is another variant of the same original problem;

    17:21:13 [cdcmdd]serial port process attach
    17:21:13 [cdcserial]USBDeviceAttach: -->>
    17:21:13 [cdcserial]wsResourceRegKey:Drivers\USB\LoadClients\7111_33\Default\Default\CdcSerial
    17:21:13 [cdcserial] --> iInterface(DeviceArrayIndex):0
    17:21:13 [cdcserial]UsbInterface->Descriptor->bInterfaceNumber 0
    17:21:13 [cdcserial]>ParseUsbDescriptors
    17:21:13 [cdcserial]CurInterface->Descriptor.bInterfaceProtocol = 0x1
    17:21:13 [cdcserial]<ParseUsbDescriptors:0xa518de00
    17:21:13 [cdcserial]>ParseUsbDescriptors
    17:21:13 [cdcserial]CurInterface->Descriptor.bInterfaceProtocol = 0x0
    17:21:13 [cdcserial]<ParseUsbDescriptors:0xa518de1c
    17:21:13 [cdcserial]*** Found interface @ index: 0 ***
    17:21:13 [cdcserial]*** Found interface @ index: 1 ***
    17:21:13 [cdcserial]*** pSerialHead->bInterfaceNumber[0]: 0 ***
    17:21:13 [cdcserial]*** pSerialHead->bInterfaceNumber[1]: 1 ***
    17:21:13 [cdcserial]***** CDC CONTROL INTERFACE INDEX = 0
    17:21:13 [cdcserial]***** CDC DATA INTERFACE INDEX = 1
    17:21:13 ==> [cdcserial]SetUsbInterface
    17:21:13 [cdcserial]SetUsbInterface error:55
    17:21:13 [cdcserial]SetUsbInterface failed!
    17:21:13 ==> [cdcserial]SetUsbInterface
    17:21:13 [cdcserial]SetUsbInterface error:55
    17:21:13 [cdcserial]SetUsbInterface failed!
    17:21:13 [cdcserial]ERROR: UNKNOWN DEVICE TYPE 
    17:21:13 [cdcmdd]process detach called


    Tuesday, June 11, 2019 8:51 AM
  • If you can load a debug kernel from Visual Studio using KITL you will see the debug output in the VS output window. To solve the driver problem you will need to be able to do this anyway. Without the ability to source debug, you are driving blind.

    Good luck,

    Michel Verhagen, eMVP
    Check out my blog: https://guruce.com/blog

    GuruCE
    Microsoft Embedded Partner
    NXP Proven Partner
    https://guruce.com
    Consultancy, training and development services.

    Interested in WEC on i.MX6?
    Get the only 100% stable and best performing i.MX6 BSP for WEC7 and WEC2013 here: https://guruce.com/imx6

    Wednesday, June 12, 2019 5:44 PM
    Moderator