cancel
Showing results for 
Search instead for 
Did you mean: 

USB Host with Hal libraries - enumeration problem

VCapu
Associate III

Hello. I'm using a custom board with STM32F105RBT6. I used the MX_USB_HOST_Init() funtion to configure the host usb in mode usb_otg_fs. The problem is that some USB keys don't work (the USBH_Process() function can't go further the HOST_ENUMERATION state).

Checking all the value returned by the involved functions I see this:

USBH_HandleEnum() returns USBH_BUSY (in the ENUM_IDLE state);

USBH_Get_DevDesc() returns USBH_BUSY;

USBH_GetDescriptor() returns USBH_BUSY;

USBH_CtlReq(phost, buff, length) returns USBH_BUSY;

Inside the USBH_CtlReq() function, after the CMD_SEND, the functions goes to the CMD_WAIT state and the USBH_HandleControl() function returns USBH_BUSY.

The USBH_HandleControl() is in the state CTRL_SETUP_WAIT, where the USBH_LL_GetURBState() function returns sometimes USBH_URB_IDLE or

 USBH_URB_NOTREADY or USBH_URB_ERROR.

What could be the reason?

1 REPLY 1
Robmar
Senior III

I have the exact same issue interfacing to the CP2102, has anyone solved this?