USB Host Troubleshooting#
The following are some common issues that you may encounter while developing an application using Micrium OS USB Host.
When I connect a device to my host controller, nothing seems to happen.#
There can be many causes for this issue. We highly recommended that you implement the USB Host event functions. The event functions offer a function that will be called when a device connection fails and will provide an error code that will help to identify the issue. The event functions can be implemented by calling the function USBH_ConfigureEventFncts() before the function USBH_Init(). For more information on the event functions, refer to USB Host Event Callbacks Usage .
Also, double check that your USB bus is properly supplied with 5 volts.
When connecting a given device to my host, I get an error RTOS_ERR_rsrc_ALLOC. However, when I connect another similar device, I don't get any error. Why's that?#
Event though two different devices may appear to have exactly the same features, they may present themselves quite differently to the host. This is especially true for the HID devices.
If you set the configuration USBH_CFG_OPTIMIZE_SPD_EN and/or USBH_CFG_INIT_ALLOC_EN to DEF_ENABLED, refer to USB Host Device Resource Needs for more information on how many resources you should allocate to account for the worst cases.
If you didn't enable either of these configurations, make sure that the memory segments used by the USB Host module are large enough.