2014-06-01 09:48 AM
Hi,
I have a problem that looks like a bug in STM USB library. I am using version 2.1 running on STM32F207. The problem I am facing is as follows: I have a host running at the STM32F207 (HS) and a mouse connected to it. The code is based on a modified version from the examples. All works fine with one mouse. It is a simple Logitech 3 button + wheel. When I connect a newer Logitech mouse or a a simple Pixart mouse the host start negotiation with them but fails. The host reaches the enumeration state but does not call mouse init. I was able to find that it returns an error USBH_BUSY ? It looks like enumeration is not complete or an error in descriptors transfer. I have triad running STM unchanged code loaded on the evaluation board (STM3220) and also the latest CUBE for that board and it behaves exactly the same ?? Anyone seen something like that ? Any input is appreciated. BR, Noam. #stm3220-cube2014-06-02 01:16 AM
Hi,
Some more information. I have already tested with 4 other mice’s and none are properly recognized by the host code.I am running the latest cube code for STM32F2 as well as my own code.
This is not a small bug I have triad Microsoft Intellimouse explorer , Logitech professional mouse and PIXART mouse.
None are working with the host code.
The only mice that does work is a simple Logitech mice ???
Mice is enumerated but not reseted. As a result the process is not completed. Anyone seen something like that before ? BR, Noam.2014-06-09 02:12 AM
Hi,
It seems to be a connection issue. Please try to increase the delay after the connection event in the connection event callback within the usbh_conf.h file./**
* @brief Connect callback. * @param hhcd: HCD handle * @retval None */ void HAL_HCD_Connect_Callback(HCD_HandleTypeDef *hhcd) { uint32_t i = 0; USBH_LL_Connect(hhcd->pData); for (i = 0; i< 400000; i ++) { __asm ( ''nop'' ); } } With regards.2014-06-10 05:28 AM
Hi,
I am not using the CUBE code. I am using STM library 2.1 I could not find related code to the problem you described. Can you elaborate ? Thanks, Noam.2014-06-10 07:19 AM
Hi,
I was able to to load the CUBE code for HID host demo on my board. I found the function you suggested to change. I changed the time out but that did not help as well. Attache please find the captured display. BR, Noam.2014-06-11 04:04 AM
I found some more information:
After getting the HID and Report descriptors the process idles forever ?? Inside usbh_hid_core.c in function USBH_HID_ClassRequest after case HID_REQ_GET_REPORT_DESC is processed the next state is HID_REQ_SET_IDLE For some reason function USBH_Set_Idle always returns with USBH_BUSY and the state never changes .. like an endless loop ???2014-06-18 01:29 AM
Hi,
Could you provide the USB Trace, this will help understanding the problem.