Problems with HID Host and STM32F4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
ā2017-11-23 4:09 AM
Hi everyone,
I'm developing an HID Host application to comunicate with a own device and I'm using the NUCLEO-F446ZE board.
At the start I tried to use the HID_Standalone application in the STM32CubeF4 firmware package and then, I tried to develop a new application with STMCube configurator.In both case I tried to connect (with OTG connector) 3 different type of mouse and 1 keyboard and no all device are able to comunicate with microcontroller:
- with Typhoon mouse 40260 the USBH_Process state machine in the usbh_core.c file of the Middlewares, blocks in the HOST_ENUMERATION state (line 462) because the USBH_HandleEnum(phost) function try to get device descriptior (line 646 same file) but the USBH_HandleControl() function read all times USBH_URB_NOTREADY state (line 600 of usbh_ctlreq.c) until HAL_HCD_Disconnect_Callback() called by interrupt.
- with Trust mouse 16144 is the same with Typhoon mouse with difference that the HAL_HCD_Disconnect_Callback() isn't called by interrupt.
- with Dell Mouse XN966 all work fine and I can see the data.
- with asus keyboard G01 KB the USBH_Process state machine in the usbh_core.c come up to HOST_DEV_DISCONNECTED where there is the BgndProcess but I can't receive data because in the HID_Handle the fifo has the tail and head at the same value.
All the previous devices are tested with PC and work fine and the board are powerd with external source.
What can be the problem and how can I fix it?
Thanks in advance
#usb-hid #usb-host #stmcube-f4-usb #middlewareSolved! Go to Solution.
- Labels:
-
USB
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
ā2018-01-26 7:56 AM
I have applied the
pavel_a
patch suggested inhttps://community.st.com/0D70X000006SyJZSA0
and seems the USB stack works fine! I hope, as soon as possible, ST release the USB stack with these fixs.Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
ā2017-12-05 7:56 AM
Nobody can help me?
I continued debugging code and I saw the problem is the device send to the host STALL handshake when the host try to enumerate or, with a custom device different from previosus devices, when it call SetReport or GetReport.
I read on-line that the device return STALL handshake when endpoint is in HALT state.
What could be the problem?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
ā2017-12-05 10:35 AM
>>Nobody can help me?
Tried your local ST Micro office, and the FAE's on staff there?
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
ā2017-12-06 1:24 AM
I contacted ST online support but I didn't receive replies.
This morning I have sent an email to my local FAE and I'm waiting an answer.
What do you mean with 'FAE's on staff there'?
Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
ā2017-12-11 4:22 AM
Hi Ć¢ā¬ā¹,
Do you confirm that you have same behavior in both cases: when using
HID_Standalone application in the STM32CubeF4 firmware package or when generating your own code with STM32CubeMX?
-Amel
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
ā2017-12-11 6:23 AM
Yes I confirm that I have same behavior in both cases. I had to make some changes in the HID_Standalone beacause I haven't the TFT shield but this shouldn't cause issues for USB because the changes, are only in the code for TFT shield.
I developed my application with STM32CubeMX and following the HID_Standalone application.
This mornig I have seen that in the NUCLEO-446ZE there wasn't the xtal and the clock was provided by MCO (this could be a problem for USB that want a accurate clock).
I have mounted one 24MHz xtal, I have followed all the steps of 6.8.1 section of UM1974 and set the correct parameters in the STM32CubeMX with Clock Configuration but the problem has not be solved.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
ā2017-12-18 5:05 AM
Hi everyone,
I have the same problem on a custom board based on STM32F429.
I need to connect a USB keyboard to the system as an input device and some works and some don't.
I tried with 6 different keyboard and only two works (a Dell and HP keyboard) : all the others aren't recognized by the system.
I'm facing the same problem of the Trust Mouse 16144 in the original message of this thread (
USBH_Process state machine in the usbh_core.c file of the Middlewares, blocks in the HOST_ENUMERATION state).
The thread is marked as Resolved but I can't see any solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
ā2017-12-19 5:03 AM
Yes, I contacted to change the status but nothing.
The problem isn't solved, I also contacted the on-line support but no solutions have been found.
I don't know if for you can be useful but I have added other details in further reply to Amel N.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
ā2017-12-19 6:27 AM
Hello,
Please note that this question is marked for action just to keep tracking for it: it means we are working on it.
I shared the case with our USB experts who should help to do a deeper analysis.
luca.giuliodori
ā, could you please share OLS ticket number? We need it to avoid duplicating effort.I will make a branch for the post where you are reporting possible bugs in stm32f4xx_II_usb; it should be better to manage it separately.
-Amel
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
ā2017-12-19 9:39 AM
Ok no problem and thank you for your attention. Where can I find
OLS ticket number?
