I've been busy building a CDC + HID composite USB device for the past couple of weeks, and stuck with This device cannot start. (Code 10) error in Windows 7.

When looking at the device through USBlyzer, I can see the device successfully communicates with the PC, as USBlyzer is able to extract both the USB device and configuration descriptors. USBlyzer isn't pointing out any errors, making it difficult to see what exactly is wrong.

My code is available at bitbucket.org, the Mercurial repository URL is https://bitbucket.org/sparkbuzz/pic32_usb.x.

The project is really simple, and there are basically three important files:

The project is basically derived from the Device - Composite - MSD + CDC example from Microchips' Libraries for Applications. I've double checked that descriptor size values are correct, and been over the code a dozen times, but not sure what's causing my headaches.

My breadboard setup looks like this, and it is working quite well, since I've tested it with an HID only example, and it worked perfectly (So the problem is definitely somewhere in my code):

enter image description here

The setup uses a PIC32MX250F128B MCU from Microchip, with an LDO on the top right which steps the VUSB 5V down to 3.3V for the MCU Vdd supply. A 12MHz crystal supplies a clock signal to the MCU, which is used to configure the USB Module clock to 48MHz (see configuration bits in the source code). The green LED lights up when USBDeviceState == CONFIGURED_STATE and the red LED simply indicates that the 3.3V supply is on.

The device is visible in Device Manager:

enter image description here

...but off course Windows 7 isn't happy:

enter image description here

Here's the report from USBlyzer:

enter image description here

Some more output from USBTrace, could the problem be to do with configuration selection?

enter image description here

I have no idea what's wrong, and have been trying this entire week to fix this.

Please can someone try to help?

  • \$\begingroup\$ Have you tried compiling one of the sample Microchip applications without making any changes and see if it works? \$\endgroup\$ – tcrosley Nov 14 '13 at 23:47
  • \$\begingroup\$ Not without changing them, no. I managed to get the HID portion working, adding the CDC is where the issues are. I'll give the Microchip CDC Basic Demo a go, on its own. Not a bad idea. \$\endgroup\$ – josef.van.niekerk Nov 15 '13 at 0:23
  • \$\begingroup\$ I've added another image, USBTrace is throwing out a STATUS_UNSUCCESSFUL error on SELECT_CONFIGURATION. Not entirely sure what it means yet. \$\endgroup\$ – josef.van.niekerk Nov 15 '13 at 0:24
  • \$\begingroup\$ Just reading the MLA docs, and it mentions I might need a .inf file for Windows? \$\endgroup\$ – josef.van.niekerk Nov 15 '13 at 0:32
  • \$\begingroup\$ I think I need to write a driver for Windows! On Mac, I can see the device sitting under /dev/tty.usbmodemfd122 \$\endgroup\$ – josef.van.niekerk Nov 15 '13 at 0:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.