USB Device Troubleshooting#

Te following are some common issues that you might encounter while developing an application using Micrium OS USB Device.

My device is not detected by Windows.#

There can be many causes for this issue. The first thing to verify is that you have properly called the functions USBD_DevAdd() and USBD_DevStart() for your USB controller, and that both functions return with the error code RTOS_ERR_NONE. Also make sure that you have added at least one configuration to your device with one class.

If you have written your own BSP, make sure the USB controller clock, power and I/O pins are properly configured, and check that the USB ISR is triggered when you connect the device to the host.

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 in your USBD_DEV_CFG structure.

My CDC or Vendor device is not working properly on Windows 8.#

Windows 8 requires that all the provided .inf files must be certified. For a device using the Vendor class, the Microsoft OS descriptors can be enabled using the configuration USBD_CFG_MS_OS_DESC_EN. For a CDC device, refer to USB Device CDC ACM Class Example Applications .

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

  • Determine if there is any special action that can be taken in your driver to improve the data throughput, such as DMA transfers, double buffering for bulk transfers, etc.

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 but not on Mac OS and/or Linux.#

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, we provide a helper library (USBDev API) that simplifies the development of host applications. This library is compatible only with Windows.

My composite device (multi-function device) is not recognized by Windows.#

If at least one of your device's function requires a .inf file to load a driver (such as CDC ACM and Vendor), our .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 RTOS_ERR<rsrc>_ALLOC. What do I do?#

Micrium OS 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.