USB Device Troubleshooting
Te following are some common issues that you might encounter while developing an application using Silicon Labs USB Device.
My device is not detected by Windows OS.
There can be many causes for this issue. The first thing to verify is that you have properly called the function
sl_usbd_core_add_device() and, if you disabled the auto-start feature
SL_USBD_AUTO_START_USB_DEVICE, the function
sl_usbd_core_start_device(), and that both functions return with the error code
SL_STATUS_OK. Also make sure that you have added at least one configuration to your device with one class.
My device used to work properly, but now that I added/removed/modified a class instance, it behaves weirdly.
Once Windows associates one or more drivers with a given device, the association cannot be changed. So, if for instance, you connect a device with an HID class instance, and you modify it to be an MSC device and reconnect it, Windows will assume it is still an HID device. In order to force Windows to re-associate its drivers, you can either uninstall the device completely using the device manager or set a new Product ID with configuration
SL_USBD_DEVICE_PRODUCT_ID in sl_usbd_device_config.h.
My CDC or Vendor device is not working properly on Windows OS.
Windows OS requires that all the provided .inf files must be certified. See section Microsoft Windows OS USB Host for more details on .inf files.
My device has a low data transfer rate.
There can be many causes for this issue. Here are some tips to increase the throughput:
- Transmit the largest buffer possible
Keep in mind that if your device operates at Full-Speed, you will never get better throughput than ~850 KBytes/sec.
My device works on Windows OS but not on Mac OS and/or Linux OS.
The USB Device module has been successfully tested on both Linux and Mac OS. However, some classes may require certain specific configurations to operate correctly under Mac OS and/or Linux. Refer to the user manual of the class you use for more information.
Note that for our Vendor class, a Vendor host application has to be developed as well. Libraries, such as libusb, can be used to develop such an application.
My composite device (multi-function device) is not recognized by Windows OS.
If at least one of your device's function requires a .inf file to load a driver (such as CDC ACM and Vendor), the .inf example file is unlikely to work as-is. You will probably have to modify it. Refer to the About INF Files section for more information.
When I create a class instance or add a class instance to a configuration, I keep getting an error
SL_STATUS_ALLOCATION_FAILED. What do I do?
Silicon Labs USB Device allocates a pool of each type of resources at initialization. Your application must specify the quantity of resources of each type to allocate. If you get a resource allocation error, you will have to increase the quantity of the given resource to allocate. For more information, refer to USB Device Run-Time Application-Specific Configuration.